Archive for July, 2010

SBDavid

VNC ( Virtual Network Computing )

VNC ( Virtual Network Computing )

Installing the required packages

Make sure to install a window manager in order to get a normal GUI desktop.

yum groupinstall “GNOME Desktop Environment”

to install the Gnome Desktop and requirements, for example.

The server package is called ‘vnc-server’. Run the command

rpm -q vnc-server

VNC is used to display an X windows session running on another computer. Unlike a remote X connection, the xserver is running on the remote computer, not on your local workstation. Your workstation ( Linux or Windows ) is only displaying a copy of the display ( real or virtual ) that is running on the remote machine.

If the server is not installed, install it with the command:

yum install vnc-server.

The client program is ‘vnc’. You can use the command

yum install vnc

Apache Security: Hide Apache Web Server Version number

Apache Web Server Version number with ServerSignature and ServerTokens directives

Open your httpd.conf file using text editor such as vi:

vi httpd.conf

There are two config directives that controls Apache version. The ServerSignature directive adds a line containing the Apache HTTP Server server version and the ServerName to any server-generated documents, such as error messages sent back to clients. ServerSignature is set to on by default. The ServerTokens directive controls whether Server response header field which is sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules.

Append/modify config directive as follows:

ServerSignature Off
ServerTokens Prod

Save and close the file. Restart Apache web server:

/etc/init.d/httpd restart
SBDavid

Disabling services in RPM distros

Disabling services in RPM distros

There are several services running by default that may be safely disabled. First, we’ll generate a list of services that are enabled at runlevel 3.

chkconfig –list | awk ‘/3:on/ { print $1 }’

We will disable the following services

gpm kudzu netfs anacron atd apmd pcmcia nfslock isdn autofs portmap rhnsd

for SERVICE in gpm kudzu netfs anacron atd apmd pcmcia nfslock isdn autofs portmap rhnsd
do
/sbin/chkconfig $SERVICE off
/sbin/service $SERVICE stop
done

How to Change the Name of RVSiteBuilder in cPanel

If you are using the x3 theme. If that’s not the case, substitute accordingly.

Edit: /usr/local/cpanel/base/frontend/x3/dynamicui/dynamicui_rvsitebuilder.conf

Change the text as follows:

itemorder=>40,version=>1.0,itemdesc=>{Your Text},description=>{Your Text}
SBDavid

Useful SMART Commands

Useful SMART Commands

Cpanel script is not very helpful, but you can certainly use these commands for predict and analyze real drive issues:

smartctl -a /dev/hda smartctl -a -d ata /dev/sda <—- for SATA Drives

smartctl -t short /dev/sdb This runs a short test on the drive, you then view the results with the above commands.

Note: you can even just schedule these to run as a cron job and pipe the output to | mail you@youremail.com to automate this.

There are also various scripts you can customize for smartd and smartctl, these scripts are usually in:
There are example scripts included with smartmontools. These are usually located in a location like:

/usr/share/doc/smartmontools-5.33/examplescripts

Next »