源码编译安装软件包

前提:系统必须安装:开发工具、开发库。br/>步骤:
1、获取源码包
2、解压
[root@localhost extundelete-0.2.4]# tar -jxvf extundelete-0.2.4.tar.bz2 
3、配置、检测安装环境
br/>[root@localhost extundelete-0.2.4]# cd extundelete-0.2.4/
[root@localhost extundelete-0.2.4]# ./configure 
检查安装环境是否符合需求,如果没有问题,生成:makefile文件
4、编译
#make
5、安装
#make install
6、卸载 在解压的目录执行卸载命令
br/>[root@localhost extundelete-0.2.4]# cd extundelete-0.2.4/
[root@localhost extundelete-0.2.4]# make uninstall
br/>Making uninstall in src
 ( cd '/usr/local/bin' && rm -f extundelete )
[root@localhost extundelete-0.2.4]# ll /usr/local/bin/
总用量 0
7、建议安装方式
为防止卸载时删除不干净,建议安装时在comfigure步骤添加一个:--prefix 参数,这样删除或备份时,直接对这个目录操作就可以了。
br/>[root@localhost ~]# cd extundelete-0.2.4/
[root@localhost extundelete-0.2.4]# make clean    再次编译需执行次命令
Making clean in src
Making clean in .
[root@localhost extundelete-0.2.4]# ./configure --prefix=/usr/local/extundelete-161207 指定安装位置
Configuring extundelete 0.2.4
Writing generated files to disk
[root@localhost extundelete-0.2.4]# make && make install 如果确认编译不会有问题可以一起执行两个命令
br/>[root@localhost ~]# ll /usr/local/extundelete-161207/bin/extundelete
-rwxr-xr-x. 1 root root 1323536 12月  8 21:00 /usr/local/extundelete-161207/bin/extundelete
br/>以后删除只需删除设置的路径即可
[root@localhost local]# pwd
/usr/local
br/>[root@localhost local]# rm -rf extundelete-161207/
[root@localhost local]#
~~~~~

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值