PHP静态编译安装
groupadd mysql useradd mysql -g mysql cd /root tar zxvf ...
扫描右侧二维码阅读全文
19
2008/06

PHP静态编译安装

groupadd mysql useradd mysql -g mysql cd /root tar zxvf mysql-5.0.51a.tar.gz cd mysql-5.0.51a ./configure --prefix=/usr/local/mysql make && make install ./scripts/mysql_install_db --user=mysql cd /usr/local/mysql chown -R root /usr/local/mysql chgrp -R mysql /usr/local/mysql chown -R root /usr/local/mysql/bin chgrp -R mysql /usr/local/mysql/bin chown -R root /usr/local/mysql/var chgrp -R mysql /usr/local/mysql/var chmod 777 /usr/local/mysql/var chown -R root /usr/local/mysql/var/mysql chgrp -R mysql /usr/local/mysql/var/mysql chmod 777 /usr/local/mysql/var/mysql chown -R root /usr/local/mysql/var/mysql/* chgrp -R mysql /usr/local/mysql/var/mysql/* chmod 777 /usr/local/mysql/var/mysql/* chmod 777 /usr/local/mysql/lib/mysql/libmysqlclient.a cd /root tar zxvf httpd-2.2.4.tar.gz cd httpd-2.2.4 ./configure --prefix=/usr/local/apache2 --enable-deflate --enable-headers --enable-shared=max --enable-module=rewrite --enable-module=so make && make install cd /root tar zxvf libevent-1.3e.tar.gz cd libevent-1.3e ./configure --prefix=/usr/local/libevent make && make install cd /root tar zxvf memcached-1.2.2.tar.gz cd memcached-1.2.2 ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent make && make install cp /usr/local/libevent/lib/libevent-1.3e.so.1 /usr/lib /usr/local/memcached/bin/memcached -d -m 50 -p 11211 -u root cd /root tar zxvf libxml2-2.6.30.tar.gz cd libxml2-2.6.30 ./configure --prefix=/usr/local/libxml make && make install cd /root tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/zlib make && make install cd /root tar zxvf libpng-1.2.19.tar.gz cd libpng-1.2.19 ./configure --prefix=/usr/local/libpng make && make install cd /root tar zxvf freetype-2.3.5.tar.gz cd freetype-2.3.5 ./configure --prefix=/usr/local/freetype make && make install cd /usr/local mkdir jpeg cd jpeg mkdir include lib man bin mkdir man/man1 cd /root tar zxvf jpegsrc.v6b.tar.gz cd jpeg-6b ./configure --prefix=/usr/local/jpeg --enable-shared --enable-static make && make install cp -Rf /usr/local/libpng/include/* /usr/include/ cd /root tar zxvf gd-2.0.35.tar.gz cd gd-2.0.35 ./configure --prefix=/usr/local/gd --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/jpeg make && make install cd /root rpm -ivh jdk-1_5_0_15-linux-i586.rpm rpm -ivh jre-6u5-linux-i586.rpm rpm -ivh oracle-instantclient-basic-10.2.0.3-1.i386.rpm rpm -ivh oracle-instantclient-devel-10.2.0.3-1.i386.rpm cd /root tar -zvxf php-5.2.4.tar.gz cd /root/php-5.2.4 ./configure --prefix=/usr/local/php5 --with-zlib-dir=/usr/local/zlib/ --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php5 --with-openssl --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg/ --with-png-dir=/usr/local/libpng/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd/ --with-iconv --with-libxml-dir=/usr/local/libxml --enable-zip --with-oci8=share,instantclient,/usr/lib/oracle/10.2.0.3/client/lib make && make install cp php.ini-dist /usr/local/php5/php.ini cd /root tar zxvf memcache-2.2.0.tgz cd memcache-2.2.0 /usr/local/php5/bin/phpize ./configure --enable-memcache --with-php-config=/usr/local/php5/bin/php-config --with-zlib-dir make && make install cd /root tar zxvf php-java-bridge_5.2.2.tar.gz cd php-java-bridge-5.2.2 /usr/local/php5/bin/phpize ./configure --with-java=/usr/java/jdk1.5.0_15,/usr/java/jre1.6.0_05 --with-php-config=/usr/local/php5/bin/php-config make && make install cd /usr/local/php5 mkdir ext cp -Rf /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/* /usr/local/php5/ext mkdir /var/www /usr/local/apache2/bin/apachectl restart =============================================================== 修改http.conf文件 LoadModule php5_module modules/libphp5.so 后面添加 AddType application/x-httpd-php .php 加入index.php DirectoryIndex index.php index.html 修改路径 DocumentRoot "/var/www" 增加deflate压缩模块 DeflateCompressionLevel 9 SetOutputFilter DEFLATE DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate CustomLog logs/deflate_log.log deflate 修改php.ini extension_dir = "/usr/local/php5/ext" extension=memcache.so extension=java.so

Last modification:November 26th, 2018 at 04:16 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment