Monday, April 12, 2010

Configuring Apache with SSL(WindowsXP)

Easy Steps to configure Apache with SSL
STEP1:
Install the following
i>jdk
ii>Apache Tomcat
STEP 2:
After installing the above softwares edit the following path,in System Variables
Go to,Mycomputer->RightClick->Prpoerties->Advanced->EnvironmentVariables->Under SystemVariables..Add the following variables
i>VariableName = classpath
VariableValue =c:\ProgramFiles\ApacheSoftwareFoundation\lib\servlet-api.jar
ii>VariableName = Path
VariableValue = c:\ProgramFiles\jdk*\bin
iii>VaribleName = JAVA_HOME
VariableValue = c:\ProgramFiles\Java\jdk*

iv>VariableName = CATALINA_HOME
VariableValue = c:\ProgramFiles\ApacheSoftwareFoundation\Tomcat*
STEP 3:

Now generate a key..
Open command prompt
c:\ProgarmFiles\Java\Jdk*\bin >keytool -genkey -alias Tomcat -keyalg RSA
It will prompt for keystore password :Enter any password and then foolow the instructions and finally enter yes and press enter.
Now a .keystore file will be generated in the user profile folder under c:\Document and settings\user
STEP 4:
Edit the server.xml file from the following location
c:\programFiles\ApacheSoftwareFoundation\Tomcat*\conf\Server.xml
Uncomment the line that starts with Connector = 8443
and also add the following
keystoreFile="Path were keystore file is generated"
keystorePass="Password that you entered while generating key"
STEP 5:
now start the apache web server and try
https://localhost:8443/

It should work

Thursday, April 8, 2010

How to add a linux machine to Windows domain

This Article shows how to add a Ubuntu machine to Windows Domain
Here we are going to use a open source Tool (Likewise).
STEP1:
Install the package
#apt-get install likewise-open5
STEP 2:
Go to Terminal
#domainjoin-cli join domainname Administrator
Example:
domainjoin-cli join antonysunny.com Administrator
In the above example domainname = antonysunny.com
It will prompt for Admin Password which has permission to join to domain
Make sure the system gets restarted
STEP 3:
Inorder to login Enter the username as domain\user
Example:ANTONYSUNNY\user
In the above example ANTONYSUNNY is the NETBIOS name for the domain name

Done
TROUBLESHOOTING:
->Inorder to make likewise-open use a default domain add the following to /etc/samba/lwiauthd.conf
winbind use default domain = yes
->Restart /etc/init.d/likewise-open restart
->Inorder to unjoin from domain Go to terminal
#domainjoin-cli leave

Wednesday, March 31, 2010

How to mount Vmware virtual disk(.vmdk) in Windows XP

STEP 1:
Download Vmware mount utility from Vmware website or from any other source
Install the Utility following the onscreen instructions
STEP 2:
Now in your Windows machine Go to Command prompt
Type cd "\Program Files\Vmware\Vmware DiskMount Utility"
STEP 3:
Now execute the following command
vmware-mount j: "D:\WindowsXpProfessional\WindowsXpProfessional.vmdk"

The above commands the .vmdk to Drive j

Or Try using Vmware Disk mount GUI a free utility

Done..

Fix Grub in Fedora

Reinstalling grub
STEP 1:
->Boot using installation disc
->choose rescue mode
->The system existing will be mounted on /mnt/sysimage
STEP 2:
Now execute the following commands
#chroot /mnt/sysimage
#grub-install /dev/sda //Assuming fedora is installed in /dev/sda

Enjoy!!!!

Tuesday, March 30, 2010

How to access windows share using Linux

STEP 1:
Share a folder in Windows and give permissions for a user
In my Example username=test and password=test@123
STEP 2:
Use the mount command as follows
#mount -t cifs //ipaddress of windows machine/Shared folder /mnt -o username=test,password=test@123
Above command mounts the shared folder to /mnt
STEP 3:
Now access the shared folder using cd /mnt ; ls -l

Friday, March 26, 2010

DHCP Server Configuration in UBUNTU

STEP 1:
Install the dhcp package
#apt-get install dhcp3-server
STEP 2:
DHCP server can be configured in two ways
i>Address Pool
ii>Mac Address

STEP 3:

Inorder to configure DHCP server 2 files has to be edited

i>/etc/default/dhcp3-server

ii>/etc/dhcp3/dhcpd.conf

Editing /etc/default/dhcp3-server

This file is edited inorder to show which network interface is been used for DHCP listening

Example:

Find this line INTERACES = "eth0" which will be default,Incase if your using different interface like eth1 or eth2 change eth0 to the interface we are using.

STEP 4:

How to edit /etc/dhcp3/dhcpd.conf

Using Address Pool method

default-lease-time 600;

max-lease-time 7200;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.1.255;

option routers 192.168.1.254 ; //default gateway being used

option domain-name-servers 192.168.1.1,192.168.1.2;

option domain-name "

subnet 192.168.1.0 netmask 255.255.255.0 {

192.168.1.10 192.168.1.200;

}

Using MAC Address method

This method can be used to reserve fixed IP address for machines depending on mac address

Add the following to the above mentioned

host server1{

hardware ethernet

fixed-address

}

STEP 5:

Restart DHCP service

#/etc/init.d/dhcp3-server restart

Also start the networking service

#/etc/init.d/networking restart


Thursday, March 25, 2010

How to set up linux as a ROUTER

Setting up Linux machine as a ROUTER
STEP 1:

Consider 2 interfaces: eth0 and eth1
eth0 //connecting to internet //Static IP assigned by ISP
eth1 //connexcting to LAN //Assigned Private ip 192.168.XXX.XXX
STEP 2:
Turn on ip forwarding
Edit /etc/sysctl.conf
Add the following
net.ipv4.ip_forward = 1
STEP 3:
Restart Network services by the following
#service network restart
STEP 4:
Set up IP forwarding and Masqerading by the following:
#iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
#iptables --append FORWARD --in-interface eth1 -j ACCEPT

STEP 4:
Assign the ipaddress of eth1 as the default gateway for the clients