Linux上安装Apache服务器
http://httpd.apache.org/download.cgi
#创建httpd用户
groupadd httpd
useradd -g httpd -s /sbin/nologin -M httpd tar zxvf httpd-2.4..tar.gz
cd httpd-2.4.
./configure --prefix =/usr/local/apache
make && make install
编译apache时可能会出错:
#./configure --prefix……检查编辑环境时出现:
checking for APR... no
configure: error: APR not found . Please read the documentation
解决办法:
安装 apr apr-util pcre
https://apr.apache.org/download.cgi
./configure --prefix=/usr/local/apr
make && make install
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
make && make install
编译apr-util时报错:make[1]: *** [xml/apr_xml.lo] Error 1
解决方法:yum -y install expat-devel
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
pcre-8.38.zip
./configure --prefix=/usr/local/pcre
make && make install
然后安装Apache:
./configure --prefix=/usr/local/apache/ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/ make && make install /usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_ParserCreate'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_GetErrorCode'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_SetUserData'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_ErrorString'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_SetEntityDeclHandler'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_ParserFree'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_SetElementHandler'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_StopParser'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_Parse'
/usr/local/apr-util/lib/libaprutil-.so: undefined reference to `XML_SetCharacterDataHandler'
collect2: ld returned exit status
make[]: *** [htpasswd] Error
make[]: Leaving directory `/root/zhouw/package/httpd-2.4./support'
make[]: *** [all-recursive] Error
make[]: Leaving directory `/root/zhouw/package/httpd-2.4./support'
make: *** [all-recursive] Error
make 时上面报错,尝试用 apr-1.5.2 版本
下载地址: http://archive.apache.org/dist/apr/
wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.2.tar.gz
安装方法与上面 1.6版本一样,果然成功了。应该是 CentOS7 才支持 apr-1.6 版本。
安装完成后,切到安装目录,/usr/local/apache
# vim conf/httpd.conf #配置“Listen”和“ServerName”属性;
Listen 80
ServerName localhost
# ./bin/apachectl configtest
Syntax OK
# 启动httpd
/usr/local/apache/bin/apachectl start | stop | restart
或者:
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
/etc/init.d/httpd start
Linux上安装Apache服务器的更多相关文章
- 【转】如何在win10(64位系统)上安装apache服务器
如何在win10(64位系统)上安装apache服务器 今天装了Apache服务器,下面是我总结的方法: 一,准备软件 1.64位的apache版本 传送门:http://www.apacheloun ...
- [运维] 如何在 Linux 上安装 Nginx 服务器(一)
原因 因为小程序对素材的大小是由要求的, 所以为了简化小程序上的内存要求, 在Linux上安装nginx来作为静态资源服务器, 这篇为第一篇, 主要介绍怎么在Linux上安装nginx, 下一篇将会介 ...
- 如何在win10(64位系统)上安装apache服务器
今天装了Apache服务器,下面是我总结的方法: 一,准备软件 1.64位的apache版本 传送门:http://www.apachelounge.com/download/ 2.VC11运行库 下 ...
- linux上安装apache
1 安装aprtar -zxvf apr-1.4.2.tar.gz cd apr-1.4.2.tar.gz ./configure --prefix=/usr/local/aprmake & ...
- linux上安装apache以及httpd.conf基本配置
1.yum安装apache #yum install httpd -y 2.随系统自启动 #chkconfig httpd on 3.开启apache #service httpd start PS: ...
- [转]CentOS6 Linux上安装ss5服务器
本文章转自:http://blog.csdn.net/cuiyifang/article/details/10346239 最后我增加了添加防火墙规则的部分.感谢作者. ss5是常见的socks5 p ...
- linux 上安装apache 出现 configure: error: APR not found. Please read the documentation错误
今日编译apache时出错: #./configure --prefix……检查编辑环境时出现: checking for APR... noconfigure: error: APR not fou ...
- 在Linux系统上查看Apache服务器的错误日志
错误日志和访问日志文件为系统管理员提供了有用的信息,比如,为 Web 服务器排障,保护系统不受各种各样的恶意活动侵犯,或者只是进行各种各样的分析以监控 HTTP 服务器.根据你 Web 服务器配置的不 ...
- 在Linux上用Apache搭建Git服务器
在Linux上用Apache搭建Git服务器 最近在学Linux,终于在Linux上用Apache搭建起了Git服务器,在此记录一下. 服务器:阿里云服务器 Linux版本:CentOS 6.5 ...
随机推荐
- sourceSet
android { sourceSets { main{ manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources ...
- [egret+pomelo]实时游戏杂记(2)
[egret+pomelo]学习笔记(1) [egret+pomelo]学习笔记(2) [egret+pomelo]学习笔记(3) pomelo pomelo服务端介绍(game-server/con ...
- 校园网络 usaco
这道题和上一道[最受欢迎的牛]差不多,都是强连通分量的练习题: 第一问实际上就是问缩点后入度为0的点有多少,第二问就是问添加几条边能使缩点后的图变成强连通图: 第一问好做,第二问需要动下脑子,也不难: ...
- Python爬虫 —— 知乎之selenium模拟登陆获取cookies+requests.Session()访问+session序列化
代码如下: # coding:utf-8 from selenium import webdriver import requests import sys import time from lxml ...
- LightOJ - 1079 Just another Robbery —— 概率、背包
题目链接:https://vjudge.net/problem/LightOJ-1079 1079 - Just another Robbery PDF (English) Statistics ...
- Git 使用初步
官网:https://git-scm.com/ 官方文档:https://git-scm.com/doc 比较简略的资料(对基本概念没有解释很清楚):http://wenku.baidu.com/li ...
- oracle数据库用户创建删除以及数据导入
dmp文件的导入:1.首先,先创建表空间与用户--创建表空间create tablespace CCFOCUS01datafile 'D:\app\Administrator\oradata\orcl ...
- 让LoadRunner再次走下神坛
1. LoadRunner 阻碍了性能测试人员对通信过程的理解我希望做性能测试的人能忘掉这个工具.我们都知道VuGen有录制的功能,其实录制这个功能对于测试来说是个非常不好的选择,就是跟 ...
- blog首页视图
声明:此Django分类下的教程是追梦人物所有,地址http://www.jianshu.com/u/f0c09f959299,本人写在此只是为了巩固复习使用 django 是如何处理 http 请求 ...
- matlab之text()函数
text()函数用来给图加上说明性文字. 格式:text(x,y,'txt') 或者:text(x,y,'txt','color','k') x,y是位置 txt是说明文字,如果说明性文字是数字,则这 ...