Thursday, January 13, 2011

Configure Services in CentOs5/RHEL5

1) List All services
listservices
2)  List Running services at Runlevel 3
listservices34
3) Start service
startservices
4)      Stop service
stopservice
5)   Start service on different RunLevel
stopservice
6)  Restart services
restartservice
7)  Add services
addservice
8 ) Remove Services
deleteservice

Solaris and Linux Runlevel

Default Linux Run Level: Total 7 Run Level
RunLevel 0: Halt System - To shutdown the system
RunLevel 1: Single user mode
RunLevel 2: Basic multi user mode without NFS
RunLevel 3: Full multi user mode (text based)
RunLevel 4: unused
RunLevel 5: Multi user mode with Graphical User Interface
RunLevel 6: Reboot System

Default Solaris Run Level: Total 8 Run Level
RunLevel S: Single user state (useful for recovery)
RunLevel 0: Access Sun Firmware (ok> prompt)
RunLevel 1: System administrator mode
RunLevel 2: Multi-user w/o NFS
RunLevel 3: Multi-user with NFS
RunLevel 4: Unused
RunLevel 5: Completely shutdown the host (like performing a power-off)
RunLevel 6: Reboot but depend upon initdefault entry in /etc/inittab

Call to undefined function: mysql_connect()

Solutions:
Solution 1)   Remove php5-mysql with “apt-get remove php5-mysql”  and install it again or
Solution 2)   Check your php.ini file to ensure it’s including the mysql.so library (extension=mysql.so)  or
Solution 3)   Type “dpkg-reconfigure php5-mysql” (For ubuntu and debian users)

Tuesday, January 4, 2011

Vncserver configuration file to start GNOME


The configuration is kept in the file /home/userxx/.vnc/xstartup I edited this file so that I can start the server with gnome. My file looks exactly like below.
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
gnome-session &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
# xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &

sanjay's shared items

My Blog List