linux 安装.gz文件,linux安装gz文件命令

在linux系统下如何安装gz文件命令,下面由学习啦小编为大家整理了linux下安装gz文件命令的方法步骤,希望大家喜欢!

linux下安装gz文件命令

linux tar.gz安装方法

linux下解压tar.gz文件

下面所所有操作,后面有所有步骤说明

[yonghu@localhost ~]# su root

口令:

[root@localhost ~]# cd /home/new/Desktop

[root@localhost Desktop]# tar -xzvf fcitx-3.4.2.tar.gz

[root@localhost Desktop]# cd /home/new/Desktop/fcitx-3.4.2

[root@localhost fcitx-3.4.2]#./configure --prefix=/opt/fictx

[root@localhost fcitx-3.4.2]#make

[root@localhost fcitx-3.4.2]#make install

各步骤详解

[yonghu@localhost ~]#su root //(使用root帐户登录,使用其他用户,之后操作有可能权限不够)

口令: // 输入root密码

[root@localhost ~]# cd /home/new/Desktop

// (切换到tar.gz文件所在目录,这里我的tar.gz文件在桌面)

[root@localhost Desktop]#tar -xzvf fcitx-3.4.2.tar.gz

// (解压tar.gz文件,这里以fcitx-3.4.2来举例,解压得到fcitx-3.4.2文件夹)

[root@localhost Desktop]#cd /home/new/Desktop/fcitx-3.4.2

//(切换目录到fcitx-3.4.2,软件解压的目录)

[root@localhost fcitx-3.4.2]#./configure --prefix=/opt/fictx

//(配置,把文件存放在/opt/fictx下,删除时,卸载软件时,只要删除这个文件就行了)

[root@localhost fcitx-3.4.2]#make (编译)

[root@localhost fcitx-3.4.2]#make install (安装)

在tar.gz的东西不多了~~~~

补充说明:linux下tar.gz文件如何安装

大多以tar.gz 和tar.bz2打包软件,大多是通过 ./configure ;make ;make install 来安装的;有的软件是直接make;make install ;

我们可以通过./configure --help 来查看配置软件的功能;大多软件是提供./configure 配置软件的功能的;少数的也没有,如果没有的就不用./configure ;直接make;make install 就行了;

./configure 比较重要的一个参数是 --prefix ,用--prefix 参数,我们可以指定软件安装目录;当我们不需要这个软件时,直接删除软件的目录就行了;

比如我们可以指定fcitx 安装到 /opt/fcitx 目录中;

[root@localhost fcitx]#./configure --prefix=/opt/fcitx

如果我们不需要fcitx 时,可以直接删除 /opt/fcitx 目录;

所以我们举这个例子中,fcitx如果定制安装到 /opt/fcitx目录中,完整的安装方法应该是:

[root@localhost fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2

[root@localhost fcitx]#cd fcitx

[root@localhost fcitx]# ./configure --prefix=/opt/fcitx

[root@localhost fcitx]# make

[root@localhost fcitx]# make install

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值