centos7 源码编译安装apache
1、安装apache和php的依赖
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
**
2、安装apache的依赖apr
tar xf apr-1.5.0.tar.gz
cd apr-1.5.0
./configure --prefix=/usr/local/apr
make && make install
3、安装apache的依赖apr-util
tar xf apr-1.5.0.tar.gz
cd apr-1.5.0
./configure --prefix=/usr/local/apr
make
make install
注意:若出现以下情况说明之前配置过,执行make clean即可,然后重新./configure和make && make install
/bin/sh /usr/local/httpd-2.2.3/srclib/apr/libtool --mode=install /usr/bin/install -c -m 755 libaprutil-1.la /usr/local/apache2/lib
libtool: install: error: cannot install `libaprutil-1.la’ to a directory not ending in /usr/local/apache22/lib
make[2]: *** [install] Error 1
**
4、安装apache的依赖pcre
tar xf pcre-8.39.tar.gz
cd pcre-8.39
mkdir /usr/local/pcre
./configure --prefix=/usr/local/pcre --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
5、安装apache
./configure
–prefix=/usr/local/apache2.4.26
–enable-modules=all
–enable-mods-shared=all
–enable-so
–enable-rewrite
–with-pcre
–enable-ssl
–with-mpm=prefork
–with-pcre=/usr/local/pcre
–with-apr=/usr/local/apr
–with-apr-util=/usr/local/apr-util
make && make install
如遇到以下问题,就是你原来编译过;
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory
/software/httpd-2.4.26/support' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/software/httpd-2.4.26/support’
make: *** [all-recursive] Error 1
解决:进入到解压目录
cp -r apr-1.6 httpd-2.4/srclib/apr
cp -r apr-util-1.6 httpd-2.4/srclib/apr-util
最后在编译的时候加上–with-included-apr,然后在重新编译
- centos 7.1 apache 源码编译安装
- CentOS 6.3 安装配置Apache2.2.6的方法(源码编译安装)
- centos 7.1 apache 源码编译安装
- Linux[Centos6.3] 源码编译安装配置 SVN+Apache
- CentOS 5.X 源码编译安装LAMP(Apache+MySQL+PHP)
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- CentOS6.8 x64+Nginx1.3.8/Apache-httpd 2.4.3+PHP5.4.8(php-fpm)+MySQL5.5.28+CoreSeek4.1源码编译安装
- CentOS6.8 x64+Nginx1.3.8/Apache-httpd 2.4.3+PHP5.4.8(php-fpm)+MySQL5.5.28+CoreSeek4.1源码编译安装
- Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
- Centos 6.3 源码编译安装 apache
- CentOS 源码编译安装APACHE2.4
- centos下apache源码编译安装
- centos6下源码编译安装LAMP平台(apache2.4+php5.4+mysql5.5.30)
- CentOS 4.4下源码编译安装apache+php+mysql
- centos 学习笔记——源码编译安装apache
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- CentOS 下源码编译安装apache+php+mysql