ABHIONLINUX
Site useful for linux administration and web hosting

2009/12/23

Installing fantastico on a cPanel Server

Here are the steps:-
============

Login to server WHM >> Plugins >> Fantastico De Luxe WHM Admin >> Click here >> Select a version from the drop down menu >> Follow the remaining installation steps, using the default information.

If the Fantastico install option is not available,then we have to download Fantastico manually onto our server.

=========================================
1) Login to the server via ssh

2) Change the folder using the command:

[root@localhost ~]#cd /usr/local/cpanel/whostmgr/docroot/cgi

3) Download the Fantastico install file using the command

[root@localhost ~]#wget http://www.netenberg.com/files/free/fantastico_whm_admin.tgz

4) Extract the install file using the command:

[root@localhost ~]#tar -xzpf fantastico_whm_admin.tgz

5) Remove the install file using the command:

[root@localhost ~]#rm -rf fantastico_whm_admin.tgz

6) Log out of the SSH connection.

7) log back into cPanel.

8)Go through Plugins >> Fantastico De Luxe WHM Admin

9) Continue the install using the above mentioned steps.
========================================

Fantastico Showing Blank Page

Fantastico is showing blank page after installation.New installation was also giving the blank page.

FIX:-
====
Change the following on config.php file.

#define(”PLUGIN_ROOTDIR”,”/tmp”);
define(”PLUGIN_ROOTDIR”,”plugins”);

Cause:-
The server is PHP-SUEXEC enabled so the plugin_rootdir should be given
as “plugins” in config.php file.

Fix for memory limit error in joomla site

You could see memory limit error on joomla sites. Even though you increase memory limit on php.ini file, it will not solve.

In Apache error logs you can find the following:-

===================================================
[Wed Feb 6 05:56:26 2008] [error] (22)Invalid argument: setrlimit: failed to set memory limit
[Wed Feb 7 09:48:26 2008] [error] (22)Invalid argument: setrlimit: failed to set memory limit
===================================================
Fix:-
Remove the following entries from apache configuration file.

1. RLimitMEM 519640064
2. RLimitCPU 240

Restart apache after this. This will fix the issue

Error "This application is currently not available” in fantastico

The user is getting the following error while accessing fantastico :
This application is currently not available

Fix:-
====
You have to make register_global = On in /usr/local/cpanel/3rdparty/etc/php.ini

“cannot connect to mysql ” in fantastico

If you are getting an error like “cannot connect to mysql ” in fantastico
then check if the soft link is there in /tmp. If there is no softlink.Issue the following command:-

[root@bigboy ~]#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

Configuration files in cpanel server

Apache:-

/usr/local/apache/ bin->Apache binaries are stored here
/usr/local/apache/conf–>configuration files – httpd.conf
/usr/local/apache/cgi-bin->Cgi bin directory
/usr/local/apache/domlogs–>domain log files are stored here
/usr/local/apache/htdocs->default doucument root of the server
/usr/local/apache/include–>contains header files
/usr/local/apache/modules–>Contains shared object (.so) files
/usr/local/apache/logs–>apache logs contains access_log, errorlog and suexec_log

Exim:-

->/etc/exim.conf – exim configuration file
->/etc/localdomains – list of the domains which are allowed to relay mail
->/var/log/exim_mainlog – exim main log file
-> /var/log/exim_rejectlog – Contains the logs for the rejected mails.
->/var/log/exim_paniclog – Contains exim errors
->/var/spool/exim/input-Mail queue for exim
->/etc/valiases/domainname.com- Email forwarders and catchall.
->/etc/vfilters/domainname.com-Email filter
->/home/username/etc/domainname/passwd-POP authentication file

ProFTPD:-

-> /etc/proftpd-configuration file
->/var/log/messages-ftp logs
->/etc/proftpd/username- All the ftp accounts and password will be listed here.

Pure-FTPD:-

->/etc/pure-ftpd.conf-Pureftpd configuration file.
->/etc/pure-ftpd/ip-address-document root for the anonymous ftp

Mysql:-

/etc/my.cnf->configuration file
/root/.my.cnf->Contains the root password
/var/lib/mysql –Data directory which contains all the MySql databases.

SSHD:-

/etc/ssh/sshd_config->configuarton file
/var/log/messages-> Log file
/etc/banner->Contains the banner to be displayed

Named:-

/etc/named.conf->Main configuration file
/var/named->Directory which contains the db records
/var/log/messages-> Log file

Cpanel Configuration files:-

/usr/local/cpanel-/bin –> cpanel binaries
/usr/local/cpanel/cgi-sys –> Contains cgi files like formmail.cgi etc
/usr/local/cpanel-/base –> phpmyadmin, squirrelmail, skins, webmail etc
/usr/local/cpanel-/logs -> cpanel access log, error log etc
/usr/local/cpanel/ 3rdparty/ –Fantastico,mailman files are located here
/usr/local/cpanel-/addons –> AdvancedGuestBook, phpBB etc
/var/cpanel/users/username – >cpanel user file
/var/cpanel/cpanel.config –> cpanel configuration file.
/var/cpanel/resellers –> Reseller configuration files.
/var/log/dcpumon –> Top log process
/etc/wwwacct.conf –> account creation default file
/etc/cpupdate.conf – >cPanel Updation Config file
/etc/cpbackup.conf –> Backup configuration file
/var/cpanel/bandwidth –> Contains bandwidth usage details of the domains.

Name server and IP configuration files:-

/etc/sysconfig/network –Network configuration files
/etc/hosts->Contains hostname of the server
/etc/resolv.conf –> Resolver Configuration
/etc/nameserverips –>Contains the name server IP details
/etc/ips –>List of all the ip addresses except the shared ip on the server.
/etc/ipaddrpool – >ip addresses which are free
/etc/ips.dnsmaster –> name server ips

How to setup Wild Card Entry For a Domain

Edit the DNS zone file:-

Open the zone db file corresponding to the domain (For eg, domain.com)
[root@localhost ~]#vi /var/named/domain.com.db
Add the following line:-
================
* IN A IPaddress
=================
save and exit
restart named

[root@localhost ~]# /etc/init.d/named restart

Edit httpd conf file:-

[root@localhost ~]#vi /usr/local/apache/conf/httpd.conf

Add the following entry:-

===================
server alias *.domain.com
===================

save and exit

restart httpd

How to check DNS zone file configuration for errors

You can use the named-checkzone command to check the zone db for errors:-

[root@server]# named-checkzone abhionlinux.com /var/named/abhionlinux.com.db
Output:-
zone abhionlinux.com/IN: loaded serial 12
OK


or

[root@server]# named-checkconf /etc/named.conf

Install YUM in the server

for file in \
gmp-4.1.4-10.el5.x86_64.rpm \
readline-5.1-1.1.x86_64.rpm \
python-2.4.3-21.el5.x86_64.rpm \
libxml2-2.6.26-2.1.2.1.x86_64.rpm \
libxml2-python-2.6.26-2.1.2.1.x86_64.rpm \
expat-1.95.8-8.2.1.x86_64.rpm \
python-elementtree-1.2.6-5.x86_64.rpm \
sqlite-3.3.6-2.x86_64.rpm \
python-sqlite-1.1.7-1.2.1.x86_64.rpm \
elfutils-0.125-3.el5.x86_64.rpm \
rpm-python-4.4.2-48.el5.x86_64.rpm \
m2crypto-0.16-6.el5.2.x86_64.rpm \
python-urlgrabber-3.1.0-2.noarch.rpm \
yum-3.2.8-9.el5.centos.1.noarch.rpm
do rpm -Uvh http://mirror.centos.org/centos-5/5.2/os/x86_64/CentOS/$file;
done

DB_RUNRECOVERY: Fatal error, run database recovery

If you are getting error message like this when you are trying to do an yum update.

Error message like ->
============================================
ror: error(-3097 getting "system-config-display.mo" records from Basenames index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-3097 from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-3097 getting "system-config-display.mo" records from Basenames index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-3097 from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-3097 getting "system-config-display.mo" records from Basenames index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-3097 from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-3097 getting "system-config-display.mo" records from Basenames index
************************************************** *****

try the following steps.

rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
rpm -Va
yum update

2009/12/22

How to increase the size of /tmp partition in Linux?

Proceed with the given steps:-
========================
1)Stop MySql service and process kill the tailwatchd process.

[root@localhost ~]# /etc/init.d/mysqld stop
Stopping MySQL: [ OK ]
[root@localhost ~]#pstree -p | grep tailwatchd
Find the tailwatchd process id and kill it
[root@localhost ~]# kill -9 2522

2)Take a backup of /tmp as /tmp.bak
[root@localhost ~]#cp -prf /tmp /tmp.bak

3)Create a 2GB file in the avaliable freespace

==============================
[root@localhost dev]# dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 73.6908 seconds, 29.1 MB/s
==============================

[root@localhost dev]# du -sch /usr/tmpDSK
2.1G /usr/tmpDSK
2.1G total

4)Assign ext3 filesystem to the file
====================================
[root@localhost dev]# mkfs -t ext3 /usr/tmpDSK
mke2fs 1.39 (29-May-2006)
/usr/tmpDSK is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
====================================
5) Check the file system type:-

[root@localhost dev]# file /usr/tmpDSK

/usr/tmpDSK: Linux rev 1.0 ext3 filesystem data (large files)
Note:-
=====
You may also use the following comands for making ext3 file system on a file:
[root@localhost dev]#mkfs.ext3 /usr/tmpDSK
[root@localhost dev]#mke2fs /usr/tmpDSK

6)Unmount /tmp partition

[root@localhost dev]#umount /tmp

7))Mount the new /tmp filesystem with noexec

[root@localhost dev]#mount -o loop,noexec,nosuid,rw /usr/tmpDSK /tmp

8) Set the correct permission for /tmp

[root@localhost dev]# install -d –mode=1777 /tmp
[root@localhost dev]# ls -ld /tmp
drwxrwxrwt 3 root root 4096 Feb 6 08:42 /tmp
( you may use the command chmod 1777 /tmp for doing the same )
==========================

[root@localhost dev]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda9 28G 6.4G 20G 25% /
/dev/sda8 99M 10M 84M 11% /boot
tmpfs 500M 0 500M 0% /dev/shm
/usr/tmpDSK 2.0G 68M 1.9G 4% /tmp
==========================
7)Restore the content of old /tmp.bkp directory

[root@localhost dev]# cp -rpf /tmp.bak/* /tmp

8) Restart the mysql and tailwathchd services.

[root@localhost dev]# /etc/init.d/mysql start
[root@localhost dev]# /scripts/restartsrv_tailwatchd

9)Edit the fstab and replace /tmp entry line with :-
=========================================
/usr/tmpDSK /tmp ext3 loop,noexec,nosuid,rw 0 0=========================================
10) Mount all filesystems

[root@localhost dev]#mount -a

Check it now:-
============================
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda9 28G 6.4G 20G 25% /
/dev/sda8 99M 10M 84M 11% /boot
tmpfs 500M 0 500M 0% /dev/shm
/usr/tmpDSK 2.0G 68M 1.9G 4% /tmp
============================
Done.

How to prevent the Syn flood attack?

1)Enable SYN cookies mechanism in the server.

SYN cookies mechanism can be enabled in the following way:

[root@server src]## echo 1 > /proc/sys/net/ipv4/tcp_syncookies

2)Increase the backlog queue:-

A tcp_max_backlog variable_defines how many half-open connections can be kept by the backlog queue.

change the default size of the backlog queue to 2048 by executing the the sysctl command:

[root@server src]# sysctl -w net.ipv4.tcp_max_syn_backlog="2048"

Getting custom php.ini working on php-cgi

1, Copy the servers default php.ini to your home directory

2, Make the following directory in user home directoy and chown to user:user
cgi-bin

3, Create a file php.cgi in cgi-bin with the following content
#!/bin/sh
exec /usr/local/cpanel/cgi-sys/php5 -c /home/user/public_html/

4, Chmod +x php.cgi and chown the file to user:user.

5, Add the following in the .htaccess.

Action application/x-httpd-php5 /cgi-bin/php.cgi

Installing a custom module in cpanel server

To install a custom module:

1. Download and unzip it into /var/cpanel/easy/apache/custom_opt_mods/.
2. When logged into your server as root, you can install any module listed below by running the following commands. Be sure to replace $NAME.tar.gz with the filename of the module you wish to download:

wget http://easyapache.cpanel.net/optmods/$NAME.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf $NAME.tar.gz

For example:
If you want to install mod_python

cd /var/cpanel/easy/apache/custom_opt_mods

wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_python.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_python.tar.gz

Reference : http://docs.cpanel.net/twiki/bin/view/EasyApache3/CustomMods

2009/12/17

Install Wine on CentOS 5

Trying to install wine using the usual yum command but here is what it says when giving the following command.

shell>> yum install wine
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* base: centose.centos.org
* updates: centosj.centos.org
* addons: centosh3.centos.org
* extras: centose-msync-dvd.centos.org
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
No package wine available.
Nothing to do

Well the reason is Wine software is not a part of standard CentOS. There is a section on 3rd party repositories called RPMForge. So we will proceed installing the Repositories.

1.) You should make sure that you have Priorities installed

yum-priorities is available in the CentOS 5 repositories:

yum install yum-priorities

Plugins are enabled in CentOS 5 by default

Make sure that yum-priorities is enabled by editing the /etc/yum/pluginconf.d/priorities.conf file, and ensuring that it contains the following lines:

[main]
enabled=1

Download the rpmforge-release package. Choose one of the two links below, depending on your architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

for i386 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Install DAG’s GPG key

rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Verify the package you have downloaded

rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm

Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the package and trust Dag then it should be safe.

Install the package

rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys. At this point, you can set the priority of the RPMForge repository, and also of the CentOS repositories if you have not done so yet.

Test with this command:

yum check-updateIt should output these two lines:

Loading “priorities” plugin

76 packages excluded due to repository priority protectionsThe number above may differ, but there should be several packages shown as being excluded.

If so then it looks like things are working so try installing something like this

yum -–enablerepo=rpmforge install wine

Thats all Wine is installed.
shell>> which wine
/usr/bin/wine

2009/12/16

Exim Commands

Check emails in mail queue

root@server [~]# exim -bp

Count number of emails in mail queue

root@server [~]# exim -bpc

Count number of frozen emails in mail queue

root@server [~]# exim -bp | grep frozen | wc -l

Delete forzen emails from the mail queue

exim -bp | awk ‘$6~”frozen” { print $3 }’ | xargs exim -Mrm

Count emails for an email account/domain

exim -bp | grep username@domain.com | wc -l

Delete emails for an email account

exim -bp | grep username@domain.com | awk ‘{print $3}’ | xargs exim -Mrm ;

Delete emails sent through scripts

exim -bp | grep “<>” | awk {’print $3}’ | xargs exim -Mrm

Count number of emails in queue for a domain/email account

exim -bp | tr ‘\n’ + | sed -e “s/++/=/g” | tr -d + | tr = ‘\n’ | awk ‘{print $5}’ | sort -n | uniq -c | sort -n

Delete emails for root

exim -bp | grep root@server.hostname.com | awk ‘{print $3}’ | xargs exim -Mrm ;

Check file and directory permissions under present working directory

Below commands can be used to check file and diretcory permissions under the present working diretcory (pwd)

* Check files with permission 755

root@master [~]# find $x -type f -perm 755

* Check files with permission 777

root@master [~]# find $x -type f -perm 777

* Check diretcory with permissions 777

root@master [~]# find $x -type d -perm 777

* Check diretcory with permissions 000

root@master [~]# find $x -type d -perm 000

You can change the permissions to the value you you want to search.

SoftException in Application.cpp:303 UID of script is small than min_uid

If you see the below error in your logs then that means that the script is owned by a user (generally root) instead of the actual user.

SoftException in Application.cpp:303: UID of script “/location/path/.php” is smaller than min_uid

You can receive similar error when you have a wrong group name, in this case instead of UID, you will have GID in the error.

To fix this issue, make sure you have correct user and group ownership for the file that you are trying to access. Ownership can be changed using the below:

chown usernmame:groupname filename.php

2009/12/15

PHP Parse error: syntax error, unexpected T_STRING

If you receive such error in the error logs or in the browser please follow the steps below.

For non suexec/suphp servers

Create a htaccess file under the diretcory and add the code below

php_flag short_open_tag X

For suexec/suphp servers

Copy the server’s php.ini file under the diretcory and find for short_open_tag. Open the php.ini file and change it to

short_open_tag = X

Note :: The solution is valid only if you find the error due to line in your php/html file.
HTML Code:

xml version=”1.0″ encoding=”iso-8859-1″
OR
xml version=”1.0″ encoding=”UTF-8″

how to disable htaccess for domain account

You can disable .htaccess for a particular domain by editing the /etc/httpd/conf/httpd.conf file & following the below mentioned steps:

Open the /etc/httpd/conf/httpd.conf file.
Search for the “AllowOverride None” string.

directory “/”
AllowOverride None
Directory

Append it by:

directory “/home/username/public_html”
AllowOverride None
Directory

Such that it looks like:

directory “/"
AllowOverride None
Directory

directory “/home/username/public_html”
AllowOverride None
Directory

Restart the httpd/apache service on the server

This would disable the .htaccess for that particular account/domain.

Encrpt a file using vi editor

If you want to encrypt a file with vi editor. You can use the option

#] vi -x filename.txt

This will ask a encryption key.

If you try to access file using vi, it will ask for key.

2009/12/13

Unabe to start mysql "MySQL manager or server PID file could not be found!"

Don’t Panic if you get this error when you start, restart or stop your mysql engine.
Try these steps, This will fix your issue.

# ps -ef |grep mysql|awk '{print $2}'|xargs kill -9
# vi /tmp/mysql.sock
# chown -R mysql:mysql mysql.sock
# which mysql

/usr/local/mysql/bin/mysql

# find / -name hostname

/usr/bin/hostname
/usr/ucb/hostname

# ln -s /usr/bin/hostname /usr/local/bin/hostname
# vi /etc/init.d/mysql

find
basedir=
datadir=

change with

basedir=/usr/local/mysql
datadir=/usr/local/mysql/var

# /etc/init.d/mysql start

Starting MySQL
SUCCESS!

2009/11/28

CPanel EXIM error – remote_smtp defer (111): Connection refused

On a cPanel dedicated server, exim was unable to deliver emails and all the emails were stuck in mail queue. Here what we found in the exim_mainlog

2009-03-22 03:46:04 H=localhost (Server-IP) [127.0.0.1] Warning:
Sender rate 0.0 / 1h
2009-03-22 03:46:04 1LlJJk-0003cX-HY <= test@somedomain.com H=localhost (Server-IP) [127.0.0.1] P=esmtpa A=fixed_login:test@somedomain.com S=798 id=1853.17.23.12.34.1237711564.squirrel@Server-IP
2009-03-22 03:46:07 1LlJJk-0003cX-HY alt3.gmail-smtp-in.l.google.com [209.85.218.31] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY alt4.gmail-smtp-in.l.google.com [209.85.221.10] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY == ourtestmail@gmail.com R=lookuphost T=remote_smtp defer (111): Connection refused

While troubleshooting the issue, we found the following:

root@server [~]# iptables -nL

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 127.0.0.1 tcp dpt:25
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
reject-with icmp-port-unreachable

You have to remove this two iptables rules.

root@server [~]# iptables -D OUTPUT 2
root@server [~]# iptables -D OUTPUT 1

You then have to save iptables and restart.

root@server [~]# /etc/init.d/iptables save
root@server [~]# /etc/init.d/iptables restart

Now, check your mails and you will see all the mails getting delivered.

MySQL Commands:

1.login mysql from GNU/Linux shell.
$mysql -h hostname -u root -p

2.Creating a database.
mysql> create database [Database_Name];

3.List all databases.
mysql> show databases;

4.List all the tables in a database.
mysql> show tables;

5.For Switching to a particular database.
mysql> use [Database_Name];

6.List database field formats in a table.
mysql> describe [Table_Name];

7.Delete a database.
mysql> drop database [Database_Name];

8.Delete a table.
mysql> drop table [Table_Name];

9.List all data in a table.
mysql> SELECT * FROM [Table_Name];

10. Show unique records.
SELECT DISTINCT [column name] FROM [table name];

11. Change a users password.(from unix shell).
mysqladmin -u root -h hostname.blah.org -p password 'new-password'

12. Change a users password.(from MySQL prompt).
SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');

13. Allow the user "sree" to connect to the server from localhost using the password "mypass"
grant usage on *.* to 'sree'@'localhost' identified by 'mypass';

14. Update database permissions/privilages.
FLUSH PRIVILEGES;

15. Dump all databases for backup. Backup file is sql commands to recreate all db's.
mysqldump -u root -p password --opt >/tmp/alldatabases.sql

16. Dump one database for backup.
mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql

17. Dump a table from a database.
mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql

18. Restore database (or database table) from backup.
mysql -u username -ppassword databasename < /tmp/databasename.sql

or

# mysql database_name < database.sql

Important Files and Commands in Linux

#
Used to make comments in a shell script or tells witch shell to use as an interpreter for the script.

.
Reads commands from a script and execute them in your current environment.

/etc/hosts
Configures names and aliases of IP-addresses. Fields should be separated with Tab or white space.

/etc/inittab
Controls process dispatching. Used by init.

/etc/lilo.conf
Is the configuration file used by the Linux Loader while booting.

/etc/modules.conf
Loads modules specific options at startup.

/etc/nologin
Is a text file that, if it exists in /etc/, will prevent non-root users from logging in. If a user attempts to login, it will be shown the contents of the file, and then be disconnected.

/etc/nsswitch.conf
Specifies how the lookup for different databases are performed and in what order. Lookups are done left to right.

/etc/printcap
Describes printers and allows dynamic addition and deletion of printers by the spooling system.

/etc/resolv.conf
Configures DNS name servers to use for hostname lookups.

/etc/sysconfig/network
Configures the system's network. Specifies hostname and gateway.

/etc/xinetd.conf
Contains the configuration for the extended internet services started by the xinetd command.

a2p
Transforms awk scripts to perl scripts, and shows the result on STDOUT.

ab
Benchmarks your Apache server by sending requests to it.

access
Checks whether if a file can be accessed. Exits successfully if the file can be accessed with the specified mode.

actctrl
Configures the IBM Active 2000 ISDN device driver and downloads firmware into the ISDN card.

addftinfo
Reads troff font file and adds font metric information that is used by the groff system.

addr
Shows information about network addresses. Will show you the hexadecimal format of the IP address.

addr2line
Shows file names and line numbers for a specified program addresses.

adsl-connect
Is a user-space PPPoE client. It manages an ADSL connection and reestablishes a dropped connection.

adsl-setup
Is a PPPoE client configuration script. It is used for the adsl-start, adsl-stop and adsl-connect scripts.

adsl-start
Starts the Roaring Penguin user-space PPPoE client.

adsl-status
Shows status of the PPPoE link that was established by the Roaring Penguin user-space PPPoE client.

adsl-stop
Stops the Roaring Penguin user-space PPPoE client.

afm2tfm
Used to convert an Adobe font metric file to TeX font metric format.

ali
Shows addresses for mail aliases.

alias
Creates an alias for a command. If options aren't specified it will show all aliases.

allneeded
Forces the calculation of all fonts that are needed to preview a set of dvi files.

alloc
Shows how much memory is used and free.

anacron
Runs commands periodically

answer
Is a utility that secretaries can use for easily creating emails while recieving a phone call.

apm
Shows power status and can configure the server in standby or suspend mode.

apmd
Is a monitor daemon and works together with the APM BIOS driver in the OS kernel.

apmsleep
Sets the computer in suspend or sleep mode.

appres
Shows how much resources are used by a specific application.

apropos
Shows all manual pages that contain the specified keywords, including the section number and a short description.

ar
Creates and updates library files. It combines files into a single archive file.

arch
Shows the hardware architecture of the current host.

arp
Shows and alters the ARP table which is used to map MAC addresses to their assigned IP addresses.

arping
Ppings the destination address using arp packets on the specified interface.

arpsnmp
Saves the Ethernet/IP address pairings. Logs the activity to syslog and sends a report of the changes by e-mail.

arpwatch
Saves the Ethernet/IP address pairs. Logs the activity to syslog and sends a report of the changes by e-mail

as
Is an assembler that will create object files using assembly language source files as input.

as86
Assembles code for the 8086 to 80386 processors.

ascii-xfr
Sends or receives files in ASCII mode.

ash, bsh
Is a shell similar to sh with similar features as system V shell.

askrunlevel
Allows selection of the operation mode at boot time.

aspell
Checks for misspelled words. It has filter for e-mail, sgml, and TeX.

aspell (2)
More options

at
Schedules commands to be executed at a later time.

atd
Runs jobs that are queued by at.

atq
Shows any queued at jobs for the current user or for a specified user.

atrm
Removes jobs from the at or batch queues.

atrun
Runs jobs that are queued by the at command to run later. It is used for backward compatibility.

authconfig
Configures /etc/sysconfig/network to support NIS.

autoexpect
Inspects your actions in a command and creates an expect script that recreates your interactions.

avmcapictrl
Configures active AVM ISA cards.

avmcapictrl(2)
Loads the firmware to an active AVM ISA card.

badblocks
Searches a device for bad blocks.

banner
Shows the specified strings in large letters on STDOUT.

basename
Removes the prefix and suffix from a string and shows the output to STDOUT.

bash, sh
Is a free version of Bourne-shell with many features from C- TC- and Korn shell.

bashbug
Creates and sends bug reports about the bash shell to the address specified.

batch
Executes commands at a future time when the system load level permits. The commands is read from STDIN.

bc
Reads a file or STDIN and uses a C-like arithmetic language. Acts as a pre-processor for the command dc.

bcc
It is the Bruce's C compiler. A simple C compile that use K&R C syntax.

bdftopcf
Compiles a font for the X server and the font server. It converts BDF-fonts into PCF-fonts.

[b]bg
Places the specified job in the background.

bind
Shows or binds key sequence to readline function or macro.

bindkey
Binds keys to an edit command. All bindings will be shown if no options is specified.

[b]bison
Generates a parser program for specified grammar file.

bltin
Runs the internal command in the shell.

break
Exits from a for, foreach, while, select or until loop.

builtin
Forces the use of a shell that builtin commands.

builtins
Shows all built-in commands in tcsh.

bunzip2
Decompresses bzip2 files.

burst
Allows a message to be split into several new messages.

bzcat
Decompresses a bzip2 file to STDOUT.

bzip2
Compresses, decompresses or tests bzip2 files.

bzip2recover
Recovers data from a damaged bzip2 compressed file.

c++
Is a complete compiler for C, C++, and assembler.

c++filt
Organizes the C++ symbols.

cal
Shows the calendar for a selected month in the year, or the entire year.

cancel
Terminates a printer job.

captoinfo
Searches file for termcap descriptions and shows the equivalent terminfo description with any comments.

cardctl
Administers and controls the state of PCMCIA sockets.

cardmgr
Manages and monitors PCMCIA card sockets and does automatic installation/uninstallation.

case
Matches each pattern successively against the word and run the commands when the first match is found.

cat
Shows files and can also combine several files into one file.

cc
Is the C and C++ Compiler for Linux. See gcc or g++ for complete information.

cd, chdir
Changes the working directory. If no directory is specified $HOME is used.

cdecl
Encodes or decodes C or C++ type declarations.

cdp, cdplay
Controls and plays audio CDs interactively or non interactively.

cdparanoia
Reads audio tracks from a CD-ROM drive that is CDDA compatible.

cdrecord
Records data or audio to a CD-ROM with the specified CD recorder.

cfdisk
Controls and alters partitions on hard disk drives by use of interactive menus.

chage
Alters or shows the user password expiry information for the specified user.

charset
Changes one of the two slots for character sets.

chat
Controls a conversation automatically between two computers over a modem connection.

chattr
Alters the file attributes on a Linux second extended file system.

checkalias
Shows information about mail aliases.

checkpc
Administers information about entries in the printcap database.

chfn
Changes your finger information.

chgrp
Sets or changes the group ID for the file or files specified.

chkconfig
Administers runlevel information for system services.

chkfontpath
Configures the directories in the X font server path.

chmod
Alters or assigns permissions to a file.

chown
Alters the ownership ID of files and also sets the group ID if it is specified.

chpasswd
Updates the passwords for a group of users with name and password pairs from STDIN.

chroot
Alters the root directory for a command.

chsh
Changes your login shell.

chvt
Changes foreground virtual screen.

ci
Stores revisions in the specified revision control system files.

cjpeg
Creates a JPEG/JFIF image from a specified image file or from STDIN.

cksum
Calculates the checksum (CRC) and number of octets for each input file.

clear
Clears the screen of all information if not disabled by your terminal environment.

clockdiff
Measures clock difference between computers with the resolution of 1 msec.

cmp
Compares two files of any type and shows the line number and byte where the files differ.

co
Checks out a revision from a RCS file and stores it in the corresponding working file.

codepage
Extracts code pages from a file.

col
Converts spaces to Tabs or Tabs to spaces in text files to create or modify columns.

colcrt
Removes underlines or shows them on new lines filtering the nroff file for a CRT preview.

colrm
Deletes selected columns from a file reading from STDIN to STDOUT.

column
Formats input into multiple columns.

combine
Combines images together with new image.

comm
Compares two files and shows you the unique and common lines from both files.

command
Executes the command and will disable lookup functions in the current shell. Can also give information on how the command will be interpreted by the shell.

comp
Creates a mail message with a preconfigured form.

compgen
Generates possible completion matches for the specified word according to the option.

complete
Declares how a command should be completed. Use the Tab key to perform the completion on the command line.

compress
Compresses the size of a file and replaces the old file with a new file with the extension .Z. The new file will inherit the same permissions and modification times from the original file

conflict
Reports conflicts between nmh and the mail transport system.

consolechars
Changes console screen font, screenfont map, and / or application-charset map.

consolehelper
Authenticates users via PAM and runs the program specified including any options the command may have.

consoletype
Shows the screen (console) type that is currently connected to STDIN.

continue
Doesn't run the remaining commands in the loop and continue to the next iteration. Can be used in the commands for, while, until, select and foreach.

convert
Converts image formats, colors, sizes, creates filter effects, rotations, sequences, and more.

cp
Copies files and directories to a new destination.

cpio
Copies files into and out of a cpio archive. It operates in three different modes.

cpp
Is a C language preprocessor that insert include files in the source code of the source file creating a single file.

cproto
Creates C function prototypes and converts function definitions.

createdb
Creates databases on a postgres server.

createlang
Adds new programming languages to the specified postgres database.

createuser
Creates users in a postgres database.

cron, crond
Starts the cron daemon used to execute commands at scheduled dates and times specified in the crontab file.

crontab
Views, creates, deletes, or edits the crontab file which contains a list of jobs including the time and date they will execute. If option isn't given read from STDIN.

csplit
Splits whole or parts of a file into new files.

ctags, etags
Inserts tags into programming source code files f that can act as markers making it easier to find section headings quickly and edit them using ex or vi.

ctrlaltdel
Sets the function of the Ctrl+Alt+Del buttons used when rebooting a computer.

cut
Selects fields or columns from a text file or a table and shows the result to STDOUT.

cvs
Is a version control and logging system for files or directory tree structures including any versionable files.

cvsbug
Sends a CVS problem report to a central support site that runs GNATS.

cytune
Configures the interruption threshold for the Cyclades driver.

date
Shows current date and time or sets the date and time on your computer.

dbmmanage
Manages DBM files with user names and passwords to authenticate HTTP users.

dc
Is a calculator that use reverse-polish notation. It use a stack to performs calculations.

dd
Copies and converts an input file to an output file.

ddate
Shows the date in the discordian date format.

deallocvt
Disconnects the specified virtual terminal or terminals.

debugfs
Debugs the ext2 file system specified.

depmod
Controls dependency descriptions for loadable kernel modules.

df
Shows used and free disk space for all file system or the one specified.

dga
Tests video modes for X-window by filling the screen with different colors each time a key is pressed.

dhcpcd
Manages requests for an IP address from a DHCP server.

dhcrelay
Forwards BOOTP and DHCP requests from one subnet to another subnet.

dialog
Shows boxes containing questions or messages from the shell.

diff
Compares two text files in every line.

diff3
Compares the difference between three files.

diffstat
Creates statistic histograms from diff output.

dig
Gathers information from the DNS servers in interactive or batch mode.

dip
Controls dial-up or dial-in PPP connections. It dials using a specified dial-up script.

diplogin
Specifies the user name to login to the dial-in server that exists in the file /etc/diphosts.

[b]dir
Shows files in the current directory or a specified directory.

dircolors
Shows or sets LS_COLORS environment variable.

dirname
Shows everything up to the last level of the given path name.

dirs
Shows the directory stack with the most recent one to the left.

dislocate
Disconnects a session without logging off to enable you to reconnect to the same session from another location.

disown
Removes the specified job from the active job list.

display
Shows images on the screen in X-window. Multiple images can be shown.

djpeg
Decompresses the JPEG file specified and creates an image file on the STDOUT.

dmesg
Examines and controls the kernel ring buffer

dnsdomainname
Shows the domain that you are in.

dnskeygen
Creates and maintains public, private, and shared secret keys for DNS servers.

dnsquery
Shows information about nameservers through BIND resolver library calls.

doexec
Runs a specified command showing it with another name passing the arguments provided.

domainname
Sets or shows the domain your system is configured for.

dosfsck, fsck.msdos
Checks a DOS file system; can also be used to fix damaged DOS file systems.

dp
Converts dates fitting the ARPA Internet standard (822 format).

dropdb
Removes a postgres database specified from the system.

droplang
Connects to a postgres database and removes a selected programming language.

dropuser
Connects to a postgres database and removes the specified user.

du
Shows disk usage for a directory and its subdirectories.

dump, rdump
Is a backup program that examines files in an ext2 file system and determines if the files need to be backed up.

dumpe2fs
Shows the super block and blocks group information of a file system present on a device.

dumpkeys
Shows the contents of the keyboard translation tables on STDOUT.

e2fsck, fsck.ext2
Checks Linux second extended file systems.

e2label
Shows or changes the label of an ext2 filesystem.

echo
Copies the written string to the screen. Exist as internal in all shells.

echotc
Exercises the terminal capabilities arguments.

ecpg
Is a preprocessor for embedded SQL code within C and Postgres programs.

ed
Is a line based editor. It is often used to edit files automatically in a script.

edquota
Manages user quotas for a ufs file system.

egrep
Shows lines form the file that matches the given pattern using full regular expressions.

eiconctrl
Configures active Eicon ISDN cards.

eject
Ejects floppies and CDs from their drives. Works for VM managed devices and devices without eject buttons.

elksemu
Emulates 8086 ELKS programs on an i386.

elm
Is an interactive mailer program that takes the place of mail and mailx.

elmalias
Shows information on specified elm aliases.

emacs
Edits text files, read and send mail, perform outline edits, compiles and run subshells.

enable
Enables or disables internal commands.

env
Alters the current environment and invokes a utility or shows the current environment.

eqn, geqn
Preprocesses files for troff which contain mathematics equations.

eval
Reads the argument as input to the shell and runs the resulting commands.

ex, e
Is a line base text editor. It is able to work on several files at the same time.

exec
Runs a command in place of the current shell. Usually another shell.

exit
Exits a shell or shell script with an exit status

expand
Replaces Tabs with spaces in text files. If no input files are specified STDIN will be used.

expect
Is used to automatically control interactive programs. It acts by reading commands from a file.

expectk
Is used to automatically control interactive programs. Is the same as expect, With Tk support.

export
Exports a shell variable to environment.

exportfs
Controls the exported file system table for NFS.

expr
Evaluates an expression and show the result to STDOUT.

extcompose
Creates a file containing a reference to external files on the computer.

factor
Finds the prime factor of a number. Also shows if the number is a prime factor.

faillog
Manages the summary of failures in /var/log/faillog.

false
Provides a false value in scripts, does nothing but always exits with a non zero-value.

fastmail
Sends e-mails fast in a batch to a large group of receivers.

fc
Reruns, edits or lists commands that have recently been used. With no options, edits and runs the last command.

fdformat
Formats new diskettes.

fdisk
Handles partiton tables. If no arguments is specified, an interactive prompt will be used.

fetchmail
Retrieves mail from POP, IMAP, or ETRN servers and forwards it to your local mail agent.

fg
Resumes the execution of a stopped job in the foreground. Without an argument the current job is used.

fgconsole
Shows you the number of the active virtual terminal.

fgrep
Shows lines form the file that matches the given pattern.

file
Performs tests on each file that you have specified to determine what file type it is.

filetest
Tests a file for different things.

find
Finds files in the specified directories and subdirectories using the Boolean expression from the input line.

findsmb
Shows information about computers on the network running MS Windows operating systems.

finger, safe_finger
Shows information about logged in users.

flex, flex++, lex
Creates a scanner program that recognizes lexical patterns in a text.

fmt
Is a text formatter. It will take the text from the file and produce output lines that are joined in the correct way.

fold
Breaks lines in text files to the specified width.

folder, folders
Shows the current folder and information about the messages in it.

for
Is used to go trough each word in the list, assign the value to variable and run the commands.

foreach
Is used to go trough each word in the list, assign the value to variable and run the commands.

fortune
Shows an interesting or funny phrase from various people randomly each time you execute it.

free
Shows the amount of free and used memory in the system.

fsck
Checks file systems for inconsistencies and repair them.

fsck.minix
Checks the minix file system for consistency.

fsinfo
Shows information including the capabilities about X font servers on the network.

fslsfonts
Shows the fonts on the font server that match the pattern specified. Wildcards (*) can be used.

fstobdf
Creates BDF fonts from an X font server. Debugs font and re-create BDF files.

ftl_check
Shows bookkeeping information for a Flash Translation Layer partition.

ftl_format
Formats a Flash Translation Layer partition on a flash memory device.

ftp
Transfers files from a remote network. It uses the File Transfer Protocol.

ftpcount
Shows current number of users using the FTP server.

ftprestart
Automatically restarts shutdown FTP servers.

ftpshut
Is an automatic shutdown procedure that notifies FTP users when the server is shutting down.

ftpwho
Shows information about the current processes for each FTP user.

function
Defines function in a shell.

funzip
Extracts the first file from a zip archive within a pipe to the standard, or specified, input.

fuser
Shows all processes that are using the specified files or file systems.

g++
Is the C++ compiler version of gcc. It assumes that the preprocessed files .i are in C++.

g77, f77
Is the GNU Fortran compiler. This can also be started using f77.

gawk, awk
Is a processing language from GNU built from awk and supports all of the options found in awk.

gcc
Is the GNU C/C++ compiler. It assumes that the preprocessed .i files are C based.

gdb
Is the GNU debugger program. This can start a specified program and modify its behavior.

gendiff
Generates a diff file that contains the differences between two directories.

genksyms
Creates a file with version information by first running gcc -E on it.

getconf
Retrieves current configuration values and show them to STDOUT.

getent
Retrieves entries using keywords that must already exist from a system configuration file.

getfilename
Uses a file in the specified format, then creates a copy of it using the specified file name.

getkeycodes
Shows kernel scan-code to key-code mapping table. Can be used to define functions of special keys.

getopt
Cleans up and checks options given to a shell script. It split option given together and place each option in its own variable. Any additional arguments is placed after --

getopts
Will retrieve or set environment options and process them from the command line. The values specified by name and the index of the next arguments are placed into the shell variable OPTIND.

gettext
Gets the domain name variable from a message object made by msgfmt.

gif2tiff
Creates a TIFF image file from a GIF image file.

glob
Performs file name expansion on the words. The result is separated by a NULL-character.

goto
Jumps to label in a shell script.

gpasswd
Administers the /etc/group and /etc/gshadow files.

gpg
Is the main security program for the GNUPG system and can check, sign, encrypt and decrypt.

gphoto
Administers picture handling with digital cameras. Can also be used with Web cameras and in scripts.

gpm
Enables the mouse in screen mode and sets various attributes such as baud rate and mouse type.

gpm-root
Allows Control-Mouse events to be able to draw menus during screen mode.

gprof
Shows an execution (call-graph) profile of a program. It can also create files containing portions of this information.

grep
Shows lines form the file that matches the given pattern.

grodvi
Is a groff driver that creates TeX dvi files that can then be printed out.

groff
Is the front end to the document formatting system used by groff.

grog
Guesses which groff option is required for printing a specific file and sends this answer to STDOUT..

grolj4
Is a groff driver that is used for creating output that can be printed onto an HP LaserJet 4 type printer.

grops
Translates GNU troff output into PostScript.

grotty
Translates GNU troff output into a simple printer format.

groupadd
Creates a new group definition on the system.

groupdel
Deletes a specified group definition in the system.

groupmod
Alter's a specific group definition on the system.

groups
Shows the groups that a user is a member of.

grpck
Checks the integrity of the /etc/group and /etc/gshadow files.

grpconv
Updates the /etc/gshadow if the /etc/group file has been changed manually.

grpunconv
Creates the /etc/group file from the /etc/gshadow file, then removes the /etc/gshadow file.

gs
Starts Ghostscript and reads Adobe Systems PostScript and PDF files.

gtbl
Compiles descriptions of any tables that are embedded inside troff files.

gunzip
Extracts files created by gzip, zip, compress or pack.

gv[/b]
Allows you to view PostScript and PDF documents.

gzexe
Compresses executable files into a self extracting archive.

gzip
Compresses files with Lempel Ziv-coding.

h2ph
Converts the specified C header files into Perl header file format.

h2xs
Creates Perl extensions from C header files.

halt
Writes any remaining data in memory to the disks and then stops the computer.

hash
Shows or changes information in the internal hash table that stores information about executed commands.

hashstat
Show information about how effective the internal hash table is.

hdparm
Sets or retrieves hard drive parameters.

head
Show lines from the beginning of each file on the screen.

help
Shows help information about internal commands.

hexdump
Dumps a file in hexadecimal format on the screen.

hisaxctrl
Setups the HiSax-ISDN device driver, if you are using the HiSax driver.

history
Shows a list of previously used commands, and can optionally execute them again.

host
Looks up hostnames or IP-addresses using name servers.

hostid
Shows na identifier for the current host in hexadecimal format.

hostname
Sets or shows the hostname for the computer.

hpftodit
Uses an HP tagged font metric file and creates a font file for use with groff -Tlj4.

htdigest
Manages HTTP user authentication files.

htpasswd
Manages HTTP user authentication.

httpd
Is the Apache internet Web server.

hup
Allows a command to catch a hangup signal. This is the opposite of nohup.

hwclock, clock
Shows and configures the hardware clock.

ibench
Shows how many connections the daemon can manage during a specified time. Will also identify users.

iceauth
Modifies or shows authorization information to connect with ICE.

id
Shows the userID and groupID of the user that you specify.

ident
Searches for RCS keyword strings in files.

if
Makes a decision inside a shell script. If the first expr is true run the first commands. If not check the next expr and so on. If no expr was true run commands after then.

ifcfg
Configures the Ethernet interfaces.

ifconfig
Configures network interface parameters or show the status for network interface.

ifdown
Deactivates a network interface.

ifport
Set or views the transceiver type for the network interface.

ifup
Activates a network interface.

ifuser
Shows whether any of the specified hosts are routed through the specified interface.

igawk
Adds the ability to have include files in gawk. It accepts all gawk options. Gawk also includes additional options from Bell Labs and GNU specific options.

imon
Monitors your ISDN activities.

imontty
Shows the status of all ISDN lines.

import
Captures some or all of an X server screen and saves it to a file.

in.fingerd, fingerd
Is the daemon the manages the finger protocol.

in.ftpd, ftpd
Is the Internet FTP daemon that manage FTP services. It is only started by the inetd daemon when requested.

in.identd, identd
Returns user information about the owner of a connection to a remote computer.

in.rexecd, rexecd
Is a daemon that services remote execution requests and uses use rname and password authentication. inetd will automatically start the daemon when needed.

in.rlogind, rlogind
Is the server for the rlogin command. The server looks at client's source port. If port is not in the range 0-1023, the server will abort the connection.

in.rshd, rshd
Is the server for rsh (remote shell) and allows clients to execute commands from remote clients. The server accepts connections from the client on any port lower the 1024.

in.telnetd, telnetd
Used to process incoming requests on the telnet port. Started by the Internet Server (inetd).

in.tftpd, tftpd
Is a server that gives you TFTP functionality, it uses the UDP protocol instead of TCP.

indent
Inserts or erases whitespace in C code to make it easier to read. Converts from one C style to another.

indxbib
Creates an index for a database file in inverted form. It can be read by the commands lookbib and refer. Is an executable in Linux, BSD and a script in AIX, Solaris.

info
Reads hypertext info nodes. Info nodes fill the same function on as man pages.

infocmp
Shows terminal information or compare descriptions between two or more terminals.

infotocap
Reads the specified file and converts found terminfo descriptions to termcap descriptions. The converted descriptions is shown on STDOUT.

init, telinit
Changes run levels for the system. Shuts down or restart the computer in different modes.

initdb
Creates a new Postgres database system.

initlocation
Creates another Postgres secondary database storage area.

initlog
Sends log messages to the system logging facility.

insmod
Installs loadable kernel modules (device drivers) in the running kernel.

install
Manages the installation of files to a specific location or creates directories in a file system.

install-info
Installs or erases menu entries in info directory files.

install-mh
Creates the initial setup for a first-time nmh user.

iostat
Shows input and output statistics for disks, terminals and tapes.

ipcalc
Calculates IP address information.

ipcclean
Cleans up shared memory and semaphores from aborted backends.

ipchains
Manages IP firewall rules in the Linux 2.2 kernel.

ipchains-restore
Restores IP firewall chains from STDIN.

ipchains-save
Shows the firewall chains on the screen.

ipcrm
Releases shared memory by removing identifiers from message queues, semaphores, and shared memory segments that programs or services have left behind.

ipcs
Shows information about inter-process communications currently active in the system, such as shared memory segments, semaphores and message queues.

ipppd
Is a modified pppd that provides synchronous PPP support for ISDN connections.

ipppstats
Shows PPP-related statistics.

iprofd
Creates the modem register of the ISDN-ttys AT-emulator permanent.

iptables[/b]
Manages IP firewall rules in the Linux 2.4 kernel.

iptunnel
Configures various types of IP tunnels.

ipx_cmd
Is a bridge between local IPX network and Novell's SCMD driver.

ipx_configure
Queries or configures IPX behavior with respect to automatic IPX interface detection.

ipx_interface
Manages IPX interfaces.

ipx_internal_net
Adds or removes the IPX internal network.

ipx_route
Adds or removes an IPX route.

isapnp
Reads the configuration file to configure ISA PnP cards.

isdnconf
Manipulates or reads ISDN phone number config files.

isdnctrl
Configures ISDN device information.

isdnlog
Shows decoded information from the ISDN card.

isdnrate
Shows telephone rates and various info from rate files.

isdnrep
Shows ISDN activity.

isoinfo
Does directory-like listings of iso9660 images.

isovfy
Checks an iso9660 image for errors.

ispell
Is a compatibility script for the aspell spell checker.

jobid
Shows the process id for the job or for the current job if not given.

jobs
jobs is used to report all jobs that are stopped or executing in the background.

join
Compares two files and joins them together where the fields are identical and show the result to STDOUT.

jpegtran
Converts JPEG from one compression to another.

kbdconfig
Configures the keyboard.

kbdrate
Changes keyboard configurations.

kbd_mode
Changes the keyboard translation mode. Useful when a program don't restore the translation mode.

kernelversion
Shows the major version of the kernel.

kibitz
Allows multiple interactions to one shell.

kill
Stops a process or sends a signal to a processes.

killall
Kills all processes running the specified commands.

killall5
Kills all processes but the ones in it's own session. Same as the System V killall command.

klogd
Is a daemon that is used to log kernel messages.

ksymoops
Decodes Linux kernel Oops.

ksyms
Shows kernel symbols that have been exported.

kudzu
Checks the hardware. If there are some changes in the system, it gives the opportunity to configure the hardware.

LANG=language
Change the regional setting and language translation.

last
Shows login information about users, hosts, and terminals.

lastb
Shows all bad login attempts.

lastlog
Shows the contents of the last login log. The information includes login name, port, and last login time.

lbxproxy
Is an X proxy that uses the low bandwidth extension to X (LBX). Some optimizations is made to the connections that increases speed over slow connections.

lc
Runs the last function specified by function or the last command entered

ld
Is a linker for object files used to link executables or shared libraries. Ld operates in two modes, static or dynamic.

ld86[/b]
Links object files produced by the as86 assembler into I&D executables.

ldconfig
It is used to configure run time bindings for the dynamic linker.

ldd
Shows a list of executable files and their dynamic dependencies or shared objects

less
Is a text pager for UNIX system, used to show ASCII files.

lesskey
Manages key bindings for less.

let
Performs arithmetic calculations using the arguments specified, can be used in advanced shell scripts.

let
Will evaluate the arguments and if the result is zero the exit status is 1 otherwise 0.

lex
Creates C programs to be used in lexical processing of character input. That can be used as an interface to yacc.

lilo
Allows you to have several operating systems installed and boot into any of them at startup.

limit
Set limitations on the system resources available to the current shell.

links
Is a simple command-line URL browser.

linuxconf
Is an interactive menu configuration program.

listalias
Shows user and system mail aliases in the system. This is one part of the elm mailer.

listres
Creates a list of widget's names and classes.

lkbib
Finds references in the bibliographic database that contain the specified keyword.

ln
Creates a link between the specified source and destination files.

lndir
Makes a shadow directory tree from fromdir with symbolic links.

loadkeys
Reads and modifies the keyboard translation tables.

local
Creates a local variable within a function and set variable's attribute.

locale
Shows locale-specific information.

localedef
Compiles or creates locale specifications.

lockfile
Creates semaphore files used to limit the access so that only one program is allowed to access the file or files.

logger
Adds messages to the system log from the command line.

login
Lets you sign on to the system.

logname
Shows your login name.

logout
Exits a login shell form in Bash, C, TC and Z-Shell (bash, csh, tcsh, zsh).

logresolve
Resolves IP addresses in Apache's access log files. This is to reduce the impact for the name server.

logrotate
Administrates log files by rotating, compressing, removing, and mailing the log files.

look
Will find words in the system dictionary and show all lines that begins with the specified string.

lookbib, glookbib
Finds references in a bibliographic database and recover records containing the keywords entered at the prompt.

loopctrl
Configures the isdnloop ISDN driver.

losetup
Administers and controls loop devices.

lp
Sends print request to a printer or printer queue.

lpbanner
Show a banner on a fixed-size font printer.

lpc
Used by the system administrator to control the operation of the line printer system.

lpd
Starts the printer server.

lpf
Is used as a general printer filter. It is often used in the printcap file as a filter.

lpq
Shows the content of a print queue.

lpr
Sends print requests to a printer. Will use STDIN if no file is specified.

lpraccnt
Is a printer accounting program template. It opens a specified TCP port for to send information

lprm
Removes print requests from the print queue and report the file's name of removed request.

lpstat
Shows status information on a printer or printer queue.

lpunlock
Unlocks a printer that is waiting for lock.

ls
Lists the contents of a specified directory and supports wildcards.

ls-F
Lists files like ls -F. It's much faster than ls.

lsattr
Shows the file attributes on a Linux second extended file system.

lsmod
Shows information about the loaded modules.

lsof
Shows a listing of open files.

lspci
Shows information about all PCI buses in the system and all devices connected to them.

ltrace
Traces library calls of a given program.

lynx
Is a fully featured, text only WWW browser. Shows HTML documents with links to files on the local system and for remote hosts running HTTP, FTP, NNTP, WAIS, and Gopher.

m4
Is a front end macro processor that is used for programming languages like C and assembler.

mail, Mail, mailx
Reads and sends mail.

mailq
Shows the mail queue. Shows first line for each mail massage, host for the massage, size the date and time.

mailstats
Shows the statistics collected by the program sendmail.

mailto
Sends multimedia mail in MIME format. It can only be used to send mail.

make, gmake
Updates a target file and all of its dependencies or repairs missing or invalid target dependency trees.

makedbm
Creates a DBM file or converts a DBM file to a text file.

makedepend
Reads each specified source file in the given sequence and then parses it.

MAKEDEV
Creates device entries in the /dev directory.

makeg
Makes an executable file that can be used for debug operations.

makeinfo
Converts Texinfo files to plain text, HTML or info files for online reading.

makemap
Uses the keyed map lookups in sendmail and creates the database map by reading from STDIN.

makepsres
Creates an PostScript language database file that contains the resources in the specified path names.

makestrs
Creates string table C source files and headers and outputs them on STDOUT.

makewhatis
Updates the whatis database.

make_smbcodepage
Creates a codepage for use with Samba.

man
Shows the manual page of the specified command.

man2html
Converts manual pages to HTML format.

manpath
Shows search paths for man pages.

mattrib
Changes file attributes for MS-DOS files

mbadblocks
Tests a floppy disk for bad blocks and marks them in the file allocation table.

mc
Is a file manager used to browse directories and files.

mcat
Copies a disk image to or from a floppy disk.

mcd
Changes directory in a MS-DOS directory structure.

mcedit
Edits file. It starts Midnight Commander (mc) in edit mode.

mcookie
Creates a magic cookie that works with the command xauth.

mcopy
Copies MS-DOS files to or from a UNIX system.

md5sum
Verifies MD5 checksums.

mdel
Deletes a file in an MSDOS file system..

mdeltree
Deletes a directory from an MSDOS file system.

mdir
Shows files in an MSDOS directory.

mdu
Shows disk usage for a specific file or files on an MS-DOS file system.

merge
Merges three files together. It merges the changes between input file 2 and 3 into input file number 1.

mesg
Allows or disallows messages to be sent to your terminal.

messages
Shows how many messages you have in your mailbox or folder.

metamail
Manages how to show mails that are non text-based.

metasend
Sends non text mails.

mformat
Formats MS-DOS floppy disks.

mhl
Shows and filters text messages in New Messages Handling System (NMH).

mhmail
Reads or sends mail.

mhpath
Shows pathnames to folders and mailboxes.

mikmod
Plays modules on a UNIX system.

mimencode
Converts or deconverts any standard mail-encoding formats defined by MIME.

mingetty
Is a smaller getty that works with virtual consoles.

minicom
Is a text-based window serial communication program.

mkbootdisk
Creates a boot floppy for the running system.

mkdep
Creates makefile dependency lines for a specified source file.

mkdir
Ccreates directories.

mkdirhier
Creates the specified directories including any unspecified parent directories as well.

mkdosfs, mkfs.msdos
Creates an MS-DOS file system in Linux.

mke2fs, mkfs.ext2
Creates a second extended file system.

mkfifo
Creates the FIFO special files specified by the paths and filenames on the command line.

mkfontdir
Creates an index file from any X font files found in a directory. It typically looks for .pcf, .snf and .bdf fonts and then creates the file fonts.dir in the same specified directory.

mkfs
Creates a Linux file system on the specified device.

mkfs.minix
Creates a minix file system.

mkinitrd
Create a ramdisk to preload modules to gain access to the root file system.

mkisofs
Creates an ISO9660, Joliet, or HFS file system that is used on CDs and handles Rock Ridge attributes.

mklost+found
Creates a lost+found directory.

mkmanifest
Creates a shell script that restores UNIX file names that has been shortened by MS-DOS file systems.

mknetid
Creates the NIS netid map called netid.byname using the contents of the hosts, passwd, group and netid files.

mknod
Creates a directory entry for a specified special file.

mkpasswd
Generates a new password and assigns it to a user if you specify one.

mkraid
Manages RAID arrays.

mkswap
Creates a swap area in Linux.

mktemp
Creates a temporary file name using another file name as a template.

mktexlsr
Manages ls-R databases.

mkxauth
Manages .Xauthority files.

mlabel
Creates a volume label on MS-DOS file systems.

mmd
Create directories on MS-DOS file systems.

mmount
Mounts a MS-DOS file system in Linux.

mmove
Moves files on MS-DOS file systems.

modinfo
Shows information about the specified kernel module.

modprobe
Probes for modules in Linux.

mogrify
Modifies images by scaling, rotating, twisting and cropping. It also converts image files.

more
Shows a textfile one page at a time. Continues reading files specified on the command line.

mount
Mounts a file system or shows a file system that is already mounted. The file system can be local or remote.

mountd, rpc.mountd
Answers file system mount requests and NFS access information checks.

mouseconfig
Manages mouse configuration.

mpage
Prints several pages on one sheet of paper. The input files can be either plain text or PostScript.

mpartition
Partitions an MS-DOS hard disk, to create an MS-DOS file system.

mpg123
Reads files or URLs and plays them on the audio device or outputs them to STDOUT.

mrd
Deletes an MS-DOS directory.

mren
Renames or moves MS-DOS files.

msgchk
Checks maildrops for new incoming mail messages.

msgfmt
Creates message object files from portable object files. It doesn't change the portable object files.

msh
Reads a usual mail message file or a message file compressed with packf.

mshowfat
Shows file allocation table entries for an MS-DOS file.

mt
Sends commands to a tape device.

mtools
Shows all the programs in the mtools package which are used for accessing DOS FAT volumes.

mtype
Shows the content of an MS-DOS file.

mutt
Manages mail boxes. Sends and reads e-mails.

mv
Moves or renames files and directories.

mzip
Sends commands to an Iomega ZIP drive.

named, in.named
Is the domain name server that answers DNS request and resolves host names and finds their assigned IP address.

named-xfer
Handles inbound zone transfer. Is used by named and should not be used directly.

namei
Shows which kind of file each part of a pathname is. Follows symbolic links until they stop in a proper file.

ncftp
Is a browser program for the Internet FTP service.

ncftpbatch
Processes FTP requests added by the ncftp program.

ncftpget
Transfers files from the command line or shell scripts instead of using interactive FTP programs.

ncftpls
Creates remote directories listings without using interactive FTP programs.

ncftpput
Transfers files from the command line or shell scripts instead of using interactive FTP programs.

ncopy
Copies files over the NetWare network.

ncpmount
Mounts volumes on a NetWare file server.

ncpumount
Unmounts a NetWare file system that was previously mounted with the ncpmount.

ndc
Administers and manages the operations of a name server.

neqn
Is a preprocessor for the command nroff and is used to help out in equations.

netconf
Is an interactive user interface that allows configuration of a TCP/IP network.

netconfig
Configures the network on the command line or in interactive mode.

netreport
Requests network management scripts send a SIGIO signal when network interface changes occur.

netscape
Is a graphic based web browser.

netstat
Shows statistics and other network information, based on options selected.

newalias
Installs new elm aliases for system and/or user.

newaliases
Rebuilds the mail aliases file.

newer
Compares modification times of two files and exits successfully if file1 is at least as old as file2.

newgrp
Changes a user's real and effective group ID to the specified group.

newusers
Updates and creates new users in batch. User information is taken from the specified file.

nfsd, rpc.nfsd
Manages NFS file system requests for clients.

nfsstat
Shows NFS and RPC statistics.

nhfsstone
Benchmarks Network File System (NFS).

nice
Starts commands to be run in a different priority.

nisdomainname
Shows or sets system's NIS domain name.

nl
Reads lines from STDIN or a file, adds line numbers, and shows the result to STDOUT.

nm
Shows a table of the symbol names used for the specified ELF object file.

nmbd
Is a server that replies to NetBIOS over IP name service requests from a Windows client.

nmblookup
Requests NetBIOS names and maps them to IP addresses.

nohup
Is a way to run a command which will be immune to any hang up signals.

notify
Will notify a user asynchronous when the status of a job is changed. If job is not given, the current job is used.

nprint
Prints files to print queues located on a NetWare file server.

nroff
Processes a text file and formats the output for use with a letter quality printer or line printer.

nsend
Sends messages to NetWare users or user groups.

nslookup
Contacts and sends queries to DNS servers interactively or non-interactively.

nsupdate
Updates DNS name servers interactively or non-interactively.

ntsysv
Configures run levels to set what services that should be started or stopped.

nwauth
Logs into a NetWare server. If no arguments are given, the user's .nvclient file is used.

nwbocreate
Creates a NetWare bindery object.

How to set php safe_mode for a particular domain.

safe_mode is a feature of php. It is always prefferable to keep it ON due to security resaons. But for the working of some scripts it need to be turned off , in that case also dont turn it off server wide as it is a potential vulnerability.

How to turn off safe_mode for a particular domain.
---------------------------------------------------------

First thing we need to check is whether php is compiled as modular or cgi
If modular then we can do it via .htaccess in his public_html
If cgi then we can do it via php.ini in his publichtml

Via .htaccess
---------------

Add the following line


php_value safe_mode 0ff

or

php_flag safe_mode Off

If it is php 5 then add it inside the if module like


php_flag safe_mode off


via php.ini
------------

Just make a file called php.ini in his public_html then just add the line

safe_mode Off

Via hhtpd.conf
----------------

Add the following line and use ifmodule if needed

php_admin_flag safe_mode Off

2009/11/24

How to set quota on /tmp/eaccelerator

You may have tmpwatch on your system. The cron for that is run daily:

vi /etc/cron.daily/tmpwatch

In there, you can set the max amount of hours for keeping an old file. Lowering this, will clear out all your old cache files.

Another way, is to run a command like below in the tmp folder:

find eaccelerator -mtime +30 -exec rm {} \;

It will clear out any eacceletator files older than 30 days. Use that command carefully though

---------------------------------

Then write yourself a script and run it hourly from cron.

#!shell
#
check disk usage of directory
if (usage > a number)
delete files
fi
------------------------------
tmpwatch --mtime --all 336 /tmp/eaccelerator

What is eAccelerator?

eAccelerator is a further development from mmcache PHP Accelerator & Encoder. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated.

Installing eAcceleration in Debian

First you need to download php4-dev package which we need to compile eAccelerator

#apt-get install php4-dev

Download eAccelerator source package from here to /root folder and extract it

#tar jxvf eaccelerator-0.9.4.tar.bz2

#cd eaccelerator-0.9.4

Running phpize creates config file which is needed in make.

#/usr/bin/phpize

#./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config

#make

#make install

After this installation completed.

Edit file /etc/php4/apache2/php.ini and add following lines:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

Create temporary folder to eAccelerator

#mkdir /tmp/eaccelerator

#chmod 0777 /tmp/eaccelerator

Restart apache and you're finished with the eAccelerator configuration

#/etc/init.d/apache2 restart

Testing Your installation

Create test.php file with following lines on it:



If you have eAccelerator info shown on that page, accelerator is working

Increasing the maximum file size phpMyAdmin

If the limitation you are running into is a limit on the size of file uploads on your system, you may be able to increase this limit. By default it's usually 2M or 8M. To increase it you need to change PHP settings. You can change these settings either system-wide (if you have permission) or locally. The settings to change (with their typical defaults are):

post_max_size = 8M
upload_max_filesize = 2M

You must ensure that post_max_size is the same or larger than upload_max_filesize.

* These settings can be changed globally by changing them in your php.ini file (its location varies depending on your system). After changing the settings, remember to restart your web server.

* You may be able to change these settings locally if you're using Apache by putting a ".htaccess" file in phpMyAdmin's directory. The contents of the file should be:

php_value post_max_size 20M
php_value upload_max_filesize 20M

Change '20M' to however large you want it to be. You shouldn't need to restart the web server for these changes to take effect, but if you start getting Internal Server Errors (500) then this probably means your host does not allow you to change these settings and you need to remove those settings.


//For kloxo: php.ini location for phpmyadmin is
/usr/local/lxlabs/ext/php/etc/php.ini

2009/11/23

Core files in Linux

A core file created when ever a program terminates unexpectedly and its also useful for determining what caused the termination. In many Linux server by default they do not produce core files when programs crash or terminates unexpectedly.

On most of the Linux server core file size limitation is set to 0.You can check the core file size limit set in server by using following command.

root@gunjan [~]# ulimit -c
1000000

In above command core file size limit is 1000000 if output occur empty then it means core file size limit haven’t set on server and you can set it as

root@gunjan [~]# ulimit -c 1000000

or

root@gunjan [~]# ulimit -c unlimited

If you want to test core file limit is working on your server or not? then run following command

kill -s SIGSEGV $$

This above command will crashes your shell and produces core file in the current directory. as core.*

If core file is taking lots of disk space on server and you want to disable it then follow the steps one by one.

root@gunjan [~]#which httpd

/usr/sbin/httpd

root@gunjan [~]#pico /usr/sbin/httpd

And following line in /usr/sbin/httpd

ulimit -c 0

And then restart the Apache server

2009/11/22

Make PHP to work in your HTML files with .htacess

By default most web servers across the internet are configured to treat as PHP files only files that end with .php. In case you need to have your HTML files parsed as PHP (e.g .html) or even if you want to take it further and make your PHP files look like ASP, you can do the following:

For web servers using PHP as apache module:

AddType application/x-httpd-php .html .htm

For web servers running PHP as CGI:

AddHandler application/x-httpd-php .html .htm

In case you wish to do the ASP mimick:

For PHP as module:

AddType application/x-httpd-php .asp

OR

For PHP as CGI:

AddHandler application/x-httpd-php .asp

2009/11/16

Installing nagios in the server

Installing Nagios:



1. Download tar ball from www.nagios.org extract it
2. Go to the extracted directory and give following commands:

# ./configure --prefix=/usr/local/nagios

# make all

##### create nagios user and group###

# groupadd nagios

# adduser -g nagios nagios

# passwd nagios -------> set passwd to nagios

##### Give following cmds ###

# make install

# make install-init

# make install-commandmode

# make install-config

3. Create dir nagios in your documentroot of http server. For example: your docroot
is /var/www/html then create diirectory

mkdir /var/www/html/nagios

4. Change owner and group to nagios:nagios

chown nagios:nagios

5. cp -ap /usr/local/nagios/share/* /var/www/html/nagios

6. Now check in your browser http://localhost/nagios

7. remove "sample" from filenames of all configuration files which are under /usr/local/nagios/etc/

8. open /usr/local/nagios/etc/cgi.cfg and replace following line

physical_html_path=/usr/local/nagios/share ----------> to -------->

physical_html_path=/var/www/html/nagios

use_authentication=1 -------> to ---------> use-authentication=0


9. mkdir /var/www/html/nagios/cgi-bin

10. chown nagios:nagios /var/www/html/nagios/cgi-bin

11. cp -ap /usr/local/nagios/sbin/* /var/www/html/nagios/cgi-bin

12. in httpd.conf add following line:

ScriptAlias /nagios/cgi-bin/ "/var/www/html/nagios/cgi-bin/" ------> PLEASE DO NOT
FORGET to GIVE "/" in the END.

13. Restart Apache

14. Start nagios deamon

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ------> For testing conf

/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg -d &

15. Check nagios is started or not

ps -ef|grep nagios

16. Check again in your browser http://localhost/nagios and try clicking on different "menus in side
bar." It shuld show you some status.

17. Installing nagios plugins -->

18. untar nagios-plugins tarball.

19. go to that directory and execute following commands:

./configure --prefix=/usr/local/nagios/

make

make install

20. It will install nagios-plugins in following dir : /usr/local/nagios/libexec/

21. For refreshing nagios deamon:

killall -HUP /usr/local/nagios/bin/nagios

How to install FFMPEG in the server

Following are the steps to install ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encoder, and Libog from source. It should work on most systems, however may need some tweaking from system to sytem.

cd /usr/local/src

Download source tarballs:

wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2

Extract the tarballs:

tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.0.tbz2
tar zxvf flvtool2_1.0.5_rc6.tgz


Make a directory to store all the codecs:

mkdir /usr/local/lib/codecs/


Install any necessary packages:

yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
yum install subversion ruby ncurses-devel

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
cd /usr/local/src

Copy codecs for mplayer:

mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

If you are using secure tmp:

mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp

Installing Lame:

cd /usr/local/src/lame-3.97
./configure
make && make install

Installing Libogg:

cd /usr/local/src/libogg-1.1.3
./configure && make && make install

Installing libvorbis:

cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install

Installing flvtool2:

cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

cd /usr/local/src/mplayer
./configure && make && make install

Installing ffmpeg:

cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
make && make install

ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

Installing ffmpeg-php:

cd /usr/local/src/ffmpeg-php-0.5.0/
phpize
./configure
make
make install

Note: Make sure this is the correct php.ini for this server.

echo 'extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so' >> /usr/local/Zend/etc/php.ini

Restart apache:

service httpd restart

You should be ready to go now!

Note: up2date can be used if you don't have yum installed.

Optimizing MySQL

Optimizing MySQL
mysql_fix_privilege_tables
mysqlcheck -o –all-databases

Open /etc/my.cnf
[mysqld]
max_connections=500
safe-show-database
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
key_buffer_size=256M
table_cache=150
thread_cache_size=200
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock

[mysql.server]
user = mysql
basedir = /var/lib

[safe_mysqld]
err-log = /var/log/mysqld.log
pid-file = /var/run/mysqld/mysqld.pid

Below are notes on some of the important variables, I took down while tuning the config file.

1. QUERY CACHE
query_cache_size:
* MySQL 4 provides one feature that can prove very handy - a query cache. In a situation where the database has
to repeatedly run the same queries on the same data set, returning the same results each time, MySQL can cache the result
set, avoiding the overhead of running through the data over and over and is extremely helpful on busy servers.

query_cache_limit : a total size of memory that server utilizes for caching results of queries

query_cache_type : 0 - Off
1 - Cache all query results except for those that begin with SELECT SQL_NO_CACHE
2 - Cache results only for queries that begin with SELECT SQL_CACHE.

2. key_buffer_size:
* The value of key_buffer_size is the size of the buffer used with indexes. The larger the buffer, the faster
the SQL command will finish and a result will be returned. Ideally, it will be large enough to contain
all the indexes (the total size of all .MYI files on the server).
Using a value that is 25% of total memory on a machine that mainly runs MySQL is quite common.

The Key_reads/Key_read_requests ratio < 0.01
The Key_writes/Key_write_requests ratio ~ 1

SHOW STATUS;

3. LOG
log : Whether logging of all statements to the general query log is enabled. See Section 5.3.2, “The General Query Log”.
log_error : The location of the error log. This variable was added in MySQL 4.0.10.
log_slow_queries : Whether slow queries should be logged. “Slow” is determined by the value of the long_query_time
variable.

4. table_cache:
* The default is 64. Each time MySQL accesses a table, it places it in the cache. If the system accesses many
tables, it is faster to have these in the cache. MySQL, being multi-threaded, may be running many queries on the table at
one time, and each of these will open a table. Examine the value of open_tables at peak times. If you find it stays at the
same value as your table_cache value, and then the number of opened_tables starts rapidly increasing, you should increase
the table_cache if you have enough memory.

check for Open_tables
SHOW STATUS;

5. sort_buffer_size: Each thread that needs to do a sort allocates a buffer of this size. Increase this value for faster
ORDER BY or GROUP BY operations.

6. read_rnd_buffer_size:
* The read_rnd_buffer_size is used after a sort, when reading rows in sorted order. If you use many queries with
ORDER BY, upping this can improve performance. Remember that, unlike key_buffer_size and table_cache, this buffer is
allocated for each thread. This variable was renamed from record_rnd_buffer in MySQL 4.0.3. It defaults to the same size as
the read_buffer_size. A rule-of-thumb is to allocate 1KB for each 1MB of memory on the server, for example 1MB on a machine
with 1GB memory.

7. thread_cache_size:
* If you have a busy server that’s getting a lot of quick connections, set your thread cache high enough that the
Threads_created value in SHOW STATUS stops increasing. This should take some of the load off of the CPU.

8. tmp_table_size:
* “Created_tmp_disk_tables” are the number of implicit temporary tables on disk created while executing statements
and “created_tmp_tables” are memory-based. Obviously it is bad if you have to go to disk instead of memory all the time.

Increase the value of tmp_table_size if you do many advanced GROUP BY queries and you have lots of memory.
This variable does not apply to user-created MEMORY tables.

9. innodb_buffer_pool_size
While the key_buffer_size is the variable to target for MyISAM tables, for InnoDB tables, it is innodb_buffer_pool_size.
Again, you want this as high as possible to minimize slow disk usage. On a dedicated MySQL server running InnoDB tables,
you can set this up to 80% of the total available memory.

10. innodb_additional_mem_pool_size
This variable stores the internal data structure. Make sure it is big enough to store data about all your InnoDB tables
(you will see warnings in the error log if the server is using OS memory instead).

11. max_connections

12. wait_timeout=500
This variable determines the timeout in seconds before mysql will dump a connection. If set to low
you will likely receive mySQL server has gone away errors in your log, which in vBulletins case is quite common.

13. max_allowed_packet
The maximum size of one packet or any generated/intermediate string.
Again if set to low (the default is 8M) users will likely experience errors. 16M has always
worked fine for my production environments.

You can grab a mySQL performance script from the guys at hackmysql.com( http://hackmysql.com/mysqlreport ). I use it to
tell me how the database is performing under load. You can run this from any shell when you are loaded with traffic.
Nothing fancy but should give you an idea.

==================================
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html
http://dev.mysql.com/doc/refman/4.1/en/server-status-variables.html