linux web服务apache,数据库MySQL,PHP的编译安装参数

========httpd-2.2.27安装========
cd /home/liuhui/tools/
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.27.tar.gz
tar xf httpd-2.2.27.tar.gz
cd httpd-2.2.27
less INSTALL
less README
yum install zlib zlib-devel -y
yum install -y ncurese-devel

./configure
--prefix=/application/apache2.2.27
--enable-deflate
--enable-expires
--enable-headers
--enable-modules=most
--enable-so
--with-mpm=worker
--enable-rewrite

make
make install
ln -s /application/apache2.2.27/ /application/apache

==========mysql5.1.72==========
cd /home/liuhui/tools/mysql5.1.72

./configure
--prefix=/application/mysql5.1.72
--with-unix-socket-path=/application/mysql5.1.72/tmp/mysql.sock
--localstatedir=/application/mysql5.1.72/data
--enable-assembler
--enable-thread-safe-client
--with-mysqld-user=mysql
--with-big-tables
--without-debug
--with-pthread
--enable-assembler
--with-extra-charsets=complex
--with-readline
--with-ssl
--with-embedded-server
--enable-local-infile
--with-plugins=partition,innobase
--with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static
#--with-plugin-PLUGIN

==========php==========
安装准备
yum install zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel -y

tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
cd ../

./configure
--prefix=/application/php5.3.27
--with-apxs2=/application/apache/bin/apxs
--with-mysql=/application/mysql
--with-xmlrpc
--with-openssl
--with-zlib
--with-freetype-dir
--with-gd
--with-jpeg-dir
--with-png-dir
--with-iconv=/usr/local/libiconv
--enable-short-tags
--enable-sockets
--enable-zend-multibyte
--enable-soap
--enable-mbstring
--enable-static
--enable-gd-native-ttf
--with-curl
--with-xsl
--enable-ftp
--with-libxml-dir

原文地址:https://www.cnblogs.com/liuhui-xzz/p/11014001.html