源代码编译

在这里插入图片描述
确认源代码编译环境,需要支持C/C++程序语言的编译器,如:
gcc-4.4.7-4.el6 gcc-c++ -4.4.7-4.el6 make-3.8.1-20.el6
一、在服务器ftp://172.16.0.1中下载源代码在这里插入图片描述
二、在Xhell中点在这里插入图片描述,将httpd-2.2.17.tar移到Xshell中/root ,/, /usr/src
在这里插入图片描述
三、tar解包
[root@localhost ~]# tar -xf httpd-2.2.17.tar.gz -C /usr/src
[root@localhost ~]# ls /usr/src
httpd-2.2.17
tar命令中格式及-xf -C意思见下图详解
在这里插入图片描述
四、预配置
[root@localhost httpd-2.2.17]# cd /usr/src/httpd-2.2.17/
[root@localhost httpd-2.2.17]# ./configure --prefix=/usr/local/apache
–prefix=软件安装目录
五、编译—执行make 命令
[root@localhost httpd-2.2.17]# make
六、安装—执行make install 命令
[root@localhost httpd-2.2.17]# make install
七、编译安装步骤
(1)备份后,修改配置文件
[root@localhost httpd-2.2.17]# cd /usr/local/apache/conf/
[root@localhost conf]# cp httpd.conf httpd.conf.bak
[root@localhost conf]# vi /usr/local/apache/conf/httpd.conf
……
#ServerName www.example.com:80
ServerName www.example.com:80
……
cd—切换工作路径
cp—复制命令见下图详解
vi 文本编辑器—进入之后是命令模式,按o键进入输入模式修改,再按ESC键退回命令模式
在这里插入图片描述
(2)启动Apache
[root@localhost conf]# /usr/local/apache/bin/apachectl start
(3)运行 lynx 127.0.0.1
在这里插入图片描述
如果没有lynx ,gcc,gcc-c++,make软件包,需要创建yum仓库,快速安装包

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值