Linux中--prefix命令使用及源码安装

1.prefix - 指定文件安装路径通常与configure搭配使用:

在安装源码时可使用下述命令指定源码安装路径:

bogon:httpd-2.4.59 wancanchishenma$./configure --prefix=/usr/local/apache

2.源码的安装一般由3个步骤组成:配置(configure)、编译(make)、安装( make install ).

1>下载源码后进入该文件夹内:

bogon:local wancanchishenma$ cd httpd-2.4.59/

2>使用./configure对源码包进行配置:

bogon:httpd-2.4.59 wancanchishenma$./configure --prefix=/usr/local/

3>进行编译与安转,可分别执行make与make install:

bogon:httpd-2.4.59 wancanchishenma$ make&&make install

a.执行这步时可能会报权限问题无法安装:Permission denied,可以手动创建文件夹。

b.或者单独执行make时可能会报错:Make: Nothing to be done for 'all'.这时可以执行make clean 清除安装时留下的文件。

相关推荐
热心市民运维小孙23 分钟前
基于HAproxy搭建负载均衡
运维·junit·负载均衡
Zucker n2 小时前
Ubuntu本地部署Open manus(完全免费可用)
linux·运维·ubuntu
静候光阴2 小时前
python使用venv命令创建虚拟环境(ubuntu22)
linux·开发语言·python
小怪兽长大啦3 小时前
【UI自动化测试思路】测试用例配置
服务器·ui·测试用例
灵山悟空3 小时前
rust语言match模式匹配涉及转移所有权Error Case
linux·开发语言·rust
zym大哥大3 小时前
Linux进程信号二
linux·运维·服务器
5:003 小时前
Linux:网络(网络编程基础)
linux·网络
萌萌哒草头将军4 小时前
🚀🚀🚀 服务器防吃灰指南(二) !
java·服务器·javascript
call_me_wangcheng4 小时前
Ubuntu用户安装cpolar内网穿透
linux·运维·ubuntu
小杨4045 小时前
springboot框架项目应用实践四(日志)
运维·spring boot·后端