CentOS 安装apache 及所需的 apr,apr-util,pcre
安装apache前确定已安装 apr,apr-util,pcre
一、安装apr
- [root@xt test]# tar -zxf apr-1.4.5.tar.gz
- [root@xt test]# cd apr-1.4.5
- [root@xt apr-1.4.5]# ./configure --prefix=/usr/local/apr
- [root@xt apr-1.4.5]# make && make install
二、安装apr-util
- [root@xt test]# tar -zxf apr-util-1.3.12.tar.gz
- [root@xt test]# cd apr-util-1.3.12
- [root@xt apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
- [root@xt apr-util-1.3.12]# make && make install
三、安装pcre
- [root@xt test]#unzip -o pcre-8.10.zip
- [root@xt test]#cd pcre-8.10
- [root@xt pcre-8.10]#./configure --prefix=/usr/local/pcre
- [root@xt pcre-8.10]#make && make install
**最后编译Apache时加上:
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--with-pcre=/usr/local/pcre
四、安装apache
1. 下载httpd-2.2.9.tar.gz 源码安装包
2. #tar -zxvfhttpd-2.2.9.tar
解压安装包,之后会出现 httpd-2.2.9 的文件夹,进入该文件夹。
3.进入文件后:
./configure --prefix=/usr/local//apache --with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--with-pcre=/usr/local/pcre --enable-so
设置安装目录和参数设置
4. make
5. make install
6:/usr/local/apache/bin/apachectl start ,该命令用来启用apache。
7. /usr/local/apache/bin/apachectl stop
此时完成apache的安装
注:
一、问题apache启动错误"httpd:Could not reliably determine..."
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualifieddomain name
[root@server httpd-2.2.4]# /usr/local/apache/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name,using 127.0.0.1 for ServerName
1)进入apache的安装目录:(视个人安装情况而不同) [root@server ~]# cd /usr/local/apache/conf
2)编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80
[root@server conf]# ls
extra httpd.conf magic mime.types original
[root@server conf]# vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80
3)再重新启动apache 即可。
[root@server ~]# /usr/local/apache/bin/apachectl restart
无法启动:
(13)Permission denied: AH00072: make_sock:could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock:could not bind to address 0.0.0.0:80
no listening sockets available, shuttingdown
AH00015: Unable to open logs
切换到root,启动
CentOS 安装apache 及所需的 apr,apr-util,pcre的更多相关文章
- centos 安装apache 和 php5.6
centos 安装 php5.6,安装前需要先安装数据库和apache 安装 apache2.4 安装基础依赖:# yum install gcc gcc-c++ glibc glibc-devel ...
- centos安装apache
查询是否已安装apache: rpm -qa httpd 安装apache: yum install httpd -y 查询: chkconfig httpd on 启动: service http ...
- CentOS 安装apache
yum 安装apache yum –y install httpd 设置开机启动 chkconfig --levels 235 httpd on 启动 /etc/init.d/httpd start ...
- 阿里云 centos 安装apache和php
mysql使用阿里云的rds httpd服务 1. 安装apr和apr-util 2. 安装 httpd apache.org,apr.apache.org 安装命令: ./configure --p ...
- [部署]CentOS安装apache
环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 步骤 1.使用yum安装 yum install httpd httpd-devel 2.启动 a ...
- centos 安装apache activemq
安装说明 安装环境:CentOS-6.3 安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz下载地址http://activemq.apache.org/downloa ...
- Centos 安装Apache软件
检查rpm -qa httpd [root@luozhonghua icons]# rpm -qa |grep httpd httpd-2.2.15-30.el6.centos ...
- windows 下安装Apache httpd 只需三步
1.下载 Apache 官网地址:http://httpd.apache.org/docs/current/platform/windows.html#down 找到这个, 看到这几个选项: Apac ...
- centOS安装apache服务器
# yum install httpd 启动 systemctl start httpd 重启 systemctl restart httpd 停止 systemctl stop httpd
随机推荐
- - Shell - sort处理大文件(页 1) - ChinaUnix.net
- Shell - sort处理大文件(页 1) - ChinaUnix.net sort处理大文件
- Python -- 堆数据结构 heapq - I love this game! - 博客频道 - CSDN.NET
Python -- 堆数据结构 heapq - I love this game! - 博客频道 - CSDN.NET Python -- 堆数据结构 heapq 分类: Python 2012-09 ...
- MySQL分区技术 (一)
4:MySQL 分区技术(是mysql 5.1以版本号后開始用->是甲骨文mysql技术团队维护人员以插件形式插入到mysql里面的技术) 眼下,针对海量数据的优化主要有2中方法: 1:大表拆成 ...
- 微信支付.net官方坑太多,我们来精简
原文:微信支付.net官方坑太多,我们来精简 微信支付官方坑太多,我们来精简 我把官方的代码,打包成了 an.wxapi.dll. 里面主要替换了下注释.呵呵.然后修改了几个地方. 修改一.Confi ...
- vim php代码规范
vim 代码规范工具php-cs-fixer.phar (參考https://github.com/FriendsOfPHP/PHP-CS-Fixer) INSTALL curl http://get ...
- swift 简单语句 控制流语句
在 Swift 中.有两种类型的语句:简单语句和控制流语句.简单语句是最常见的.用于构造表达式和声明.控制流语句则用于控制程序运行的流程,Swift 中有三种类型的控制流语句:循环语句.分支语句和控制 ...
- like-minded 都有什么意思_百度知道
like-minded 都有什么意思_百度知道 like-minded 都有什么意思
- android中file的使用实例
File是android的4种存储方式的一种.File就是文件的意思一个文件,你无非是想进行读写操作.所以这就用到两个流.一个数输入流,一个是输出流.FileOutstream,和FileInputS ...
- ActiveMQ源码架构解析第一节(转)
工作四年已久,也快到了而立之年,本人也酷爱技术,总是想找一些途径来提升自己,想着温故而知新所以就写起了博客,然而写博客这个想法也是酝酿了很久,近期也看到了有很多人在问关于ActiveMQ的相关问题,有 ...
- Audio Offload
Audio Offload 音频分载,是系统将音频分载到声卡硬件进行分载处理的功能.从Windows 8开始,音频的硬件加速和分载处理又回来了.为什么说又回来了呢? 因为声卡自创通公司发明开始,相当长 ...