zoukankan
html css js c++ java
编译安装httpd(6和7)
编译安装httpd(CentOS-6)
准备工作:
1.关闭防火墙
6:service iptables stop;chkconfing iptables off
7:systemctl stop firewalld;systemctl disable firewalld
另外还有一种:清除所有规则来暂时停止防火墙---iptables -F
执行上面命令的注意事项:
https://blog.csdn.net/ingiaohi/article/details/70559425
2.关闭SELinux(6和7一样)
临时:setenforce 0
长期:修改配置文件/etc/selinux/config-----SELINUX=disabled
上面的修改方法sed -i.bak 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
1.安装包组openssl开发包组(Development Tools--开发工具)
yum groupinstall "Development tools"
yum install openssl-devel
2.[下载httpd-2.2.34.tar.bz2包](
http://archive.apache.org/dist/httpd/httpd-2.2.34.tar.bz2)
httpd包下载地址
3.执行rz命令:从windows系统“rz”到linux CentOS-6上
解压下载的bz2文件(最好解压到一个以src命名的目录----/usr/local/src/)
我这里在/root下新建一个src目录(/root/src)
4.移动httpd-2.2.34.tar.bz2到/root/src(避免干扰)
mv httpd-2.2.34.tar.bz2 /root/src
cd /root/src
5.解压httpd-2.2.34.tar.bz2到当前目录(/root/src)
tar -xvf httpd-2.2.34.tar.bz2(-C 指定路径)
6.进到需要编译安装程序的安装目录(这里是httpd-2.2.34),在这个目录里面运行./configure;make;make install
cd /root/src/httpd-2.2.34(查看是否有configure可执行文件)
可以查看相关文件----README;INSTALL
./configure --help(查看帮助)
由上面帮助可以设置路径:--prefix=/app --sysconfdir=/etc/httpd2.2(除了配置文件指定放到/etc/httpd2.2外,其他都放到/app)
7.开始编译
./configure
--prefix=/app
--sysconfdir=/etc/httpd2.2
--enable-ssl(运行完查看是否有no ******** headers found的字眼,如果有就要把相应的包也安装,一般安装相关的devel开发包就可以了)
编译完后会生成Makefile文件,提供给后面的make读取
8.确定编译是否成功
echo $?----(0:表示可以进行下一步)
9.make(加速访问,并行编译---依赖CPU的个数,可以选择临时增加核数---虚拟机)读取通过.configure后生成的Makefile编译
make -j 4 && echo -e "a" && sleep 1 && echo -e "a" && sleep 1 && echo -e "a"
make -j 4(指定CPU的核心数)
echo -e "a"(提示音)
sleep 1(休眠1秒)
10.make install
按照.configure指定的内容复制文件,创建目录(如果没有)
11.启动服务(cat INSTALL -----PREFIX/bin/apachectl start)
建议将这个服务添加到PATH变量里面,方便以后的使用
echo "PATH=/app/bin:$PATH" >> /etc/profile.d/env.sh
source /etc/profile.d/env.sh(让更改后配置脚本生效)
echo $PATH(确定是否生效)
12.完成以上步骤正式启动
apachectl start(因为上面已经添加到PATH变量里面,所以不用写绝对路径/app/bin/apachectl start)
13.默认网页存放目录是:/app/htdocs/index.html
CentOS 7的编译安装步骤
查看全文
相关阅读:
从原生web组件到框架组件源码(二)
从原生web组件到框架组件源码(一)
拖拽滚动视图(一)
SVG研究之路(一)下
运算符
编码
格式化输出
循环语句
条件语句
Python基础
原文地址:https://www.cnblogs.com/lqynkdcwy/p/9498506.html
最新文章
spring boot:spring security+oauth2+sso+jwt实现单点登录(spring boot 2.3.3)
spring boot:spring security实现oauth2+jwt管理认证授权及oauth2返回结果格式化(spring boot 2.3.3)
spring boot:spring security实现oauth2授权认证(spring boot 2.3.3)
spring boot:spring security整合jwt实现登录和权限验证(spring boot 2.3.3)
spring boot:spring security用mysql实现动态权限管理(spring boot 2.3.3)
spring boot:spring security给用户登录增加自动登录及图形验证码功能(spring boot 2.3.1)
spring boot:spring security用mysql数据库实现RBAC权限管理(spring boot 2.3.1)
spring boot:用spring security加强spring boot admin的安全(spring boot admin 2.3.0 / spring boot 2.3.3)
spring boot:多模块项目生成jar包(spring boot 2.3.3)
STP与RSTP也不过就这些区别
热门文章
云原生架构应该怎么设计?
【Git】2. Git常用命令详解、版本切换原理
【Git】1. Git概述
【cypress】6. cypress的默认文件结构介绍
【小白学算法】12. 排序算法-选择排序
【cypress】5. 测试本地web应用
【pytest官方文档】解读-fixtures函数和测试函数的参数化
【cypress】4. 丰富的调试工具
【cypress】3. 编写第一个测试
【cypress】2. 安装Cypress(windows系统),以及cypress open报错解决。
Copyright © 2011-2022 走看看