Archive for the Category »Install server side software / script «

How to install Webmin?

You can install webmin by using following steps.

root@gunjan[~]#cd /usr/local/src

root@gunjan[~]#wget http://sourceforge.net/projects/webadmin/files/webmin/1.500/webmin-1.500-1.noarch.rpm/download

root@gunjan[~]#rpm -Uvh webmin-1.500-1.noarch.rpm

warning: webmin-1.500-1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID xxxxx
Preparing… ########################################### [100%]
Operating system is CentOS Linux
1:webmin ########################################### [100%]
Webmin install complete. You can now login to http://server.domain.com:10000/
as root with your root password.

How to install YUM on plain Server?

First you need to login into shell as root user than follow the steps one by one.

[root@gunjan]#mkdir /root/support  && cd /root/support

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/gmp-4.1.4-10.el5.i386.rpm

[root@gunjan]#rpm -Uvh gmp-4.1.4-10.el5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/readline-5.1-3.el5.i386.rpm

[root@gunjan]#rpm -Uvh readline-5.1-3.el5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-2.4.3-27.el5.i386.rpm

[root@gunjan]#rpm -Uvh python-2.4.3-27.el5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/libxml2-2.6.26-2.1.2.8.i386.rpm

[root@gunjan]#rpm -Uvh libxml2-2.6.26-2.1.2.8.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/libxml2-python-2.6.26-2.1.2.8.i386.rpm

[root@gunjan]#rpm -Uvh libxml2-python-2.6.26-2.1.2.8.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/expat-1.95.8-8.2.1.i386.rpm

[root@gunjan]#rpm -Uvh expat-1.95.8-8.2.1.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm

[root@gunjan]#rpm -Uvh python-elementtree-1.2.6-5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/sqlite-3.3.6-5.i386.rpm

[root@gunjan]#rpm -Uvh sqlite-3.3.6-5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm

[root@gunjan]#rpm -Uvh python-sqlite-1.1.7-1.2.1.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/elfutils-0.137-3.el5.i386.rpm

[root@gunjan]#rpm -Uvh elfutils-0.137-3.el5.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/rpm-python-4.4.2.3-18.el5.i386.rpm

[root@gunjan]#rpm -Uvh rpm-python-4.4.2.3-18.el5.i386.rpm

[root@gunjan]#It will throw following error.

[root@gunjan]# rpm -Uvh rpm-python-4.4.2.3-18.el5.i386.rpm

warning: rpm-python-4.4.2.3-18.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
popt = 1.10.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.i386
rpm = 4.4.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.i386
rpm-libs = 4.4.2.3-18.el5 is needed by rpm-python-4.4.2.3-18.el5.i386

In that case search dependencies in following URL

http://rpm.pbone.net/

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/m2crypto-0.16-6.el5.6.i386.rpm

[root@gunjan]#rpm -Uvh m2crypto-0.16-6.el5.6.i386.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm

[root@gunjan]#rpm -Uvh python-urlgrabber-3.1.0-5.el5.noarch.rpm

[root@gunjan]#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm

[root@gunjan]#rpm -Uvh yum-3.2.22-20.el5.centos.noarch.rpm

It will throw following error.

[root@gunjan]# rpm -Uvh yum-3.2.22-20.el5.centos.noarch.rpm
warning: yum-3.2.22-20.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
python-iniparse is needed by yum-3.2.22-20.el5.centos.noarch
rpm-python is needed by yum-3.2.22-20.el5.centos.noarch
yum-fastestmirror is needed by yum-3.2.22-20.el5.centos.noarch
yum-metadata-parser >= 1.1.0 is needed by yum-3.2.22-20.el5.centos.noarch

In that case search dependencies in following URL

http://rpm.pbone.net/

Once you complete all dependencies you can update yum by using following command

[root@gunjan]#yum -y update

How to install install Eaccelerator?

To install Eaccelerator manually refer following steps one by one carefully.

1. First you need to login into shell as root user

2. Now we’ll make the eaccelerator directory:

root@gunjan[]#cd ~

root@gunjan[~]#mkdir /eaccelerator/

root@gunjan[~]#cd /eaccelerator/

2. Now download the source file

root@gunjan[~]#wget http://heanet.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.4-rc1.tar.bz2

root@gunjan[~]#bzip2 -d eaccelerator-0.9.4-rc1.tar.bz2

root@gunjan[~]#tar xvf eaccelerator-0.9.4-rc1.tar

3. Now install Eaccelerator:

root@gunjan[~]#cd eaccelerator-0.9.4-rc1/

root@gunjan[~]#export PHP_PREFIX=”/usr”

root@gunjan[~]#$PHP_PREFIX/bin/phpize

root@gunjan[~]#./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config

root@gunjan[~]#make

root@gunjan[~]#make install

4. Now basically eaccelerator installed, now we need to edit the php.ini files to
include Eaccelerator extension.

root@gunjan[~]#php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

root@gunjan[~]#pico /usr/local/lib/php.ini

copy and paste following lines php.ini carefully
———————-
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?
———————-

For a Zend extension install server (only if you have Zend installed on your server, or
if you’re going to install it)

———————-
zend_extension=”/usr/lib/php4/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?
———————-

5. Now you need to make the cache directory on your server, where the cache files will be
stored for eaccelerator
root@gunjan[]#cd ~

root@gunjan[~]#mkdir /tmp/eaccelerator/

root@gunjan[~]#chmod 0777 /tmp/eaccelerator/

6. Now restart Apache so that Eaccelerator will start working:

service httpd restart

Now check eAccelerator by using following command

root@gunjan[~]#php -v
PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Nov 20 2009 14:28:34)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with the ionCube PHP Loader v3.3.7, Copyright (c) 2002-2009, by ionCube Ltd., and
with SourceGuardian v8.0, Copyright (c) 2000-2009, by Inovica Ltd.
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH

You done it enjoy :)

How to patch openssl version?

You can patch openssl version by using following steps but make sure that you are able to SSH server as root user user.

root@gunjan[/usr/local/src]#cd /usr/local/src
root@gunjan[/usr/local/src]#wget http://www.openssl.org/source/openssl-0.9.8h.tar.gz
root@gunjan[/usr/local/src]#tar -zxf openssl-0.9.8h.tar.gz
root@gunjan[/usr/local/src]#cd openssl-0.9.8h
root@gunjan[/usr/local/src]#./Configure –prefix=/usr debug-linux-pentium (or choose right os)
root@gunjan[/usr/local/src]#make
root@gunjan[/usr/local/src]#make install

To check openssl version simply run openssl version

root@gunjan[/usr/local/src]#openssl version

Step by step instructions to install VNC

Refer following step by step instructions to install VNC
1) As root user fire the commands

yum install vnc-server xorg-x11-xauth xorg-x11 twm xterm

2) if yum is not working, download the rpm using “wget http://mirror.pacific.net.au/linux/CentOS/4.2/os/i386/CentOS/RPMS/vnc-server-4.0-8.1.i386.rpm
2.1) install vncserver by the command “rpm -Uvh vnc-server-4.0-8.1.i386.rpm

3) start vncserver by “vncserver :0“. You will be asked for password, set the password you require.

4) try to vnc into your Linux box from Windows to your Linux box using server_ip:5900 eg. 192.168.0.21:5900
4.1) if it doesn’t work, bring down your firewall by doing “service iptables stop” and vnc from your Windows again.

5) you can stop the vncserver by using command “vncserver -kill :0

6) remember to bring your firewall back up “service iptables start”

7) you might want to have gnome, kde running.. in that case look into your ~/.vnc/xstartup file, uncomment two lines (# unset SESSION_MANAGER and # exec /etc/X11/xinit/xinitrc)

8) If gnome is not install, Install Gnome using “yum install gnome-* ” and set the server to use gnome desktop using “switchdesk gnome” and restart VNC.

9) you might want to start vncserver when the system reboots, use “chkconfig –level 345 vncserver on”

10) You can change the VNC server password using “vncpasswd

Note : If getting error while starting VNC
——
[root@202 conf]# vncserver :0
vncserver: couldn’t find “xauth” on your PATH.
——
do:
check if xauth is installed

which xauth
yum install xorg-x11-xauth
yum install xorg-x11
yum install twm
yum install xterm

How to install shoutcast

Basically most of the people don’t like to run shoutcast as root as that can be really harmful due to that its better if we create shoutcast user and then run shoutcast on server.
Following are the basic steps to install shoutcast on server

1.) Login to root

2.) adduser shoutcast

3.) passwd shoutcast

Once you add user “shoutcast” login as the new user “shoutcast”.

Lets wget shoutcast from the shoutcast.com provider

wget ftp://ftp.skynet.be/mirror1/tucows.skynet.be/linux/files/shoutcast-1-9-2-linux-glibc6.tar.gz

The extract shoutcast:

tar -zxvf shoutcast-1-9-2-linux-glibc6.tar.gz

rm -rf shoutcast-1-9-2-linux-glibc6.tar.gz
mv shoutcast-1-9-2-linux-glibc6 shoutcast
cd shoutcast

Now you can configure shoutcast?

You need to edit the shoutcast configuration.

pico sc_serv.conf
or
nano sc_serv.conf

MaxUser
Password
PortBase

uncomment AdminPassword and set an admin password as per your requirement.

Now you can save and start shoutcast and it will work perfectly for you without any problem.

to save crtl+x

Steps to start shoutcast?

./sc_serv sc_serv.conf

Install mod proxy

First login into your server with the root login details

cd /home/cpapachebuild/buildapache/apache_1.3.31/src/modules/proxy/

or

cd /home/cpeasyapache/src/httpd-2.0.63/modules/proxy

Then run command:

/usr/local/apache/bin/apxs -i -c *.c

Add the following module to the httpd.conf to load proxy module with the httpd configuration file:

LoadModule proxy_module libexec/mod_proxy.so

And then restart the Apache service:
service httpd restart
or
/etc/init.d/httpd restart

You can check proxy installed or not on your server by using following command.

/usr/local/apache/bin/httpd -l | grep proxy

Simply check server is SuExec or not?

From your shell run following command

[root@xx.xx.xx.xx ~]#/usr/local/cpanel/bin/rebuild_phpconf –current

DEFAULT PHP: 5
PHP4 SAPI: suphp
PHP5 SAPI: suphp
SUEXEC: enabled

or make a php file under any account and change the permissions on that file to 777 and open it in a browser. If it gives 500 Internal Server Error, your most probably running suPHP.

Alternatively,
If you have access to WHM – login, in the menu find Configure PHP and SuExec
Check the drop down box for “PHP 4/5 Handler” – and if beside that it says “suPHP” – then your server is running it.

SuPHP activity is logged in /usr/local/apache/logs/suexec_log. If you tail it, you will see if there is any current activity:
Code:
tail -f /usr/local/apache/logs/suexec_log

you can also get this information from PHP INFO page:

IF

Server API = Apache then server is not running PHP in SuExec mode

And if

Server API = CGI the server is running PHP in SuExec mode

That’s all now you are sure about your server is SuExec or not

How to install zend optimizer?

Install zend optimizer by using following steps.

wget http://downloads.zend.com/optimizer/3.0.1/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz

cd ZendOptimizer-3.0.1

./install.sh

Follow the instructions on the screen you will receive after ./install.sh

Restart the Apache service

To check zend optimizer run

php  -v