httpd源码安装
yum -y groupinstall "开发工具"
tar -zxvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr
make make install
cd ../ tar -zxvf apr-util-1.4.1.tar.gz cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/lib/apr-util (./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/lib/apr.exp ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config)
make make install
unzip pcre-8.02.zip cd pcre-8.02
./configure --prefix=/usr/local/pcre
make && make install
cd tar -zxvf httpd-2.4.1.tar.gz
cd httpd-2.4.1
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre make make install
/usr/local/apache/bin/httpd
netstart -untalp | grep httpd
firewall-cmd --permanent --zone=public --add-service=http
注意:添加以php结尾文件类型,在配置文件中修改
vim /usr/local/apache/conf/http.conf #在配置文件搜索/mime
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
php源码安装:
yum -y install libxml2-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel
tar -zxvf php-5.3.28.tar.gz
cd php-5.3.28
./configure --prefix=/usr/local/php5 --enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-config-file-path=/usr/local/php5/etc --enable-soap --with-gd --with-gettext --with-freetype-dir=/usr/local/lib --with-curl --enable-mbstring=all
出现语言冲突:在php-5.3.28目录下 解决方法如下 vim Zend/zend_globals_macros.h 中的第35行 int zendparse(void *compiler_globals); 复制到vim Zend/zend_language_parser.h文件下和第317行替换 317 int zendparse(void *compiler_globals);

浙公网安备 33010602011771号