|
RPM-E httpd
RPM-E MySQL
Rpm-e PHP
Yum-y Remove httpd php mysql-server mysql php-mysql
Setenforce 0
Yum-y Install GCC gcc-c++ Make Automake autoconf kernel-devel ncurses-devel libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel Pcre-devel libtool-libs freetype-devel gd zlib-devel file Bison patch Mlocate Flex diffutils readline-devel glibc-devel glib2-devel bzip2-devel gettext-devel libcap-devel libmcrypt-devel wget  ;unzip
Wget-c http://archive.apache.org/dist/httpd/httpd-2.2.22.tar.gz
Wget-c http://dl.mysql.cn/mysql5/5.1/mysql-5.1.63.tar.gz
Wget-c http://iweb.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.4.10.2/phpMyAdmin-3.4.10.2-all-languages.tar.gz
Wget-c Http://us2.php.net/get/php-5.2.17.tar.gz/from/am.php.net/mirror
Tar xzf httpd-2.2.22.tar.gz
Tar xzf mysql-5.1.63.tar.gz
Tar xzf php-5.2.17.tar.gz
Tar xzf phpmyadmin-3.4.10.2-all-languages.tar.gz
cd/tmp/httpd-2.2.22
./configure--prefix=/usr/local/apache--with-included-apr--enable-so--enable-deflate=shared--enable-expires= shared --enable-headers=shared--enable-rewrite=shared--enable-static-support
Make
Make install
CP build/rpm/httpd.init/etc/init.d/httpd//Use init script management httpd
chmod 755/etc/init.d/httpd//Increase execution permissions
Chkconfig--add httpd Adding httpd to service items
chkconfig httpd on //Set boot up
ln-fs/usr/local/apache//etc/httpd
Ln-fs/usr/local/apache/bin/httpd/usr/sbin/httpd
Ln-fs/usr/local/apache/bin/apachectl/usr/sbin/apachectl
LN-FS/USR/LOCAL/APACHE/LOGS/VAR/LOG/HTTPD//Set up soft links to fit init scripts
Groupadd MySQL
useradd-g MySQL MySQL
cd/tmp/mysql-5.1.63
./configure--prefix=/usr/local/mysql/--localstatedir=/usr/local/mysql/data--without-debug-- With-unix-socket-path=/tmp/mysql.sock--with-client-ldflags=-all-static--with-mysqld-ldflags=-all-static-- Enable-assembler--with-extra-charsets=gbk,gb2312,utf8--with-pthread
Make
Make install
CP support-files/my-medium.cnf/etc/my.cnf//Replication Configuration folder my.cnf
/usr/local/mysql/bin/mysql_install_db--user=mysql Initializing the database
Chown-r Root.mysql/usr/local/mysql
Chown-r mysql/usr/local/mysql/data
cp/tmp/mysql-5.1.63/support-files/mysql.server/etc/rc.d/init.d/mysqld Init startup script
Chown root.root/etc/rc.d/init.d/mysqld
chmod 755/etc/rc.d/init.d/mysqld
Chkconfig--add mysqld
chkconfig Mysqld on
Ln-s/usr/local/mysql/bin/mysql/usr/bin
Ln-s/usr/local/mysql/bin/mysqladmin/usr/bin
Service mysqld Start
/usr/local/mysql/bin/mysqladmin-u root password ' new password ' //Set Root password
Installing PHP
Cd/tmp
wget http://superb-dca2.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
wget http://superb-dca2.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
wget http://superb-sea2.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
Tar xzf libmcrypt-2.5.8.tar.gz
Tar xzf mhash-0.9.9.9.tar.gz
Tar xzf mcrypt-2.6.8.tar.gz
Install Libmcrypt
cd/tmp/libmcrypt-2.5.8
./configure--PREFIX=/USR
Make && make install
Install Libmcrypt
cd/tmp/mhash-0.9.9.9
./configure--PREFIX=/USR
Make && make install
Install MCrypt
/sbin/ldconfig//Search for a shared dynamic link library
cd/tmp/mcrypt-2.6.8
./configure
Make && make install
Resolve errors that may occur:
If Configure fails try--with-jpeg-dir=<dir>
Configure:error:libpng. (A|SO) not found.
Solve:
Yum Install libpng Libpng-devel
Ln-s/usr/lib64/libjpeg.so/usr/lib/
Ln-s/usr/lib64/libpng.so/usr/lib/
Resolve Libiconv errors that may occur
Cd/tmp
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
Tar xzf libiconv-1.14.tar.gz
CD libiconv-1.14
./configure--prefix=/usr/local/libiconv
Make && make install
cd/tmp/php-5.2.17
./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-config-file-path=/etc-- WITH-CONFIG-FILE-SCAN-DIR=/ETC/PHP.D--with-openssl--with-zlib--enable-bcmath--with-bz2--with-curl--enable-ftp- -WITH-GD--enable-gd-native-ttf--with-gettext--with-mhash--enable-mbstring--with-mcrypt-- Enable-zip--with-iconv=/usr/local/libiconv--with-mysql=/usr/local/mysql--without-pear
Make
Make install
CP Php.ini-dist/usr/local/php/etc/php.ini//Replication configuration file PHP.ini
To modify the Apache configuration file:
To add a PHP file type resolution to the/etc/httpd/conf/httpd.conf file:
Vi/etc/httpd/conf/httpd.conf
Add to
AddType application/x-httpd-php. php. Phtml. Inc.
AddType Application/x-httpd-php-source. Phps
Found it:
ServerName www.example.com:80
Modified to:
ServerName localhost:80
Service httpd Restart //restart httpd
Install ZendOptimizer-3.3.9
64 digits: http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
32 digits: http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
Cd/tmp
wget Http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
Tar xzf zendoptimizer-3.3.9-linux-glibc23-i386.tar.gz
cd/tmp/zendoptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/
Mkdir-p/usr/local/zend/lib/
CP Zendoptimizer.so/usr/local/zend/lib
Load Zendoptimizer, build/etc/php.d/zend.ini file, add the following code to load:
[Zend]
Zend_optimizer.optimization_level=15
Zend_extension=/usr/local/zend/lib/zendoptimizer.so
Service httpd Restart
Install eAccelerator-0.9.6.1
Cd/tmp
wget Http://jaist.dl.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.zip
Unzip Eaccelerator-0.9.6.1.zip
CD eaccelerator-0.9.6.1
Export php_prefix= "/usr/local/php"
$PHP _prefix/bin/phpize
./configure-enable-eaccelerator=shared-with-php-config= $PHP _prefix/bin/php-config
Make && make install
Cd/tmp
mkdir Eaccelerator
chmod 0777 Eaccelerator
PHP Zenddebugger failed to load
viewing information with Php-v
[Root@e modules]# Php-v
Failed Loading/usr/lib64/php/modules/zenddebugger.so:libssl.so.0.9.8:cannot Open Shared object file:no such file or di Rectory
Failed loading/usr/local/zend/lib/zendoptimizer.so:/usr/local/zend/lib/zendoptimizer.so:undefined symbol:zend_ Throw_exception_internal
Failed Loading/usr/lib64/php/modules/zenddebugger.so:libssl.so.0.9.8:cannot Open Shared object file:no such file or di Rectory
Warning:directive ' register_long_arrays ' is deprecated in PHP 5.3 and greater into Unknown on line 0
Warning:directive ' MAGIC_QUOTES_GPC ' is deprecated in PHP 5.3 and greater into Unknown on line 0
PHP 5.3.3 (CLI) (Built:nov 22 2013 10:59:29)
Copyright (c) 1997-2010 the PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Reason: Because the latest Linux distributions libssl and libcrypto have been upgraded to 1.0.0
Solution: Just create the corresponding soft link can
[Root@e modules]# ll/usr/lib64/libssl*
-rwxr-xr-x. 1 root root 221568 2?? 2013/usr/lib64/libssl3.so
lrwxrwxrwx. 1 root root 16 11?? 19:31/usr/lib64/libssl.so-> libssl.so.1.0.1e
lrwxrwxrwx. 1 root root 16 11?? 19:31/usr/lib64/libssl.so.10-> libssl.so.1.0.1e
-rwxr-xr-x. 1 root root 436984 12?? 4 2013/usr/lib64/libssl.so.1.0.1e
To establish a soft connection:
Ln-s/usr/lib64/libssl.so.1.0.1e/usr/lib64/libssl.so.0.9.8
[Root@e modules]# ll/usr/lib64/libcrypto*
lrwxrwxrwx. 1 root root 19 11?? 19:31/usr/lib64/libcrypto.so-> libcrypto.so.1.0.1e
lrwxrwxrwx. 1 root root 19 11?? 19:31/usr/lib64/libcrypto.so.10-> libcrypto.so.1.0.1e
-rwxr-xr-x. 1 root root 1946880 12?? 4 2013/usr/lib64/libcrypto.so.1.0.1e
To establish a soft connection:
Ln-s/usr/lib64/libcrypto.so.1.0.1e/usr/lib64/libcrypto.so.0.9.8
|