使用rpm安装zsh(忽略依赖关系安装)
[root@server ~]# rpm --nodeps -hiv zsh-5.5.1-9.el8.x86_64.rpm
warning: zsh-5.5.1-9.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:zsh-5.5.1-9.el8 ################################# [100%]
- 查询是否已安装
[root@server ~]# rpm -qi zsh-5.5.1-9.el8.x86_64.rpm zsh-5.5.1-9.el8.x86_64
卸载zsh
[root@server ~]# rpm -e zsh-5.5.1-9.el8.x86_64
查询所有已安装软件
-
[root@server ~]# rpm -qa
查询date命令所在软件包
[root@server ~]# whereis date date: /usr/bin/date /usr/share/man/man1/date.1.gz /usr/share/man/man1p/date.1p.gz [root@server ~]# cd /usr/bin/ [root@server bin]# rpm -qf date coreutils-8.30-12.el8.x86_64
查询未安装的zsh的文件信息
-
[root@server bin]# rpm -ql zsh-5.5.1-9.el8.x86_64 package zsh-5.5.1-9.el8.x86_64 is not installed
yum本地源配置
-
[root@server mnt]# mount /dev/sr0 /mnt/ mount: /mnt: /dev/sr0 already mounted on /mnt. [root@server mnt]# cd /etc/yum.repos.d/ [root@server yum.repos.d]# vim redhat.repo """ [BaseOS] name=BaseOS baseurl=file:///mnt/BaseOS gpgcheck=0 [AppStream] name=AppStream baseurl=file:///mnt/AppStream gpgcheck=0 """配置 [root@server yum.repos.d]# yum clean all [root@server yum.repos.d]# yum makecache
yum网络源配置
-
sftp> put C:\Users\jameth\Desktop\Centos-vault-8.5.2111.repo /etc/yum.repos.d Uploading C:/Users/jameth/Desktop/Centos-vault-8.5.2111.repo to /etc/yum.repos.d/Centos-vault-8.5.2111.repo C:/Users/jameth/Desktop/Centos-vault-8.5.2111.repo 100% 2519 1.2MB/s 00:00 [root@server yum.repos.d]# ls -l total 8 -rw-r--r--. 1 root root 2519 Jul 20 18:57 Centos-vault-8.5.2111.repo -rw-r--r--. 1 root root 487 Jul 20 18:35 redhat.repo [root@server yum.repos.d]# yum clean all [root@server yum.repos.d]# yum makecache
安装httpd软件
-
[root@server yum.repos.d]# yum install httpd
查看vim命令属于哪个软件包
[root@server yum.repos.d]# whereis vim vim: /usr/bin/vim /usr/share/vim /usr/share/man/man1/vim.1.gz [root@server yum.repos.d]# rpm -qf /usr/bin/vim vim-enhanced-8.0.1763-16.el8.x86_64
yum卸载httpd
[root@server yum.repos.d]# yum remove httpd
清理缓存
[root@server yum.repos.d]# yum clean all
重新创建缓存
-
[root@server yum.repos.d]# yum makecache
安装postgresql模块中的版本13
-
[root@server yum.repos.d]# yum install @postgresql:13
源码安装: httpd
-
[root@server ~]# tar xf httpd-2.4.12.tar.gz [root@server ~]# cd httpd-2.4.12/ [root@server ~]# ./configure --prefix=/usr/local/httpd24 --enable-so --enable-rewrite --enable-ssl [root@server ~]# make && make install
查看root用户带有终端的进程
-
[root@server ~]# ps -l
显示没有终端的进程
[root@server ~]# ps -x
显示所有进程
-
[root@server ~]# ps aux
查看1分钟内占用CPU时间前10的进程(使用top命令
-
top |head -;top |grep -v PID|sort -rn -k +|head