Install dependensi PHP, modul, and tools
#yum -y install gcc gcc-c++ glibc make automake GeoIP GeoIP-devel GeoIP-data fontconfig fontconfig-devel gd gd-devel pam pam-devel openldap openldap-devel libXpm libXpm-devel libtool libaio libaio-devel libtool-ltdl libtool-ltdl-devel libmcrypt libmcrypt-devel mhash mhash-devel unixODBC unixODBC-devel zip unzip nano perl openssl openssl-devel pcre pcre-devel bzip2 bzip2-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel aspell aspell-devel
#yum -y update
#yum -y install gnupg curl curl-devel libidn libidn-devel libc-client libc-client-devel.`uname -i` libxslt tidy libtidy libtidy-devel
#yum -y install libxml2-devel
Install MySQL 5.5.10
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-shared-compat-5.5.10-1.linux2.6.`uname -i`.rpm
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-shared-5.5.10-1.linux2.6.`uname -i`.rpm
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-devel-5.5.10-1.linux2.6.`uname -i`.rpm
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-embedded-5.5.10-1.linux2.6.`uname -i`.rpm
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-server-5.5.10-1.linux2.6.`uname -i`.rpm
#wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-client-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-shared-compat-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-shared-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-devel-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-embedded-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-server-5.5.10-1.linux2.6.`uname -i`.rpm
#rpm -Uvh http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.5/MySQL-client-5.5.10-1.linux2.6.`uname -i`.rpm
MySQL configuration
There are 5 default MySQL configuration:
There are 5 default MySQL configuration:
my-innodb-heavy-4G.cnf
my-huge.cnf
my-large.cnf
my-medium.cnf
my-small.cnf
move to “/etc/” directory and rename it to “my.cnf”
#cp /usr/share/mysql/my-small.cnf /etc/my.cnf
to save memory can by using MyISAM engine rather than InnoDB.
#nano /etc/my.cnf
add the following lines to “[mysqld]” section
default-storage-engine=MyISAM
skip-innodb
Start MySQL, create system tables, and securing.
#/etc/init.d/mysql start
#/usr/bin/mysql_install_db
#mysql_secure_installation
#/etc/init.d/mysql stop
#chkconfig --add mysql
#chkconfig mysql on
Install LiteSpeed
#wget http://www.litespeedtech.com/packages/4.0/lsws-4.1-std-i386-linux.tar.gz
#tar -zxvf lsws-4.1-std-i386-linux.tar.gz
#cd lsws-4.1
#chmod +x install.sh
#./install.sh
Do you agree with above license: Yes
Destination: /usr/local/lsws (standart LiteSpeed directory)
Username: your preferred username for administration panel
Password: your preferred password for administration panel
Email addresses: your email address
User: nobody
Group: nobody
HTTP port: 80
Admin HTTP port: choose any port above 2000
Setup PHP: Y
Suffix for PHP script: php
Install AWStats Add-on modul: N
LiteSpeed restart automatically when server restarts: Y
Would you like to start it now: Y
Destination: /usr/local/lsws (standart LiteSpeed directory)
Username: your preferred username for administration panel
Password: your preferred password for administration panel
Email addresses: your email address
User: nobody
Group: nobody
HTTP port: 80
Admin HTTP port: choose any port above 2000
Setup PHP: Y
Suffix for PHP script: php
Install AWStats Add-on modul: N
LiteSpeed restart automatically when server restarts: Y
Would you like to start it now: Y
Compiling PHP 5.3.5
Login to your LiteSpeed administration panel
Open: http://yourip:youradminport
Go to Action – Compile PHP, select PHP 5.3.5 and push next button
Login to your LiteSpeed administration panel
Open: http://yourip:youradminport
Go to Action – Compile PHP, select PHP 5.3.5 and push next button
Extra PATH environment: Leave this empty
Install Path Prefix: /usr/local/lsws/lsphp5
Install Path Prefix: /usr/local/lsws/lsphp5
Configure Parameters 32bit OS:
--prefix=/lsphp5 --with-litespeed --enable-cli --with-mcrypt --enable-mbstring --with-openssl --with-mysql=/usr/bin --with-mysqli --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --with-gd --with-zlib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-png --with-jpeg --with-gmp --with-sqlite --enable-pdo --with-libdir=lib --with-xpm-dir=/usr/lib --with-freetype-dir=/usr/include/freetype2 --with-ttf=/usr/include/freetype2 --libdir=/usr/lib --enable-gd-native-ttf --enable-fileinfo --disable-debug --with-pic --with-bz2 --with-curl --with-curlwrappers --without-gdbm --with-gettext --with-iconv --with-pspell --with-pcre-regex --with-imap --with-imap-ssl=/usr/lib --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --disable-sysvsem --disable-sysvshm --disable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic --with-system-tzdata --with-odbc --enable-gd-jis-conv --enable-dom --disable-dba --enable-xmlreader --enable-xmlwriter --with-tidy --with-xml --with-xmlrpc --with-xsl --enable-bcmath --enable-soap --enable-zip --enable-inline-optimization --with-mhash --enable-mbregex
Configure Parameters 64bit OS:
--prefix=/lsphp5 --with-litespeed --enable-cli --with-mcrypt --enable-mbstring --with-openssl --with-mysql=/usr/bin --with-mysqli --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --with-gd --with-zlib --with-jpeg-dir=/usr/lib64 --with-png-dir=/usr/lib64 --with-png --with-jpeg --with-gmp --with-sqlite --enable-pdo --with-libdir=lib64 --with-xpm-dir=/usr/lib64 --with-freetype-dir=/usr/include/freetype2 --with-ttf=/usr/include/freetype2 --libdir=/usr/lib64 --enable-gd-native-ttf --enable-fileinfo --disable-debug --with-pic --with-bz2 --with-curl --with-curlwrappers --without-gdbm --with-gettext --with-iconv --with-pspell --with-pcre-regex --with-imap --with-imap-ssl=/usr/lib64 --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --disable-sysvsem --disable-sysvshm --disable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic --with-system-tzdata --with-odbc --enable-gd-jis-conv --enable-dom --disable-dba --enable-xmlreader --enable-xmlwriter --with-tidy --with-xml --with-xmlrpc --with-xsl --enable-bcmath --enable-soap --enable-zip --enable-inline-optimization --with-mhash --enable-mbregex
Add-on Modules: eAccelerator
and then click build php and wait until configuration process done.
Click next and run this command on ssh root
and then click build php and wait until configuration process done.
Click next and run this command on ssh root
#/usr/local/lsws/phpbuild/buildphp_manual_run.sh
wait about until the process finished (it will shown **COMPLETE** status) and apply changes and Graceful restart
Check your PHP installation status
http://yourip/phpinfo.php
or
#/usr/local/lsws/fcgi-bin/lsphp5 -v
Additional Modules
Install IonCube Loader
32bit OS:
#wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
#tar -zxvf ioncube_loaders_lin_x86.tar.gz
#cd ioncube
#mv ioncube/ioncube_loader_lin_5.3.so /usr/lib/extensions/no-debug-non-zts-20090626/
64bit OS:
#wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
#tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
#mv ioncube/ioncube_loader_lin_5.3.so /usr/lib64/extensions/no-debug-non-zts-20090626/
Install Suhosin Extension
#wget http://download.suhosin.org/suhosin-0.9.32.1.tar.gz
#tar -zxvf suhosin-0.9.32.1.tar.gz
#cd suhosin-0.9.32.1
#/usr/local/lsws/lsphp5/bin/phpize
#./configure --enable-suhosin --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
#make
#make install
Create folder cache file eAccelerator
#mkdir /tmp/eaccelerator
#chmod 0777 /tmp/eaccelerator
Edit php.ini
32bit OS:
32bit OS:
#cp /usr/local/lsws/php/php.ini /usr/lib
#nano /usr/lib/php.ini
64bit OS:
#cp /usr/local/lsws/php/php.ini /usr/lib64
#nano /usr/lib64/php.ini
Add config on php.ini:
32bit OS:
32bit OS:
zend_extension="/usr/lib/extensions/no-debug-non-zts-20090626/ioncube_loader_lin_5.3.so"
zend_extension="/usr/lib/extensions/no-debug-non-zts-20090626/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"
extension="/usr/lib/extensions/no-debug-non-zts-20090626/suhosin.so"
64bit OS:
zend_extension="/usr/lib64/extensions/no-debug-non-zts-20090626/ioncube_loader_lin_5.3.so"
zend_extension="/usr/lib64/extensions/no-debug-non-zts-20090626/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"
extension="/usr/lib64/extensions/no-debug-non-zts-20090626/suhosin.so"
Restart LiteSpeed:
#/usr/local/lsws/bin/lswsctrl restart
#/usr/local/lsws/fcgi-bin/lsphp5 -v
PHP 5.3.5 (litespeed) (built: Apr 23 2011 19:21:41)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.8, Copyright (c) 2002-2011, by ionCube Ltd., and
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.8, Copyright (c) 2002-2011, by ionCube Ltd., and
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Create virtual host and add Domain:
#useradd domain.com
#passwd domain.com
#mkdir /home/domain.com/public_html /home/domain.com/cgi-bin /home/domain.com/logs
#chown -R domain.com:domain.com /home/domain.com
#chmod 755 -R /home/domain.com
Now go to litespeed admin panel
Click on Configuration –-> Virtual Host Template –-> PHP_SuEXEC
Click on Configuration –-> Virtual Host Template –-> PHP_SuEXEC
Click General tab and click edit on Template Setting
set configuration like this :
Virtual Host Root: /home/$VH_NAME/
Config File: $SERVER_ROOT/conf/$VH_NAME.xml
Max Keep-Alive Requests: -
Smart Keep-Alive: Yes
Document Root: $VH_ROOT/public_html/
Enable GZIP Compression: Yes
Enable IP GeoLocation: Not Set
Administrator Email: your email
Config File: $SERVER_ROOT/conf/$VH_NAME.xml
Max Keep-Alive Requests: -
Smart Keep-Alive: Yes
Document Root: $VH_ROOT/public_html/
Enable GZIP Compression: Yes
Enable IP GeoLocation: Not Set
Administrator Email: your email
apply changes and do gracefull restart
Add domain:
Go to Configuration – Virtual Host Templates, choose PHP_SuEXEC
Go to Configuration – Virtual Host Templates, choose PHP_SuEXEC
Go to Template tab and add Member Virtual Hosts
Virtual Host Name: domain.com
Domain: domain.com
Aliases: domain.com
Virtual Host Root: /home/domain.com/
Domain: domain.com
Aliases: domain.com
Virtual Host Root: /home/domain.com/
apply changes and do gracefull restart
Source: http://fr3akz.com
0 comments:
Post a Comment