Linux源码包的安装

一般情况下rpm包对应文件的安装位置(以httpd为例,使用rpm –ql httpd查看文件的安装位置)

配置文件:/etc/httpd

程序所用函数库:/usr/lib64(或lib)/httpd

可执行文件:/usr/sbin/

使用手册:/usr/share/httpd

帮助文件:/usr/share/man

网页文件存放:/var/www/html

 

RPM包服务启动方法(存疑,因为我的httpd服务没办法这样启动)

/etc/rc.d/inid.d/httpd start

service httpd start

 

源码包安装位置:

/usr/local/src

源代码安装位置:

/usr/local/

源码包的服务启动

/usr/local/apache2/bin/apachectl start

 

1.      下载源码包,解压缩

tar –zxvf <File name>

2.      进入解压缩目录

3.       ./configure 软件配置与检查

定义软件安装位置,其中/usr/local/是系统默认准备的安装位置

./configure –prefix=/usr/local/apache2

 

报错:当我到这一步时,系统报错:

PCRE is required and available from http://pcre.org/

于是,我到对应的网址,下载PCRE对应的安装包,以同样的方式进行安装。

然后,当我再次进入httpd目录,执行以上操作时,依然报错:

configure:error:pcre-config for libpcre not found. PCRE is required andavailable from http://pcre.org/

原来,我的PCRE安装目录名为/usr/local/pcre-7.8

所以,我在httpd的目录中,实际执行命令为:

./configure--prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre-7.8

4.      编译

make

5.      编译执行(取消)

make install

make clean

6.      启动apchae

/usr/local/apache2/bin/apachectl start

7.      源码包卸载

rm –rf删除对应目录即可

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值