centos7编译安装Apache
一、安装
安装之前先将服务器的防火墙关掉。
systemctl stop firewalld
systemctl disable firewall
第一步:
安装apr
下载:
wget -c http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.bz2
解压该文件:
tar -jvxf apr-1.6.3.tar.bz2
检测:
cd apr-1.6.3
./configure --prefix=/usr/local/apr/
编译:
make
make install
第二步:
安装apr-util
下载:
wget -c http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.bz2
解压该文件:
tar -jvxf apr-util-1.6.1.tar.bz2
检测:
cd apr-util-1.6.3
./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/
编译:
make
make install
第三步:
安装pcre
下载:
wget -c http://ftp.pcre.org/pub/pcre/pcre-8.42.tar.bz2
解压该文件:
tar -jvxf pcre-8.42.tar.bz2
检测:
cd pcre-8.42
./configure --prefix=/usr/local/pcre/
编译:
make
make install
第四步:
安装httpd
下载:
wget -c http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.bz2
解压该文件:
tar -jvxf httpd-2.4.29.tar.bz2
检测:
cd httpd-2.4.29
./configure --prefix=/usr/local/httpd/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/
编译:
make
make install
第五步:
配置/usr/local/apache2/conf/httpd.conf
ServerName www.examda.com:80
改为
ServerName localhost:80
第六步:
启动apache服务
/usr/local/apache2/bin/apachectl start
二、检测
使用浏览器访问本地IP
出现It works!成功
三、报错处理
(1)configure: error: APR not found. Please read the documentation.
这是没有安装apr或者apr安装失败导致的,重新安装apr。
安装请查看第一步。
(2)configure: error: APR-util not found. Please read the documentation.
这是没有安装apr-util或者apr-util安装失败导致的,重新安装apr-util。
安装请查看第二步。
(3)configure: error: no acceptable C compiler found in $PATH
这是没有安装gcc编译器或者gcc编译器安装失败导致的,重新安装gcc。
yum install -y gcc
(4)xml/apr_xml.c:35:19: 致命错误:expat.h:没有那个文件或目录
这是没有安装expat-devel或者expat-devel安装失败导致的,重新安装expat-devel。
yum install -y expat-devel
(5)configure: error: Invalid C++ compiler or C++ compiler flags
这是没有安装gcc-c++或者gcc-c++安装失败导致的,重新安装gcc-c++。
yum install -y gcc-c++
(6)configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
这是没有安装pcre或者pcre安装失败导致的,重新安装pcre。
安装请查看第三步。
centos7编译安装Apache的更多相关文章
- linux中编译安装Apache、PHP、MySQL(上)
1.简介 在阿里云买了个云服务器,一直没时间折腾.过了近十天了吧,才有时间好好玩玩这个云服务器.自己是做Web开发的,所以我需要的开发环境是LAMP.之前打算是采用yum安装,不过yum安装apach ...
- centos7 编译安装新版LNMP环境
centos7 编译安装新版LNMP环境 环境版本如下: 1.系统环境:Centos 7 x86_64 2.NGINX:nginx-1.11.3.tar.gz 3.数据库:mariadb-10.0.2 ...
- centos手动编译安装apache、php、mysql
64位centos 5.5手动安装lamp,要求curl.json.pdo_mysql.gd,记录如下. centos 5.4.5.5.5.6的内核都是2.6.18,都可以安装php 5.3. 卸载旧 ...
- Linux下编译安装Apache Http Server
Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...
- CentOS7编译安装Nginx-1.8.1和编译参数
CentOS7编译安装Nginx-1.8.1和编译参数 Web服务器Nginx LNMP是一组众所周知的Web网站服务器架构环境,即由Linux+Nginx+MySQL+PHP(MySQL有时也 ...
- centos7编译安装MySQL5.7.9
title: centos7编译安装MySQL5.7.9 date: 2016-05-12 16:20:17 tags: --- Centos7编译安装mysql5.7.9 mysql5.7有更好的性 ...
- Linux 通过编译安装apache服务以及配置
Linux 编译安装apache服务 一.安装 1.通过编译安装,首先需要下载源代码安装包 apache下载链接:http://httpd.apache.org/download.cgi 2.解开源代 ...
- Linux学习之编译安装apache
疯狂吐槽腾某云..编译安装apache折腾了一下午..还是我不太熟练. 首先要先准备好安装apache的三个依赖包以及apache包.(一定要准备好!!折腾了一下午的小白握拳!!) -rw-r--r- ...
- 编译安装Apache httpd和php搭建KodExplorer网盘
编译安装Apache httpd和php搭建KodExplorer网盘 环境说明: 系统版本 CentOS 6.9 x86_64 软件版本 httpd-2.2.31 php- ...
随机推荐
- URL工具类
UrlUtils = { /** * 判断url是否存在(存在跨域问题) * @param {String} url */ isTrueUrl: function(_url) { result = f ...
- std::string, std::wstring, wchar_t*, Platform::String^ 之间的相互转换
最近做WinRT的项目,涉及到Platform::String^ 和 std::string之间的转换,总结一下: (1)先给出源代码: std::wstring stows(std::string ...
- VS中bin,app_code,app_data,app_browser,app_GlobalResources等文件夹的作用 .
1. Bin文件夹 Bin文件夹包含应用程序所需的,用于控件.组件或者需要引用的任何其他代码的可部署程序集.该目录中存在的任何.dll文件将自动地链接到应用程序.如果在该文件夹中留有不用的或过期的文 ...
- SQL Server 2012安装配置(Part2 )
2 服务器安装 运行安装程序后,首先进入 SQL Server 安装中心.选择左侧导航树中的"安装"菜单项. 图2-1 SQL Server 安装中心 在右侧菜单中点击" ...
- February 25 2017 Week 8 Saturday
Energy and persistence can conquer all things. 能量和毅力可以征服一切. I have the persistence, but it seems I a ...
- March 27 2017 Week 13 Monday
A book that remains shut is but a block. 有书闭卷不阅读,无异于一块木头. I had planned to buy a book and read it ev ...
- python入门1 python手动编译py_compile,compileall
python运行之后会自动生产pyc文件,也可以手动编译生成pyc文件.代码如下: #coding:utf-8 """ 2018-11-03 dinghanhua 手动编 ...
- ArcGIS Server Java 9.3 REST API的中文查询问题的解决方案
[2009.2.18补注]这个问题在SP1 for Linux中修复,SP1 for Windows下问题更加严重,如果打了SP1 for Windows,还想使用REST服务,就必须使用Linux或 ...
- UESTC-1259 昊昊爱运动 II
昊昊爱运动 II Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) 昊昊喜 ...
- Android(java)学习笔记9:JDK5之后的Lock锁的概述和使用
1. Lock锁的概述: java.util.concurrent.locks,接口Lock 首先Lock是一个接口,Lock实现提供了比使用synchronized方法 和 同步代码块更为广泛的锁定 ...