安装apache2.4.10
一:依赖安装:apache依赖于apr,apr-util,pcre,所以需要先安装他,并且需要最新的
apr官网:http://apr.apache.org/download.cgi
pcre官网:http://www.pcre.org/
apr,apr-util 与 apache的关系:
http://www.cnblogs.com/Alight/p/3997777.html
apache与pcre的关系:
今日编译apache时出错:
#./configure --prefix……检查编辑环境时出现:
checking for APR... no
configure: error: APR not found . Please read the documentation
解决办法:
1.下载所需软件包:
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
2.编译安装:
yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs
具体步骤如下:
a:解决apr not found问题>>>>>>
[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
b:解决APR-util not found问题>>>>
[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
c:解决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
4.最后编译Apache时加上:
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--with-pcre=/usr/local/pcre
成功编译完成~
二:编译Apache
[root@yahoo httpd-2.3.12-beta]# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
[root@yahoo httpd-2.3.12-beta]# make
[root@yahoo httpd-2.3.12-beta]# make install
[root@yahoo httpd-2.3.12-beta]# /usr/local/apache2/bin/apachectl start
三:把apache加到系统服务里去
Apache加入启动项里面:
echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local
Apache加入到系统服务里面:
cp /安装目录下/apache/bin/apachectl /etc/rc.d/init.d/httpd (init.d中的脚本就相当于window中的注册表,在系统启动的时候某些指定的脚本被执行)
修改httpd
在文件头部加入如下内容:
###
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description:http server
###
保存
在打入
#chkconfig --add httpd
#chkconfig --level 345 httpd on
参考:
http://www.111cn.net/sys/linux/49030.htm
http://blog.csdn.net/kobe_lzq/article/details/7976787
linux 下 apache启动、停止、重启命令
基本的操作方法:
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况
apahce启动命令:
推荐/usr/local/apache2/bin/apachectl start apaceh启动
apache停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache重新启动命令:
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果apache安装成为linux的服务的话,可以用以下命令操作:
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务
Linux系统为Ubuntu
一、Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重启apache服务
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服务
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
错误类型:
错误一:启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain 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
安装apache2.4.10相关推荐
- 编译安装Apache2.4.10
1.先安装apr.apr-util.pcre.openssl 安装apr tar zxvf apr-***.tar.gz cd apr-***/ ./configure --prefix=/usr/l ...
- linux pureftp mysql_在Ubuntu下安装apache2+php5+mysql5+pureftp+ftp
在Ubuntu下安装apache2+php5+mysql5+pureftp+ftp 一.安装Ubuntu7.04 Desktop版 二.ubuntu Linux下手工安装mysql5 1.下载mysq ...
- LAMP编译安装(一)——安装Apache2.4
背景介绍 LAMP是LNMP结构提出之前风靡了很久的结构,本系列就从无到有一点点介绍LAMP的编译安装.首先,介绍下本系列的拓扑结构图 此时服务器响应客户端访问可以分为几种应答方式: 1.客户端向服务 ...
- CentOS6.5下安装Apache2.4+PHP7
CentOS6.5下安装Apache2.4+PHP7 http://blog.csdn.net/along602/article/details/42695779 http://www.th7.cn/ ...
- 安装Apache2.4.23
一.Apache2.4新增特性 1.新增模块 mod_proxy_fcgi(可提供fcgi代理) mod_ratelimit(限制用户带宽) mod_request(请求模块,对请求做过滤) mod_ ...
- ubuntu libapache2-mod-php5,ubuntu安装apache2 mysql5 php5
1.安装apache2 apt-get install -y apache2 2.安装mysql5 apt-get install -y mysql-server 3.安装php5 apt-get i ...
- Windows XP硬盘安装Ubuntu 11.10双系统全程图解
Ubuntu 11.10正式版出来有段时间了,许多朋友还在用wubi安装,其实,Windows XP下硬盘安装Ubuntu 11.10双系统其实也很简单的,Ubuntu 11.10的安装过程跟11.0 ...
- (转)VMware 虚拟机安装Ubuntu 11.10使用share folders共享目录
第一步,安装VMware Tools 恢复虚拟机ubuntu后,首先,点击 虚拟机--安装VMware Tools(Install VMware Tools),这时我们会在Ubuntu系统桌面上发现V ...
- linux4.19安装教程,树莓派4安装Ubuntu 19.10的教程详解
由于之前在raspbian上面跑opencv有些依赖包装不上,所以一些代码不能跑,就想着用Ubuntu试试.安装的过程是跟着这个视频来的: [Linux]在Raspberry Pi 4上安装完整版Ub ...
最新文章
- 闭锁java_java多线程学习十::::CountDownLatch闭锁
- JavaWeb基础—项目名的写法
- python多线程读取数据库数据_python多线程操作MySQL数据库pymysql
- 局域网内抢网速_路由器要不要每天重启?多亏宽带师傅透露,难怪网速一天比一天慢...
- 爬虫教程( 4 ) --- 分布式爬虫 scrapy-redis、集群
- 9.25-CSS样式以及结构布局
- 这家中国企业和星巴克对着干 年亏16亿却成为全球最快上市公司
- vue 代码快捷键_你可能不知道的19种运行JavaScript代码工具
- JZOJ 1039. 【SCOI2009】windy数
- python定义结构体_python中定义结构体的方法
- 员工转正答辩官提问_转正答辩(交付经理)--王总提问6.19
- linux head
- C语言等待一秒,延时函数sleep()
- PCF8591模块测试
- ubuntu修改时区
- 机器学习梯度下降法应用波士顿房价预测
- JAVA程序计算圆的周长面积
- ReactNative进阶(三十一): IoC 框架 InversifyJS 解读
- Visio另存为pdf字符间距变化等字母间距的问题
- 为什么很多量化策略,回测很丰满,实盘却很骨感