linux +apache+php

server install

1、os install

 complete install
2、soft remove&&change

 rpm -e mysql-server
 rpm -e mysql-devel
 rpm -e mysqlclient10-devel
 rpm -e MySQL-python
 rpm -e libdbi-dbd-mysql
 rpm -e MyODBC
 rpm -e qt-MySQL
 rpm -e mysqlclient10


 rpm -e php-mysql
 rpm -e –nodeps mysql
 rpm -ivh MySQL-client-community-5.0.41-0.rhel4.i386.rpm
 rpm -ivh MySQL-devel-community-5.0.41-0.rhel4.i386.rpm
 rpm -ivh MySQL-shared-compat-5.0.41-0.rhel4.i386.rpm
  
3、install oracle client

 cd /usr
 tar xjvf local/soft/oracle_client_10.1.0.3.i386.tar.bz2
 
 vi /etc/profile
 export ORACLE_HOME=/usr/oracle
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
 export PATH=$ORACLE_HOME/bin:$PATH
 export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
 
 . /etc/profile

4、install  httpd

 tar -xzvf httpd-2.2.4.tar.gz
 cd httpd-2.2.4
 ./configure –prefix=/usr/local/apache –enable-usertrack –enable-cgi –enable-so –enable-mods-shared=all
 make
 make install
 
 
 
5、install php

 tar xzvf php-5.2.2.tar.gz
 cd php-5.2.2
 ./configure  –prefix=/usr/local/php  –with-gd  –with-jpeg-dir  –with-zlib  –with-png  –with-mysql  –with-mysqli  –enable-magic-quotes  –with-apxs2=/usr/local/apache/bin/apxs  –enable-force-cgi-redirect  –enable-ftp  –with-ttf  –enable-gd-native-ttf  –with-oci8  –enable-mbstring  –with-config-file-path=/usr/local/php  –enable-track-vars  –enable-url-includes  –enable-sockets  –with-iconv  –enable-shmop  –enable-sysvsem
 make
 make install
 
6、install the Zend Optimizer

 tar -xzvf ZendOptimizer-3.2.6-linux-glibc21-i386.tar.gz
 cd ZendOptimizer-3.2.6-linux-glibc21-i386
 ./install.sh
 
7、install eaccelerator

 tar xjvf eaccelerator-0.9.5.1.bz2
 cd eaccelerator-0.9.5.1
 /usr/local/php/bin/phpize
 ./configure –with-libdir=/usr/local/php/lib –with-php-config=/usr/local/php/bin/php-config
 make
 make install
 

8、install memcache

 tar vxzf memcache-2.1.2.tgz
 cd memcache-2.1.2
 /usr/local/php/bin/phpize
 ./configure –enable-memcache –with-php-config=/usr/local/php/bin/php-config –with-zlib-dir
 make
 make install

10、ImageMagick

 tar xzvf ImageMagick-6.3.4-4.tar.gz
 cd ImageMagick-6.3.4
 ./configure –prefix=/usr/local/imagemagick -enable-lzw  -with-modules
 make
 make install

11、ImageMagick-php

 tar xzvf MagickWandForPHP-1.0.4.tar.gz
 cd MagickWandForPHP-1.0.4
 /usr/local/php/bin/phpize
 ./configure –with-libdir=/usr/local/php/lib –with-php-config=/usr/local/php/bin/php-config –with-magickwand=/usr/local/imagemagick
 make
 make install

12、change environment
 
 vi /usr/local/apache/bin/envvars
 export ORACLE_HOME=/usr/oracle
 export LD_LIBRARY_PATH=$ORACLE_HOME/libi:/usr/local/apache/lib:$LD_LIBRARY_PATH
 export PATH=$ORACLE_HOME/bin:$PATH
 export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
 
12、change apache.conf
 vi /usr/local/apache/conf/httpd.conf
 DirectoryIndex index.php
 AddType application/x-httpd-php .php
 ExpiresActive on
 ExpiresByType image/* “access plus 1 days”
 ServerTokens Prod
 ServerSignature Off

13、change php.ini
 vi /usr/local/php/php.ini
 extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613″
 extension=magickwand.so
 extension=memcache.so
 extension=eaccelerator.so
 eaccelerator.shm_size=”32″
 eaccelerator.cache_dir=”/tmp/cache/eaccelerator”
 eaccelerator.enable=”1″
 eaccelerator.optimizer=”1″
 eaccelerator.check_mtime=”1″
 eaccelerator.debug=”0″
 eaccelerator.filter=”"
 eaccelerator.shm_max=”64″
 eaccelerator.shm_ttl=”0″
 eaccelerator.shm_prune_period=”0″
 eaccelerator.shm_only=”0″
 eaccelerator.compress=”1″
 eaccelerator.compress_level=”9″

14、other
 mkdir -p /tmp/cache/eaccelerator
 chmod -R 777 cache
 
 
15、os user
 useradd -d /redpoo -s /bin/bash  -g daemon -u 500  rspd



评论暂缺

(Required)
(Required, will not be published)