LAMP環境重要的配置參數

1、環境安裝包:httpd-2.2.31php-5.3.27mysql-5.5.49
2、環境所需的依賴包yum -y install gcc make gcc-c++ cmake perl-devel zlib-devel pcre pcre-devel curl libcurl libcurl-devel apr apr-devel libxml2-devel openssl openssl-devel bzip2 bzip2-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel ncurses-devel apr-util libvpx-devel

yum -y install libmcrypt-devel
注:需先安裝epel-release之後才能安裝 libmcrypt-devel
3、安裝httpd-2.2.31
 wget http://www-eu.apache.org/dist/httpd/httpd-2.2.31.tar.gz
tar xf httpd-2.2.31.tar.gz
cd httpd-2.2.31
./configure --prefix=/application/apache2.2.31 --enable-deflate --enable-expires --enable-headers --enable-modeules=most --enable-so 
--enable-proxy --enable-rewrite  --with-mpm=worker  --with-included-apr

make
 make install

ln -s /application/apache2.2.31/ /application/apache
vim httpd.conf

AddType application/x-httpd-php .php 

AddType application/x-httpd-php .html 

AddType application/x-httpd-php .php .phtml .php3 .php4 .php5

AddType application/x-httpd-php-source .phps

4、安裝PHP-5.3.27http://cn2.php.net/get/php-5.3.27.tar.gz/from/this/mirror./configure --prefix=/application/php5.3.27 --with-apxs2=/application/apache/bin/apxs --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbstring  --enable-mbregex --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --enable-ftp 

make 

make install

ln -s /application/php5.3.27/ /application/php
cp php.ini-production /application/php5.3.27/lib/php.ini
5、安裝PHP-5.5.38./configure --prefix=/application/php5.5.38 --with-apxs2=/application/apache/bin/apxs --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbstring  --enable-mbregex --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --enable-ftp
make

make install

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章