Category: Linux Administration

install rar unrar in centos

install rar unrar in centos

Download the package : wget http://dag.wieers.com/packages/unrar/unrar-3.6.2-1.el4.rf.i386.rpm Install #rpm -Uvh unrar-<tab> #unrar e -kb filename.rar

Archiving and compressing tuotorials tar and gzip

Archiving and compressing tuotorials tar and gzip

Creating a Tarball with compression: tar -czvf tarball.tar.gz folder/ Extracting a Tarball: tar -zxvf tarball.tar.gz Viewing the contents of a tarball tar -tvf tarball.tar.gz Extracting a single file from tarball tar -zxvf  tarball.tar.gz folder/filename...

ftp access to files outside base directory

ftp access to files outside base directory

It is possible to grant ftp access to files outside the home directory of the user. #vi /etc/vsftpd/vsftpd.conf Uncomment or add the following : chroot_local_user=YES Now create a directory to mount the folder to...

Zabbix Tutorials

Zabbix Tutorials

Zabbix Monitor Postfix queue: UserParameter=postfix.queue,postqueue -p | find /var/spool/postfix/{deferred,active,maildrop}/ -type f | wc -l [Note: This will have permission issues ] The following one is even better: UserParameter=postfix.queue,mailq | grep -v "Mail queue is...

Regular Expressions

Regular Expressions

Period (.) = Match any single character Caret (^) = Match the begining of the line Dollar ($) = Match the end of the line […] = Match a choice of characters eg. [abcABC]...

Useful Find Commands

Useful Find Commands

Find Files by name: find /path -name filename find /tmp /home . $HOME -name Find Files Larger than 1Gb find /path -type f -size +1048576 Find with wildcard: find / -name file\*name Find and...

Adding a Start/Stop Script to chkconfig

Adding a Start/Stop Script to chkconfig

In order to add a script to be manageable by chkconfig, you should create the /etc/init.d/example script that has the ability to start and stop script. Now put the following two comments around the...

Nice and Renice

Nice and Renice

Nice command can be used to start a process with low/high priority: nice -n command value = -20 for highest priority and 20 for lowest priority To reset the priority of a running process,...

Sample Kickstart file for Redhat / Centos

Sample Kickstart file for Redhat / Centos

#platform=x86, AMD64, or Intel EM64T # System authorization information auth –useshadow –enablemd5 # System bootloader configuration bootloader –location=mbr –password=grub # Clear the Master Boot Record zerombr # Partition clearing information clearpart –all –initlabel #...