在Centos7上源码编译httpd

在Centos7上源码编译httpd

安装源码包

首先在http://httpd.apache.org下载所需要的安装包
小编在这里下载的是httpd-2.4.27.tar apr-1.6.2.tar apr-util-1.6.0.tar
首先编译安装apr-1.6.2.tar.gz 
#1 tar -zxf apr-1.6.2.tar.gz #先解压安装包
#2 cd apr-1.6.2/#cd到解压的目录下
#3 ./configure --prefix=/usr/local/apr#指定安装的路径
#4 make && make install
#1 然后安装apr-util-1.6.0.tar.gz
#2 cd apr-util-1.6.0/
#3 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#4 make && make install
#5 yum install pcre-devel
#1 最后安装httpd-2.4.27.tar.bz2 
#2 tar -jxf httpd-2.4.27.tar.bz2
#3 cd httpd-2.4.27/
#4 ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --sysconfdir=/etc/httpd
#5 make && make install

安装好后的配置

#1 导出二进制程序目录至PATH环境变量中,编辑文件/etc/profile.d/NAME.sh 
#2 echo "export PATH=/usr/local/httpd/bin/:$PATH" > /etc/profile.d/httpd.sh
#3 source /etc/profile #重读
#4 systemctl stop firewalld.service #关闭防火墙
#5 netstat -nltp|grep 80
#6 如果发现80端口没有处在监听状态
#7 cd /usr/local/httpd/conf/
#8 vim httpd.conf
#9 找到#ServerName www.example.com:80 把#号去掉
#10 然后运行httpd start 就ok拉

然后在浏览器上输入你虚拟机的地址测试下

在Centos7上源码编译httpd

原创文章,作者:N27_flypig,如若转载,请注明出处:http://www.178linux.com/85249

(2)
N27_flypigN27_flypig
上一篇 2017-08-21
下一篇 2017-08-21

相关推荐

  • 第四周作业

    作业 1、复制/etc/skel目录为/home/tuser1,要求/home/tuser1及其内部文件的属组和其它用户均没有任何访问权限。 [root@cloud ~]# cp -R /etc/skel /home/tuser1 && chmod -R…

    Linux干货 2016-12-25
  • 计算机基础与linux入门

    计算机硬件组成:     运算器:主要完成算术运算,逻辑运算     控制器:控制指令的执行序列,根据指令的功能给出实现指令功能所需要的控制信号     存储器:存放程序以及一些数据     &nbs…

    Linux干货 2015-12-19
  • N22-第3周作业-冥界之王

    1、列出当前系统上所有已经登录的用户的用户名,注意:同一个用户登录多次,则只显示一次即可。 [root@CentOS6 ~]# who  | cut -d " " -f1 | uniq 2、取出最后登录到当前系统的用户的相关信息。…

    Linux干货 2016-09-19
  • 压缩及解压工具

    通过算法压缩数据,时间换空间。文本文件的压缩比更大,二进制文件的压缩比较小。 压缩工具占用cpu时钟。 compress/uncompress .Z gzip/gunzip .gz bzip2/bunzip2 .bz2 压缩比比gz大但是也没取代gz xz/unxz .xz 压缩比大,现在较流行。 zip/unzip .zip 归档工具,既能归档又能压缩 t…

    Linux干货 2016-08-21
  • 路径操作&StringIO/BytesIO

    Edit 路径操作&StringIO/BytesIO 路径操作 路径操作模块: 3.4版本以前os.path模块 In [1]: from os import path In [2]: p = path.join(‘/etc’,’sysconfig’,’network’)#将字符…

    Linux干货 2017-10-30