Wednesday, October 31, 2012

DATE AND TIME SETTINGS


SET DATE AND TIME

date -s "2 OCT 2006 18:00:00"


You can also simplify format using following syntax:
# date +%Y%m%d -s "20081128"


Linux Set Time

 # date +%T -s "10:13:13"


SET TIME TO CMOS TIME OR SET SYSTEMHARDWARE TIME TO SYSTEM TIME


hwclock --systohc
This will set the hardware clock to the current system time. You can also do the inverse:
hwclock --hctosys
To display what date/time the hardware clock is currently set to:
hwclock --show

Tuesday, October 30, 2012

Solution: kernel rebuild on redhat



Boot system from Linux CD and give linux rescue command on boot screen
linux rescue
Select language to English
Select language to English
Select Keyboard layout to US
Select Keyboard layout to US
Press enter on continue and it will search for linux on hard disk

We don't need networking for this operation so select no

Rescue mode will mount system image under the/mnt/sysimage folder press ok


now change chroot to/mnt/sysimage

mkdir /a        (creat /a dir)

cat /proc/sys/dev/cdrom/info :
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

    drive name:             hdc
    drive speed:            1
    drive # of slots:       1
    Can close tray:         1
    Can open tray:          1
    Can lock tray:          1
    Can change speed:       1
    Can select disk:        0

mount /dev/hdc /a       (so that cdrom is mount to /a)

cd  /a
rpm -ivh kernel-(whatever the kernel version)
 

 
Now reboot the system and remove Linux CD from CDROM



Have fun!!!


[1]    Install VNC Server to operate Server with GUI remotely from Windows client.
[root@dlp ~]# yum -y install tigervnc-server
[root@dlp ~]# su - cent                                                 # switch to a user you'd like to config VNC

[cent@dlp ~]$ vncpasswd                                            # set VNC password

Password:                                                                   # input

Verify:                                                                            # confirm

[cent@dlp ~]$vncserver :1                                                                                # start

xauth: creating new authority file /home/cent/.Xauthority
New 'dlp.server.world:1 (cent)' desktop is dlp.server.world:1
Creating default startup script /home/cent/.vnc/xstartup
Starting applications specified in /home/cent/.vnc/xstartup
Log file is /home/cent/.vnc/dlp.server.world:1.log
[cent@dlp ~]$ vncserver -kill :1                                        # stop

Killing Xvnc process ID 2187
[cent@dlp ~]$ vi /home/cent/.vnc/xstartup     #twm & # last line: make it comment

exec gnome-session &                                 # run Ghome
# run with diplay number '1', screen resolution '800x600', color depth '24'

[cent@dlp ~]$ vncserver :1 -geometry 800x600 -depth 24                                   


and restart the vncserver . so that the vncserver will open in fullview in client system.                 




[2]    Install VNC viewer on client computer next. Download from the site below to install.
http://www.realvnc.com/products/free/4.1/download.html
Start VNC viewer after installing. Then following scrren is shown. Input [(Server's hostname or IP address):(display number)] like following example.

[3]    Password is required. Input VNC password you set in the section [1].

[4]    Just connected.