Archive for the 'Linux Support' Category

SBDavid

How to install VNC Server.

How to install VNC Server.

For RHEL5 or Centos

yum groupinstall “KDE (K Desktop Environment)”
yum install vncserver

Edit the lines below in the file /etc/sysconfig/vncservers and add a user “test1″
(user should be a valid user).

VNCSERVERS=”1:test1″
VNCSERVERARGS[1]=”-geometry 1024×768 -depth 16″

To add more users, just add the lines in the next box below for second user. You can continue with more number of users.
Now the port for user one is 5900+1=5901, The port for user two is 5900+2=5902 and so on.

VNCSERVERS=”2:newuser”
VNCSERVERARGS[2]=”-geometry 1024×768 -depth 16″

Add a password

$ vncpasswd
Password:
Verify:

Edit the startup script

$ vi ~/.vnc/xstartup

# Uncomment the following two lines for normal desktop:

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

/etc/X11/xinit/xinitrc: Bourne-Again shell script text executable

Go for Reboot. When the server is back type the command below to start the VNC server.

$ vncserver :1

Connect to VNC server from your local machine.

(Dont forge to allow 5901 in your firewall.)

$ vncviewer IP:5901

Now you can login using the login created previously.

Using SFTP if the default ssh port is changed

Usually if the SFTP is enabled in your server, it will try to use the default SSH port (port 22) even though the SSH service may be running on another SSH port (ie: port 2222).
In this case, the SSH port is running on 2222.
Since SFTP will attempt to connect to port 22, you will have to specify a non-default port for SSH connections so SFTP can issue a proper connection to the remote destination. You can accomplish this by running the following command.

#sftp -oPort=2222 root@Server-IP-address

How to enable IPTABLES support in Linux Kernel

You need to recompile kernel to enable IPTABLES support.

Get into the kernel source directory:

# cd /usr/local/src/kernel [download kernel source from kernel.org]
# Copy your current running kernel config.
# make menuconfig

Networking >> Networking options >> Network packet filtering (replaces ipchains) >> IP: Net Filter configurationS >> IP Tables support

# make
# make modules
# make modules_install
# make install

Move to /boot/grub and then modify your current grub config to load the new kernel.

SBDavid

Reinstall Grub Boot Loader

Reinstall Grub Boot Loader

GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.

You can re-install grub by linux rescue method:

1) Put the 1st bootable linux cd on cdrom.
2) Reboot the system.
3) At boot prompt type “linux rescue” without quotes.
4) You will get a shell prompt.
5) Give command chroot /mnt/sysimage
6) Run: grub-install /dev/hda (primary master)

grub-install /dev/hda

7) Reboot the system

SBDavid

How to mount a linux LVM volume

How to mount a linux LVM volume

You can check the disk that is using the LVM volume by using the command fdisk -l

# fdisk -l

You can run the command “pvs” to get the volume group.

# pvs

You can run lvdisplay /dev/”volume group”
This will display the list of logical volumes in the volume group

#lvdisplay /dev/VolGroup00

The volume group here is VolGroup00

# Mount the partition

mount /dev/VolGroup00/LogVol00 /home

The Logical volume here is LogVol00

« Prev - Next »