源码安装

[root@b ~]# mkdir /test
[root@b ~]# cd /test
rz      //从物理机拷贝压缩包到虚拟机
[root@b test]# ll
total 13452
-rw-r--r--. 1 root root 9756455 Dec 10  2016 Discuz_X2.5_SC_UTF8.zip
-rw-r--r--. 1 root root 3962257 Dec 10  2016 tar-1.29.tar.gz
drwxr-xr-x. 3 root root    4096 Nov 19 22:26 tree-1.7.0
-rw-r--r--. 1 root root   47082 Feb 20  2017 tree-1.7.0.gz
[root@b ~]# mount /dev/sr0 /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@b ~]# vim /etc/yum.repos.d/base.repo
[base]
name=base
baseurl=file:///mnt
gpgcheck=0
:wq
[root@b ~]# yum repolist   //查看状态值,0不正常,一般为repolist: 4,620
[root@b ~]# yum install gcc* -y     // 安装编译环境所需软件
[root@b test]# tar -zxvf tree-1.7.0.gz  //解压缩
  [root@b test] #cd  tree-1.7.0
  [root@b  test] #make install   //编译安装
  [root@b test] #tree /    -----测试Tree命令能否正常使用



tar备份


[root@haha test]#tar    -zxvf tar-1.29.tar.gz
 [root@haha test]#mv /usr/bin/tar   /usr/bin/tar.bak
[root@haha test]# cd tar-1.29
[root@haha test]ll             //c查看有configure
 [root@haha tar-1.29]# ./configure       //当前目录下执行
[root@haha tar-1.29]rm –rf config.log
[root@haha tar-1.29]$su  redhat
[root@haha tar-1.29]$./configure       配置  预编译根据当前环境生成编译配置
[root@haha tar-1.29]$exit    //退出redhat用户保证用户是root
[root@haha tar-1.29]#pwd  /test/tar-1.29

[root@haha tar-1.29]#make   install
[root@haha tar-1.29]cd..
[root@haha test]#hash -r
[root@haha test]#rm -f tree-1.7.0
[root@haha test]#tar -zxvf  tree-1.7.0.gz

tar工具可以再次执行




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值