编译安装httpd
一、安装前的说明:
httpd依赖于apr和apr-util所以在安装httpd之前要把这些东西都安装上去。
事先安装的依赖:
yum -y install gcc gcc-c++ pcre-devel openssl-devel
二、上传httpd-2.4.20.tar.gz,apr-1.5.2.tar.gz,apr-util-1.5.4.tar.gz 包到服务器
三、解压httpd-2.4.20.tar.gz,apr-1.5.2.tar.gz,apr-util-1.5.4.tar.gz
tar -xzvf httpd-2.4..tar.gz -C/usr/src
tar -xzvf apr-1.5..tar.gz -C/usr/src
tar -xzvf apr-util-1.5..tar.gz -C/usr/src
四、安装apr到/usr/local/apr
/usr/src/apr-1.5./configure --prefix=/usr/local/apr && make && make install
五、安装apr-util到/usr/local/apr-util
/usr/src/apr-util-1.5./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install
六、安装httpd到/usr/local/httpd/
/usr/src/httpd-2.4./configure --prefix=/usr/local/httpd/ --enable-so --enable-rewrite --enable-ssl --enable-cgi --enable-cgid \
--enable-modules=most --enable-mods-shared=most --enable-mpms-shared=all --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util && make && make install
七、编写linux 启动脚本
touch /etc/init.d/httpd
/etc/init.d/httpd 的内容如下:
#!/bin/bash # chkconfig:
# description: httpd server script
HTTPD=/usr/local/httpd/bin/httpd
PID_FILE=/usr/local/httpd/logs/httpd.pid case $ in
"start")
if test -e $PID_FILE
then
echo 'httpd is started ...'
else
echo 'httpd will start ...'
$HTTPD
fi
;; "stop")
if test -e $PID_FILE
then
PID=`cat $PID_FILE`
kill $PID
else
echo 'httpd is stoped'
fi
;;
"status")
if test -e $PID_FILE
then
echo 'httpd has been started '
else
echo 'httpd is stoped'
fi
;;
*)
echo "not support option $1"
;;
esac
9、启动httpd
service httpd start

编译安装httpd的更多相关文章
- 编译安装HTTPD 2.4.9版本
编译安装HTTPD 2.4.9版本 服务脚本:/etc/rc.d/init.d/httpd 脚本配置文件路径:/etc/sysconfig/httpd 运行目录:/etc/httpd ...
- CentOS 6.4源码编译安装httpd并启动测试
今天来总结一下在Linux中软件安装,通常我们应该知道,安装软件有两种方法:一种是软件包的安装,也就是rpm包的安装,就是指这些软件包都是 已经编译好的二进制rpm包,我们通过rpm安装工具和yum安 ...
- apache编译安装 httpd 2.2 httpd 2.4
#apache编译安装#httpd 2.2 , httpd 2.4 #!/bin/sh #apache编译安装 #httpd 2.2 , httpd 2.4 #centos #rpm -e httpd ...
- Linux源码编译安装httpd
Linux安装软件采用源码编译安装灵活自由,适用于不同平台,维护也十分方便. 源码编译的安装方式一般由3个步骤组成: 1.配置(configure) 2.编译(make) 3.安装(make inst ...
- (转)CentOS 7.6 上编译安装httpd 2.4.38
原文:https://www.s4lm0x.com/archives/40.html https://www.cnblogs.com/sunshine-H/p/8110608.html----超详细 ...
- 编译安装httpd 2.4
author:JevonWei 版权声明:原创作品 官方网站下载httpd2.4.apr及apr-util的相关软件包,并传输到centos 7系统中的/usr/local/src(apr1.6版本过 ...
- LAMP环境之编译安装httpd服务
“Apache HTTP Server”是开源软件项目的杰出代表,它基于标准的 HTTP 网络协议提供网页浏览服务. 在配置 Apache 网站服务之前,需要正确安装好 httpd 服务器软件.htt ...
- 二进制编译安装httpd服务
systemctl stop httpd yum remove httpd-----------------------(在做之前 先删掉httpd) 安装编译环境 yum -y groupinsta ...
- 把编译安装的httpd 实现服务脚本,通过service和chkconfig 进行管理
把编译安装的httpd 实现服务脚本,通过service和chkconfig 进行管理 1 编译安装httpd 把httpd编译安装在/app/httpd/目录下. 2 在/etc/rc.d/init ...
随机推荐
- NSRunLoop 详解
今天看到了NSRunloop,其实之前也有看了关于NSRunloop的内容,在这里想简单的就个人的理解总结一下.其实自己在开发的过程当中,还没有更多的涉及到NSRunloop的功能.总的来说,NSRu ...
- 原已经安装好的nginx,现在需要添加一个未被编译安装的模块--echo-nginx-module-0.56
为了测试一个NGINX变量,将NGINX加了一个编译模板echo-nginx-module-0.56. 参照如下文件 1,先看以前NGINX有哪些东东. sbin/nginx -Vnginx vers ...
- Qt下HBoxLayout里的按钮有重叠
没想到是一个bug,而且六年了都没有解决: https://bugreports.qt.io/browse/QTBUG-14591 http://stackoverflow.com/questions ...
- Advanced Bash-Scripting Guide
在UC Berkeley 课程代号CS9E上看到的资源 http://www-inst.eecs.berkeley.edu/~selfpace/studyguide/cs9e/ http://www. ...
- 转:PO BO VO DTO POJO DAO概念及其作用
J2EE开发中大量的专业缩略语很是让人迷惑,尤其是跟一些高手讨论问题的时候,三分钟就被人家满口的专业术语喷晕了,PO VO BO DTO POJO DAO,一大堆的就来了(听过老罗对这种现象的批判的朋 ...
- POJ1664(简单动态规划)
#include<iostream> #include<string> #include<cstring> using namespace std; ][]; vo ...
- Subsets II 解答
Question Given a collection of integers that might contain duplicates, nums, return all possible sub ...
- Hdu3487-Play with Chain(伸展树分裂合并)
Problem Description YaoYao is fond of playing his chains. He has a chain containing n diamonds on it ...
- SimHash算法
短文本合并重复(去重)的简单有效做法 - 旁观者 - 博客园 短文本合并重复(去重)的简单有效做法 SimHash算法 - ACdreamer - 博客频道 - CSDN.NET SimHash算法
- hdu 5641 King's Phone(暴力模拟题)
Problem Description In a military parade, the King sees lots of new things, including an Andriod Pho ...