Install yum:
Download the rpm from the below link:
http://mirror.centos.org/centos/5.3/extras/x86_64/RPMS/yumex-2.0.3-2.el5.centos.noarch.rpm
Steps:
http://bashcurescancer.com/man/cmd/yum
1) To find the bit of the server OS
[root]#uname -i
2) To find the OS name
[root]#cat /etc/redhat-release
3) You can find the rpm packages in the website
http://mirror.centos.org/
4) Execute all commands inside /usr/local/src/
4) Put the commands containing RPM in a file and can execute the file with
[root]#sh filename
5) If you get dependency error use the command
[root]#rpm -Uvh --nodeps
Some files, Some Packages..
For example:
http://mirror.centos.org/centos/5.3/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.2.7.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
5)Verify the installations by typing
[root]#yum
Install HyperVM:
[root]#vi /etc/sysconfig/selinux
... and set SELINUX to disabled:
Run
[root]#setenforce 0
[root]#wget http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
[root]#sh ./hypervm-install-master.sh --virtualization-type=openvz
[root]#vi /etc/grub.conf
... and change default=1 to default=0 so that the OpenVZ kernel is the default kernel:
[root]#reboot
Install Webmin with virtualmin virtual servers:
Just run this:
[root]#wget http://software.virtualmin.com/gpl/scripts/install.sh
[root]#sh install.sh
Install DirectAdmin:
[root]#wget http://www.directadmin.com/setup.sh
[root]#chmod 755 setup.sh
[root]#./setup.sh
[root]#ClientID: 12345
[root]#License ID: 01234
hostname should be server.00001001.net
is eth0, NO
venet0:0
y
y
2
y
Install nginx:
Download latest stable version from here or using the following command
[root]#wget http://sysoev.ru/nginx/nginx-0.6.35.tar.gz
Now you have nginx-0.6.35.tar.gz file unpack this file using the following command
[root]#tar -zvxf nginx-0.6.35.tar.gz
[root]#cd nginx-0.6.35
Now you need to start installation so for this you need to check what options you want to use from here http://wiki.codemongers.com/NginxInstallOptions
In this installation we are using only two options --sbin-path and --with-http_ssl_module
[root]#./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
After completion of installation you should see similar to the following details which are very useful make a note of them
nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/sbin”
nginx configuration file: “/usr/local/nginx/conf/nginx.conf”
Start Nginx using the following command
[root]#/usr/local/sbin/nginx
Now you can navigate your web browser and point the follow url
[root]#http://yourserverip
You should see welcome to nginx message
Copy the below nginx startup script into the /etc/init.d directory
********************************
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
. /etc/default/nginx
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
reload)
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
********************************
Now you need to make scipt executable
[root]#chmod +x /etc/init.d/nginx
Now we have the base script prepared, we need to add it to the default run levels using the following command
[root]#/usr/sbin/update-rc.d -f nginx defaults
From now you can use the following commands to start,stop and restart nginx.By default nginx will not provide this scripts
[root]# /etc/init.d/nginx start
[root]# /etc/init.d/nginx stop
[root]# /etc/init.d/nginx restart
Install litespeed:
[root]#cd /usr/src
[root]#wget http://litespeedtech.com/packages/3.0/lsws-3.1.1-std-i386-linux.tar.gz
[root]#tar -xvzf lsws-3.1.1-std-i386-linux.tar.gz
[root]#cd lsws-3.1.1
[root]#./install.sh
You will encounter few questions and need to select the following options:
Do you agree with above license? Yes
Destination [/opt/lsws]: /opt/lsws [ /usr/local/lsws can also be used]
User name [admin]: admin
Password: youradminpassword
Retype password: youradminpassword
User [nobody]: nobody [use a non-system user that doesn't have a shell access and home directory]
Group [nobody]: nobody [group the webserver will be running as]
HTTP port [8088]: 1080 [you can give any port you wish to run lsws. If any other webserver is running on this port, stop it before starting lsws]
Admin HTTP port [7080]: 7080
Both these ports should be enabled in the firewall
Setup up PHP [Y/n]: Y
Suffix for PHP script(comma separated list) [php]: php
Would you like to change PHP opcode cache setting [y/N]? N
Would you like to install AWStats Add-on module [y/N]? N
Would you like to import Apache configuration [y/N]? N
Would you like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]? Y
Would you like to start it right now [Y/n]? Y
LiteSpeed Web Server started successfully! Have fun!
Take http://100.100.100.100:1080/ on the browser, you will see a Litespeed welcome page.
Let us check if it is listening to the port we have mentioned.
[root]# netstat -pant | grep lshttpd
tcp 0 192.168.1.19:7080 0.0.0.0:* LISTEN 18718/lshttpd
tcp 0 192.168.1.19:80 0.0.0.0:* LISTEN 18718/lshttpd
You can manage the admin area at http://100.100.100.100:7080/.
The log files are located at /opt/lsws/logs.
LiteSpeed Web Server works very well with cPanel managed web sites. The performance will increase up to 10x times by replacing apache with lsws.
To replace Apache with LSWS :-
Access admin area at http://100.100.100.100:7080 and with the admin username and password.
Goto Configurations >> Server >> General.
Keeping the cursor against the button along with each option will give you a small definition about the same.
Scroll down to “Using Apache Configuration File”
Load Apache Configuration => Yes
Auto Reload On Changes => Yes (Changes made in WHM/cPanel will be applied automatically)
Apache Configuration File => /usr/local/apache/conf/httpd.conf
Apache Port Offset => 1000 (Try LiteSpeed on port 1080 and 1443 first, change to 0 later)
Apache IP Offset => 0
PHP suEXEC => Yes (Run PHP in suEXEC mode)
PHP suEXEC Max Conn => 8 (The maximum PHP processor each account can have)
Scroll back up to “Index Files” and set it as follows:
Index Files index.html, index.php, index.php5, index.php4, index.htm
Auto Index Not Set
Auto Index URI Not Set
Scroll down to “HT Access”
Allow Override Check: Limit, Auth, FileInfo, Indexes, Options Uncheck: None
Access File Name .htaccess
Goto Configurations >> Server >> Listeners
delete all current listeners.
Now restart the webserver
[root]#service lsws restart
[root]# /opt/lsws/fcgi-bin/lsphp -v
Download the latest stable PHP
[root]# wget http://in2.php.net/distributions/php-5.2.3.tar.gz
[root]# tar -zxf php-5.2.3.tar.gz
[root]# cd php-5.2.3
[root]# cd sapi
Download and expand latest LSAPI for PHP into the “sapi”folder:
[root]# wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.0.tgz[root]# tar -zxf php-litespeed-4.0.tgz
Change directory to php-5.2.3 and run commands:
[root]# cd ..
[root]# touch ac*
[root]# ./buildconf --force
Configure/Compile PHP:
[root]# php -i | grep configure | sed "s/'//g" | sed "s/'//g"
[root]# ./configure '--prefix=/php5' '--with-litespeed'
'--with-config-file-path=../php' --with-mysql ...[append the full options from
[root]# make
[root]# make install
Note: You must compile PCRE (Perl Compatible Regular Expressions) support in order for the default auto-index PHP script to work correctly (at least this is true for 3.0RC2).
Replace the lsphp binary in /opt/lsws/fcgi-bin/lsphp with /php-5.2.3/sapi/litespeed/php:
[root]# cd /opt/lsws/fcgi-bin/
[root]# mv lsphp lsphp.old
[root]# cp /php-5.2.3/sapi/litespeed/php lsphp
To check installation success:
[root]# /opt/lsws/fcgi-bin/lsphp -v
The php.ini file will be located at /opt/lsws/php/php.ini. If we want to use the old PHP.ini just copy it here.
[root]# cd /opt/lsws/php
[root]# mv php.ini php.ini.old
[root]# cp /usr/local/ZEND/etc/php.ini .
Restart Litespeed Webserver
Finally restart LSWS and use our new PHP binary.
[root]#/opt/lsws/bin/lswsctrl restart and thats it. You are done !!!
Install ImagicK:
[root]# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
[root]# cd /usr/local/src
[root]# wget http://pecl.php.net/get/imagick-2.2.2.tgz
[root]# tar zxvf ./imagick-2.2.2.tgz
[root]# cd imagick-2.2.2
[root]# phpize
[root]# ./configure
[root]# make
[root]# make test
[root]# make install
Add extension=imagick.so in php.ini
Install ImageMagick:
Log into your server as root via ssh
Create a new directory as below :
[root]#mkdir /home/cpimins
[root]#cd /home/cpimins
[root]#wget http://layer1.cpanel.net/magick.tar.gz
[root]#tar zxvf magick.tar.gz
[root]#cd magick
[root]#/scripts/installrpm ImageMagick
[root]#/scripts/installrpm ImageMagick-devel
[root]#sh ./install
[root]#/scripts/installimagemagick
Verify:
[root]# /usr/bin/convert --version
You can get the latest ImageMagick:
http://www.imagemagick.org/script/install-source.php#unix
Install Memcache:
[root]#wget http://pecl.php.net/get/memcache-2.1.2.tgz
[root]#tar -xvf memcache-2.1.2.tgz
[root]#cd memcache-2.1.2
[root]#phpize && ./configure --enable-memcache && make
[root]#vi /usr/local/lib/php.ini
[root]#cp modules/memcache.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
[root]#vi /usr/local/lib/php.ini
In php.ini add the extensions
extension=memcache.so
and restart apache.
Installation steps for PDO:
[root]#wget http://pecl.php.net/get/PDO
[root]#tar -xzf PDO-1.0.3.tgz
[root]#cd PDO-1.0.3/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo.so in php.ini
and restart apache.
Installation steps for PDO_Mysql:
[root]#wget http://pecl.php.net/get/PDO_MYSQL
[root]#tar -xzf PDO_MYSQL-1.0.2.tgz
[root]#cd PDO_MYSQL-1.0.2/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo_mysql.so in php.ini
and restart apache.
Install mod_evasive:
[root]#wget http://www.zdziarski.com/projects/mod_e ... 0.1.tar.gz
[root]#tar -zxf mod_evasive_1.10.1.tar.gz
[root]#cd mod_evasive
[root]#/usr/local/apache/bin/apxs -cia mod_evasive20.c
Install ionCube loader:
To install ionCube loader try the following steps.
[root]#wget http://www.ioncube.com/loader_download.php
[root]#tar -zxvf ioncube_loaders.tar.gz
[root]#cd ioncube
Copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
[root]#cp ioncube-install-assistant.php /home/username/public_html
This will show the analysis of your system configuration
[root]#mv ioncube /usr/local
[root]#vi /usr/local/lib/php.ini
Now find where other zend extentions are in the file. Paste in your new line for ioncube loader
zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.3.so
If you don’t find one just add this line in the php.ini file. Restart the web server to take effect.
[root]#/etc/init.d/httpd restart
Install mod_python:
[root]#wget http://apache.dataphone.se/httpd/modpython/mod_python-3.3.1.tgz
[root]#tar zxvf mod_python-3.3.1.tgz
[root]#cd mod_python-3.3.1
[root]#./configure --with-apxs=/usr/local/apache/bin/apxs
[root]#make
[root]#make install
Add the following into the LoadModule section in the httpd.conf file.
LoadModule python_module libexec/mod_python.so
Add module in httpd.conf file.
AddModule mod_python.c
Add the following to a .htaccess file of a domain and take a python file in the browser.
AddHandler python-program .py
PythonHandler testingpython
PythonDebug On
Install SVN:
SVN server:
To install subversion..
1. Download and extract the source tarball of subversion.
[root]#wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
[root]#tar -xzf subversion-1.4.3.tar.gz
2. Download and extract subversion dependency package to the same directory where subversion-1.4.3 resides.
[root]#wget http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz
[root]#tar -xzf subversion-deps-1.4.3.tar.gz
3. Install Subversion
[root]#cd subversion-1.4.3
[root]#./configure
[root]#make
[root]#make install
Install ASSP:
Please refer the below links for detailed description of ASSP installation:
http://www.grscripts.com/howto130.html
http://www.grscripts.com/advice5.html
Install RapidLeech:
http://www.scribd.com/doc/6459461/Rapidleech-installation
Fantastico & RVSkin:
[root]#wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/Fedora/wget-1.10.2-15.fc7.i386.rpm
[root]#wget ftp://ftp.muug.mb.ca/mirror/fedora/archive/releases/7/Everything/x86_64/os/Fedora/wget-1.10.2-15.fc7.x86_64.rpm
[root]#chattr -ia /usr/bin/wget
[root]#rpm -e wget ;
[root]#rpm -ivh --force wget-1.10.2-15.fc7.x86_64.rpm
[root]#cd /usr/local/cpanel/whostmgr/docroot/cgi
[root]#wget http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
[root]#tar -xzpf fantastico_whm_admin.tgz
[root]#rm -rf fantastico_whm_admin.tgz
RVSkin:
[root]#mkdir /root/rvadmin
[root]#cd /root/rvadmin
[root]#wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2
bunzip2 -d rvauto.tar.bz2
[root]#tar -xvf rvauto.tar
Integrate fantastico with rvskin and then
[root]#/scripts/makecpphp
[root]#perl /root/rvadmin/auto_rvskin.pl
Install git on CentOS:
[root]#yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
[root]#cd /usr/local/src
[root]#wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz
[root]#tar xvzf git-1.6.4.tar.gz
[root]#cd git-1.6.4
[root]#./configure
[root]#make
[root]#make install
[root]#cd
[root]#mkdir git-test
[root]#cd git-test
[root]#git init
Output:
Initialized empty Git repository in /root/git-test/.git/
Install FFMPEG, FFMPEG-PHP, Mencoder, Mplayer, FLVTool2, LAME MP3 Encoder and Libogg from source:
Download:
[root]#cd /usr/src/
[root]#wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
[root]#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
[root]#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
[root]#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
[root]#wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
[root]#wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
Extract:
[root]#tar zxvf lame-3.97.tar.gz
[root]#tar zxvf libogg-1.1.3.tar.gz
[root]#tar zxvf libvorbis-1.1.2.tar.gz
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
[root]#tar jxvf essential-20061022.tar.bz2
[root]#tar xjvf ffmpeg-php-0.6.0.tbz2
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
Install any necessary packages:
[root]#yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
[root]#yum install subversion ruby ncurses-devel
[root]#svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
[root]#svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
[root]#cd /usr/src/mplayer
[root]#svn update
[root]#cd /usr/src/
[root]#mkdir /usr/local/lib/codecs
[root]#mv /usr/src/essential-20061022/* /usr/local/lib/codecs
[root]#chmod -R 755 /usr/local/lib/codecs/
[root]#mkdir /usr/local/src/tmp
[root]#chmod 777 /usr/local/src/tmp
[root]#export TMPDIR=/usr/local/src/tmp
Lame:
[root]#cd /usr/src/lame-3.97
[root]#./configure
[root]#make
[root]#make install
[root]#lame
Libogg:
[root]#cd /usr/src/libogg-1.1.3
[root]#./configure --enable-shared
[root]#make
[root]#make install
[root]#PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
[root]#export PKG_CONFIG_PATH
Libvorbis:
[root]#cd /usr/src/libvorbis-1.1.2
[root]#./configure
[root]#make
[root]#make install
Flvtool2:
[root]#cd /usr/src/flvtool2_1.0.5_rc6/
[root]#ruby setup.rb config
[root]#ruby setup.rb setup
[root]#ruby setup.rb install
[root]#flvtool2
Mplayer:
[root]#cd /usr/src/mplayer/
[root]#./configure
[root]#make
[root]#make install
[root]#install -d /usr/local/bin /usr/local/etc/mplayer /usr/local/lib
[root]#install -m 755 -s mencoder /usr/local/bin
[root]#install -d /usr/local/share/man/man1
[root]#install -m 644 DOCS/man/en/mplayer.1 /usr/local/share/man/man1/
[root]#cd /usr/local/share/man/man1 && ln -sf mplayer.1 mencoder.1
[root]#install -m 755 -s mplayer /usr/local/bin
FFMPEG:
[root]#cd /usr/src/ffmpeg
[root]#./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
[root]#make
[root]#make install
[root]#export LD_LIBRARY_PATH=/usr/local/lib/
[root]#ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
[root]#ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
[root]#ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
[root]#ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
[root]#ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
FFMPEG_PHP:
[root]#cd /usr/src/ffmpeg-php-0.6.0
[root]#mkdir /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg
[root]#phpize
v./configure
[root]#make
You will get an error as below:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error
Fix: With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32
[root]#vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
[root]#make install
Now, you have to remove the below lines completely from /usr/local/lib/php.ini:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
ffmpeg.so
[root]#vi /usr/local/lib/php.ini
Remove the below lines:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
extension = "ffmpeg.so"
Then, re-add it at the very end of the file:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "ffmpeg.so"
:wq!
[root]#/etc/init.d/httpd restart
Check in the info.php page of any domain:
[root]#cd ~username/public_html/
[root]#vi info.php
Code:
<?
phpinfo();
?>
[root]#chown username.username info.php
Access http://domain.com/info.php in your browser and search the ffmpeg-php version.
:)
No comments:
Post a Comment