使用rpm安装zsh(忽略依赖关系安装)
[root@rhcsa ~]# 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@rhcsa ~]# rpm -qi zsh-5.5.1-9.el8.x86_64.rpm
zsh-5.5.1-9.el8.x86_64
[root@rhcsa ~]# rpm -e zsh-5.5.1-9.el8.x86_64
[root@rhcsa ~]# rpm -qa
[root@rhcsa ~]# whereis date
date: /usr/bin/date /usr/share/man/man1/date.1.gz /usr/share/man/man1p/date.1p.gz
[root@rhcsa ~]# cd /usr/bin/
[root@rhcsa bin]# rpm -qf date
coreutils-8.30-12.el8.x86_64
[root@rhcsa 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@rhcsa mnt]# mount /dev/sr0 /mnt/
mount: /mnt: /dev/sr0 already mounted on /mnt.
[root@rhcsa mnt]# cd /etc/yum.repos.d/
[root@rhcsa yum.repos.d]# vim redhat.repo
"""
[BaseOS]
name=BaseOS
baseurl=file:
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:
gpgcheck=0
"""
[root@rhcsa yum.repos.d]# yum clean all
[root@rhcsa yum.repos.d]# yum makecache
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@rhcsa yum.repos.d]# ls -l
total 8
-rw-r--r--. 1 root root 2519 Jul 24 16:57 Centos-vault-8.5.2111.repo
-rw-r--r--. 1 root root 487 Jul 24 16:50 redhat.repo
[root@rhcsa yum.repos.d]# yum clean all
[root@rhcsa yum.repos.d]# yum makecache
[root@rhcsa yum.repos.d]# yum install httpd
[root@rhcsa /]# whereis vim
vim: /usr/bin/vim /usr/share/vim /usr/share/man/man1/vim.1.gz
[root@rhcsa /]# rpm -qf /usr/bin/vim
vim-enhanced-8.0.1763-16.el8.x86_64
[root@rhcsa yum.repos.d]# yum remove httpd
[root@rhcsa yum.repos.d]# yum clean all
[root@rhcsa yum.repos.d]# yum makecache
[root@rhcsa yum.repos.d]# yum install @postgresql:13
源码安装: httpd
[root@rhcsa ~]# tar xf httpd-2.4.12.tar.gz
[root@rhcsa ~]# cd httpd-2.4.12/
[root@rhcsa ~]# ./configure --prefix=/usr/local/httpd24 --enable-so --enable-rewrite --enable-ssl
[root@rhcsa ~]# make && make install
[root@rhcsa ~]#systemctl stop firewalld
[root@rhcsa ~]#setenforence 0
查看root用户带有终端的进程
[root@rhcsa ~]# ps -l
[root@rhcsa ~]# ps -x
[root@rhcsa ~]# ps aux
- 查看1分钟内占用CPU时间前10的进程(使用top命令)
top |head -;top |grep -v PID|sort -rn -k +|head