ITPub博客

首页 > > > linux源码包的安装

linux源码包的安装

作者:longmanma 时间:2019-12-09 10:16:09 0 删除 编辑

二.源码包安装

适用于所有linux发行版本

配置【configure】

指定软件功能及安装路径

编译 【make】

将源码进行编译生成安装文件

安装 【make install】

将安装文件安装到目标路径

三、压缩与解压

压缩文件的好处有如下几点:

1、文件更小,便于网络传输,效率高;

2、避免杂乱,可以减少文件个数,多个文件一起压缩;

3、有些文件不能直接传输,比如安装程序,压缩后就可以传输了

常见的压缩格式:tar tar.gz tar.bz2 zip gz bz2 rar xz

tar 压缩或解压

tar 压缩或解压时根据其后面所跟的名令选项决定

命令语法

tar 压缩或者解压 gz、bz2、xz格式包

tar [OPTION...] [FILE]...

命令选项

c建立压缩包

v 显示过程

x 解压压缩包

f 必选项 归档文件名

t 查看压缩包内容

j 二次压缩使用bz2格式

z 二次压缩使用gz格式

J 二次压缩使用xz格式

zip格式

安装压缩与解压命令

yum -y install zip unzip

zip - package and compress (archive) files 压缩文件或文件夹

压缩

-r 选项指定你想递归地(recursively)包括所有包括在 filesdir 目录中的文件

zip -r etc.zip /etc

解压

unzip - list, test and extract compressed files in a ZIP archive 显示、测试、解压ZIP包

-v 显示压缩目录内容,但是不解压 unzip -v etc.zip

-t 检查压缩文件是否正确、完整,但是不解压 unzip -t etc.zip

-l 列出压缩文件内容,但是不解压 unzip -l etc.zip

压缩文件

相关命令

[root@www ~]# rpm -qf which bzip2

bzip2-1.0.6-13.el7.x86_64

[root@www ~]# rpm -qf which bunzip2

bzip2-1.0.6-13.el7.x86_64

[root@www ~]# rpm -qf `which gunzip`

gzip-1.5-10.el7.x86_64

[root@www ~]# rpm -qf `which gzip`

gzip-1.5-10.el7.x86_64

源码包的解压与压缩总结

压缩 解压

压缩文件夹

tar -cvzf etc.tar.gz /etc tar xvzf etc.tar.gz

tar -cjvf etc.tar.bz2 /etc tar -jvxf etc.tar.bz2

tar -cvJf etc.tar.xz /etc tar -Jvxf etc.tar.xz

tar -cvf etc.tar /etc tar xvf etc.tar

zip -r tmp.zip /tmp unzip tmp.zip

压缩文件

基于块排序压缩

bzip2 anaconda-ks.cfg bunzip2 install.log.bz2 bzcat install.log.bz2 查看压缩文件内容

gzip anaconda-ks.cfg gunzip install.log.gz zcat install.log.gz 查看压缩文件内容

zip install.log.zip install.log unzip install.log.zip

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2730/viewspace-3146510/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-12-18

  • 博文量
    492
  • 访问量
    11988