LinuxHelps.com

A blog for Linux Lovers.

24
May 2009
Posted in Linux Helps by sibu at 6:34 pm | No Comments »

rpm -ivh package.rpm install a rpm package
rpm -ivh –nodeps package.rpm install a rpm package ignoring dependencies requests
rpm -U package.rpm upgrade a rpm package without changing configuration files
rpm -F package.rpm upgrade a rpm package only if it is already installed
rpm -e package_name.rpm remove a rpm package
rpm -qa show all rpm packages installed on the system
rpm [...]

24
May 2009
Posted in Linux Helps by sibu at 6:30 pm | No Comments »

find  / -name file1 - search file and directory into root filesystem from ‘/’
find / -user user1 - search files and directories belonging to ‘user1′
find /home/user1 -name \*.bin - search files with ‘. bin’ extension within directory ‘/ home/user1′
find /usr/bin -type f -atime +100 - search binary files are not used in the last [...]

24
May 2009
Posted in Linux Helps by sibu at 6:25 pm | No Comments »

Users and Groups
groupadd group_name create a new group
groupdel group_name delete a group
groupmod -n new_group_name old_group_name rename a group
useradd -c “Name Surname ” -g admin -d /home/user1 -s /bin/bash user1 create a new user belongs “admin” group
useradd user1 create a new user
userdel -r user1 delete a user ( ‘-r’ eliminates home directory)
usermod -c “User FTP” -g [...]

There are two ways you can check who is currently logged into WHM or cPanel.
1) Log in to the server via SSH and run ps aux | grep whostmgrd to see who’s currently active in WHM, and ps aux | grep cpaneld to see who’s currently active in cPanel. If the users have been [...]

There is a slight difference between the commands - “mount” and “mount -a”.
1. When you type “mount”, it will display the output of the file “/etc/mtab“.
For example,
# mount
/dev/sda5 on / type ext3 (rw,usrquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 [...]

24
May 2009

If you receive the following error,
Invalid command ‘BytesLog’, perhaps mis-spelled or defined by a module not included in the server configuration
while restarting apache in cPanel servers , do the following steps.
# cd /usr/local/cpanel/apache
# /usr/local/apache/bin/apxs -iac mod_log_bytes.c
# /etc/rc.d/init.d/httpd restart
It will install the missing module and restart apache

24
May 2009
Posted in Linux Administration by sibu at 4:55 pm | No Comments »

A core file is created when a program terminates unexpectedly, due to a bug, or a violation of the operating system’s or hardware’s protection mechanisms. The operating system kills the program and creates a core file that programmers can use to figure out what went wrong. It contains a detailed description of the state that [...]

24
May 2009

Sometimes apache will fail to start. It will show the following error message in apache error logs:
Unable to open logs
This is because of the low number of file descriptors. Check the current limit of file descriptors in the file /proc/sys/fs/file-max:
# cat /proc/sys/fs/file-max
1024
If fs.file-max is quite small (several thousands or so), it should be changed to [...]

24
May 2009

Edit the /etc/my.cnf file and look for this line:
skip-innodb
and comment it out:
#skip-innodb
Add the following entry in the /etc/my.cnf file
default-storage_engine = InnoDB
Save the file, and restart mysql
/etc/rc.d/init.d/mysqld restart
You can use the following command to check the “storage engine” used in the server.
mysqladmin variables | grep storage_engine
You will see the storage engine as “InnoDB”.

# mysqladmin variables [...]

24
May 2009

To hide the information, add the following two apache directives in Apache configuration file                    /etc/httpd/conf/httpd.conf
ServerTokens ProductOnly
ServerSignature Off
Now you need to restart your web server using the following command
#/etc/init.d/httpd restart
The ServerSignature appears on the bottom of pages generated by apache such as 404 pages, directory listings, etc.
The ServerTokens directive is used to determine what Apache [...]