现在的位置: 首页 > 综合 > 正文

tar.gz tar.bz2安装方法

2013年10月18日 ⁄ 综合 ⁄ 共 2177字 ⁄ 字号 评论关闭

linux下解压tar.gz文件 

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

[yonghu@localhost~]#       su root 

口令:                                       

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

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

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

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

[root@localhostfcitx-3.4.2]#make 

[root@localhostfcitx-3.4.2]#make install 

 

linux下解压tar.bz2文件 

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

[yonghu@localhost~]#       su root 

口令:                                       

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

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

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

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

[root@localhostfcitx-3.4.2]#make 

[root@localhostfcitx-3.4.2]#make install 

 

各步骤详解 

 

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

口令:                                            //
输入root密码 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

[root@localhostfcitx-3.4.2]#make (编译

 

[root@localhostfcitx-3.4.2]#make install (安装

 

 

 

 

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

======================================== 

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

 

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

 

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

 

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

 

 

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

 

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

 

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

 

 

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

[root@localhostfcitx]#cd fcitx 

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

[root@localhost fcitx]#make 

[root@localhostfcitx]# make install 

 

源文档 <http://bywind.blog.163.com/blog/static/469012512010111110416809/

抱歉!评论已关闭.