Post

linux(CentOS7) 应用程序管理

应用程序管理

软件包基础

常见安装工具包

  • RPM
  • DPKG

RPM 使用

安装软件 (rz 示例)

都和以下载

ftp://ftp.pbone.net/mirror/ftp.centos.org/7.7.1908/os/x86_64/Packages/lrzsz-0.12.20-36.el7.x86_64.rpm

wget http://images.lichaocheng.top/static/upload/2020/03/28/6fc647af1780ffc0b127510a418445a1.rpm

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@Cc rpm]#  wget ftp://ftp.pbone.net/mirror/ftp.centos.org/7.7.1908/os/x86_64/Packages/lrzsz-0.12.20-36.el7.x86_64.rpm
[root@Cc rpm]# pwd
/root/RedHad/8/rpm
[root@Cc rpm]# ll
总用量 80
-rw-r--r-- 1 root root 79376 3月  28 15:10 6fc647af1780ffc0b127510a418445a1.rpm
[root@Cc rpm]# rpm -ivh lrzsz-0.12.20-36.el7.x86_64.rpm
准备中...                          ################################# [100%]
正在升级/安装...
   1:lrzsz-0.12.20-36.el7             ################################# [100%]
[root@Cc rpm]# rz --version
rz (lrzsz) 0.12.20
[root@Cc rpm]#

升级

[root@Cc rpm]# rpm -Uvh lrzsz-0.12.20-36.el7.x86_64.rpm

查看已安装的软件包、和查看安装位置

1
2
[root@Cc rpm]# rpm -qa |grep rz
lrzsz-0.12.20-36.el7.x86_64

卸载

1
2
3
4
5
6
[root@Cc rpm]# rpm -qa |grep rz
lrzsz-0.12.20-36.el7.x86_64
[root@Cc rpm]# rpm -e lrzsz-0.12.20-36.el7.x86_64
[root@Cc rpm]# rz --version
-bash: /usr/bin/rz: 没有那个文件或目录
[root@Cc rpm]#

查看文件属于哪个文件

1
2
3
[root@Cc rpm]# which go
/usr/local/go/go/bin/go
[root@Cc rpm]#

查看rpm说明信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[root@Cc rpm]# rpm -qip lrzsz-0.12.20-36.el7.x86_64.rpm
Name        : lrzsz
Version     : 0.12.20
Release     : 36.el7
Architecture: x86_64
Install Date: (not installed)
Group       : Applications/Communications
Size        : 184846
License     : GPLv2+
Signature   : RSA/SHA256, 2014年07月04日 星期五 11时35分32秒, Key ID 24c6a8a7f4a80eb5
Source RPM  : lrzsz-0.12.20-36.el7.src.rpm
Build Date  : 2014年06月10日 星期二 07时29分11秒
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.ohse.de/uwe/software/lrzsz.html
Summary     : The lrz and lsz modem communications programs
Description :
Lrzsz (consisting of lrz and lsz) is a cosmetically modified
zmodem/ymodem/xmodem package built from the public-domain version of
the rzsz package. Lrzsz was created to provide a working GNU
copylefted Zmodem solution for Linux systems.
[root@Cc rpm]#

源码安装

  • 主要是依赖 makeMakefile 编译
  • make install ,执行完之后,安装一般会被安装在/uer/local下对应的文件夹,部分二进制文件放在usr/bin或在/usr/local/bin 对应的头文件被安装至/usr/include,帮助文档安装至/usr/local/share ,如果指定目录请加到环境变量里面去

yum install

Linux 函数库

从源码安装 web 服务软件Nginx

  • 下载地址【http://nginx.org/
  • 创建预知准备好的Nginx目录
  • rpm、源码、yum install 都可以
    • yum install nginx 【个人觉得最实用了

对于相关 应用程序安装blog.lichaocheng.top 下的相关安装文章

This post is licensed under CC BY 4.0 by the author.