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- ...
随机推荐
- stark——增删改页面
一.制作添加页面 1.前置准备 (1)修改增删改的视图函数名 class ModelStark(object): def add_view(self, request): return HttpRes ...
- asp.net后台获取html控件的值
1.asp.net后台获取前台type=text控件的值 前台:<input name="txtName" class="username" type=& ...
- Android 自定义Dialog中加EditText弹不出键盘跟Dialog遮挡键盘的问题
先上两张图 第一张问题很明显,第二张是成功的图, 其实第一张是加了 //getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INP ...
- 【Linux】GCC编译
GCC简介 GCC基本用法 GCC程序产生过程 GCC编译选项 一.GCC简介 1.1 GCC特点 Gcc(GNU C Compiler)是GNU推出的功能强大.性能优越的多平台编译器,是GNU的 代 ...
- FragmentActivity的简单使用
如图是效果图 当 点击下面 不同 的按钮 进入 不同的界面 其中 要一个 主布局当做容器 , 和3个不同的 布局来对应下面的3个按钮界面 主程序的 代码和布局如下 import android.su ...
- c 结构体中的变长数组
在Linux系统里,/usr/include/linux/if_pppox.h里面有这样一个结构: struct pppoe_tag { __u16 tag_type; __u16 tag_len; ...
- 【转】QT创建子对话框的方法
原文地址:http://blog.csdn.net/baidu_18991997/article/details/42713159 代码实现功能:单击某个按钮后,弹出对话框,对话框中的内容可自行设计. ...
- ORACLE_SPOOL
Question:When you use developer tool in oracle.However,you press Ctrl and click left-mouse in a tabl ...
- js常用函数汇总(不定期更新)
1.图片按比例压缩 function setImgSize(){ var outbox_w=imgbox.width(), outbox_h=imgbox.height(); imgbox.find( ...
- RedHat 6.4源码方式安装mysql5.5
参考文档:http://dev.mysql.com/downloads/file/?id=463397 下载地址http://dev.mysql.com/doc/refman/5.7/en/ 文档地址 ...