linux安装软件的几种方法

rpm -q 软件名:

[root@localhost abc]# rpm -q tree
tree-1.6.0-10.el7.x86_64

rpm -qc (configfiles ) 软件名 列出已安装的指定软件的配置文件

rpm -e rpm软件包

[root@localhost abc]# rpm -e tree
[root@localhost abc]# tree
-bash: /usr/bin/tree: 没有那个文件或目录

编译安装nginx

 379  wget http://nginx.org/download/nginx-1.18.0.tar.gz 
  380  tar xf nginx-1.18.0.tar.gz
  381  cd nginx-1.18.0
  382  yum -y install make gcc pcre-devel openssl-devel zlib-devel openssl openssl-devel 
  383  ./configure --prefix=/apps/nginx
  384  make install
  385  ln -s /apps/nginx/sbin/nginx /user/local/sbin
  386  nginx
  387  cd /
  388  ln -s /apps/nginx/sbin/nginx /usr/local/sbin
  389  nginx
  390  history

yum安装

[root@localhost /]# rpm -e tree
[root@localhost /]# tree
-bash: /usr/bin/tree: 没有那个文件或目录
[root@localhost /]# yum install tree
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.sjtu.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.tuna.tsinghua.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 tree.x86_64.0.1.6.0-10.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=========================================================================================
 Package           架构                版本                      源                 大小
=========================================================================================
正在安装:
 tree              x86_64              1.6.0-10.el7              base               46 k

事务概要
=========================================================================================
安装  1 软件包

总下载量:46 k
安装大小:87 k
Is this ok [y/d/N]: y
Downloading packages:
tree-1.6.0-10.el7.x86_64.rpm                                      |  46 kB  00:00:05     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
  正在安装    : tree-1.6.0-10.el7.x86_64                                             1/1 
  验证中      : tree-1.6.0-10.el7.x86_64                                             1/1 

已安装:
  tree.x86_64 0:1.6.0-10.el7                                                             

完毕!
[root@localhost /]# cd abc
[root@localhost abc]# tree
.
├── a
├── aaa
│   ├── abc.tar
│   ├── bbb
│   │   └── ccc
│   └── d
├── abc.gz.tar
├── b
├── c
└── d

3 directories, 7 files
[root@localhost abc]# 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值