编译安装apache
来源:互联网 发布:sap 工厂物料组主数据 编辑:程序博客网 时间:2024/06/11 03:20
apache 编译安装前准备
(一)
yum -y install gcc gcc-c++ make automake ncurses-devel zlib-devel pcre-devel expat expat-devel
wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.6.0.tar.gz
解压上面下载的三个包 apr-1.6.2.tar.gz/apr-util-1.6.0.tar.gz/httpd-2.4.25.tar.gz
我三个包全部下载在/usr/local/src/目录下
cd /usr/local/src/apr-1.6.2;./configure;make && make install #次./configure 后面可以接参数--prefix=
--with-apr-util=/usr/local/apr --enable-so --enable-rewrite
chmod 755 /etc/init.d/httpd
chkconfig --add httpd
chkconfig --level 35 httpd on
ln -fs /usr/local/apache/bin/httpd /usr/sbin/httpd
ln -fs /usr/local/apache/bin/apachectl /usr/sbin/apachectl
ln -fs /usr/local/apache/logs /var/log/httpd
service httpd start
访问网页
(一)
yum -y install gcc gcc-c++ make automake ncurses-devel zlib-devel pcre-devel expat expat-devel
下载apr-1.6.2.tar.gz/apr-util-1.6.0.tar.gz包 不安装这两个包编译Apache会报错
wget http://mirror.bit.edu.cn/apache/apr/apr-1.6.2.tar.gzwget http://mirror.bit.edu.cn/apache/apr/apr-util-1.6.0.tar.gz
下载apache源码
wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.25.tar.gz解压上面下载的三个包 apr-1.6.2.tar.gz/apr-util-1.6.0.tar.gz/httpd-2.4.25.tar.gz
我三个包全部下载在/usr/local/src/目录下
(二)开始安装
1,进入apr-1.6.2解压出的目录cd /usr/local/src/apr-1.6.2;./configure;make && make install #次./configure 后面可以接参数--prefix=
2,进入apr-util-1.6.0解压出的目录
cd /usr/local/src/apr-util-1.6.0;./configure --with-apr=/usr/local/apr;make && make install #次./configure 后面可以接参数--prefix=3, 进入httpd-2.4.25解压出的目录
cd /usr/local/src/httpd-2.4.25;./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr--with-apr-util=/usr/local/apr --enable-so --enable-rewrite
4,make && make install
5, 在/usr/local/src/httpd-2.4.25/目录里执行下面命令
cp build/rpm/httpd.init /etc/init.d/httpdchmod 755 /etc/init.d/httpd
chkconfig --add httpd
chkconfig --level 35 httpd on
6 ,//设置软链接以适应init脚本,并方便管理,也是在 /usr/local/src/httpd-2.4.25/目录里执行
ln -fs /usr/local/apache/ /etc/httpdln -fs /usr/local/apache/bin/httpd /usr/sbin/httpd
ln -fs /usr/local/apache/bin/apachectl /usr/sbin/apachectl
ln -fs /usr/local/apache/logs /var/log/httpd
service httpd start
访问网页
阅读全文
0 0
- Apache编译与安装
- apache编译安装
- Archlinux 编译安装 Apache
- ubuntu 编译安装apache
- apache 安装编译参数
- Linux apache编译安装
- 编译安装apache
- 编译安装Apache+PHP
- 编译安装apache
- centos7编译安装apache
- apache编译安装
- Apache编译安装
- 编译安装apache
- Apache源码编译安装
- 编译安装apache
- centos7 Apache编译、安装
- 编译安装apache
- 编译安装Apache
- oracle查看数据库名、数据库实例名和db link
- Hibernate中Criteria的用法
- 每天30分钟,轻松学会Python-part1
- Java中泛型的本质
- 最长公共子串-LintCode
- 编译安装apache
- 求一个函数返回参数的二进制中1的个数
- 增量/差量更新 编译生成so库
- Ext.encode 与 Ext.decode_爱胖迪
- HTML&CSS基础篇之二:HTML应用定位
- iOS 关键字 及 泛型的使用 和 协变、逆变
- CSR BC5 Bluetooth auto reconnect fail issue debug
- 用js显示和隐藏div
- Hive2.0函数大全