openSUSE 官方软件包单独下载网址
https://software.opensuse.org
openSUSE 官方软件包单独下载网址
https://software.opensuse.org
# yum help
# yum help <option>
或者:
# yum <option> help
# yum install <software>
# yum -y install <software>
或者:
# yum install <software> -y
# yum remove <software>
# yum -y remove <software>
或者:
# yum remove <software> -y
# yum update <software>
# yum -y update <software>
或者:
# yum update <software> -y
# yum update
# yum -y update
或者:
# yum update -y
# yum update --exclude=<software>
# yum -y update --exclude=<software>
或者:
# yum update --exclude=<software> -y
# yum check-update
# yum list all | grep <software>
# yum info | grep <software>
# yum list all
# yum groupinstall <group>
# yum -y groupinstall <group>
或者:
# yum groupinstall <group> -y
# yum groupremove <group>
# yum -y groupremove <group>
或者:
# yum groupremove <group> -y
# yum group list
# yum update --advisory=<errata>
# yum -y update --advisory=<errata>
或者:
# yum update --advisory=<errata> -y
# yum updateinfo <errata>
# yum update-minimal --security
# yum -y update-minimal --security
或者:
# yum update-minimal --security -y
# yum updateinfo list
# yum updateinfo info security
# yum update --cve <CVE>
# yum -y update --cve <CVE>
或者:
# yum update --cve <CVE> -y
# yum updateinfo list cves
# yum updateinfo info security
# yum update <security patch>
# yum -y update <security patch>
或者:
# yum update <security patch> -y
# yum update --security
# yum -y update --security
或者:
# yum update --security -y
# yum check-update --security
# yum repolist
# yum repolist
# yum clean all
# yum makecache
# yum module list
# yum module reset <module>
# yum module enable <module>:<versione>
# yum distro-sync
(注意:需要确保这条命令执行有以后没有报错)
# yum module list | grep podman
container-tools rhel8 [d] common [d] Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc, conmon, CRIU, Udica, etc as well as dependencies such as container-selinux built and tested together, and updated as frequently as every 12 weeks.
container-tools 1.0 common [d] Stable versions of podman 1.0, buildah 1.5, skopeo 0.1, runc, conmon, CRIU, Udica, etc as well as dependencies such as container-selinux built and tested together, and supported for 24 months.
container-tools 2.0 common [d] Stable versions of podman 1.6, buildah 1.11, skopeo 0.1, runc, conmon, etc as well as dependencies such as container-selinux built and tested together, and supported as documented on the Application Stream lifecycle page.
container-tools 3.0 common [d] Stable versions of podman 3.0, buildah 1.19, skopeo 1.2, runc, conmon, etc as well as dependencies such as container-selinux built and tested together, and supported as documented on the Application Stream lifecycle page.
container-tools 4.0 common [d] Stable versions of podman 4.0, buildah 1.24, skopeo 1.6, runc, conmon, etc as well as dependencies such as container-selinux built and tested together, and supported as documented on the Application Stream lifecycle page.
(补充:这里以显示所有和 podman 软件相关的软件模块为例)
# yum module reset container-tools
(补充:这里以重置 container-tools 软件模块为例)
# yum module enable container-tools:3.0
(补充:这里以设置 container-tools 软件模块版本号为 3.0 为例)
# yum list all | egrep ^podman\.x
podman.x86_64 3.0.1-9.module+el8.6.0+14874+64436299 rhel-8-for-x86_64-appstream-rpms
(补充:可以看到此时 podman 软件的可用版本是 3.0.1-9)
# yum module reset container-tools
(补充:这里以重置 container-tools 软件模块为例)
# yum list all | egrep ^podman\.x
podman.x86_64 2:4.0.2-6.module+el8.6.0+14877+f643d2d6 rhel-8-for-x86_64-appstream-rpms
(补充:可以看到此时 podman 软件的可用版本是 2:4.0.2-6)
# yum history
# yum history info
# vim /etc/sshd/sshd_config
如果是 CentOS Linux & RHEL,将以下内容:
......
Subsystem sftp /usr/libexec/openssh/sftp-server
......
修改为:
......
Subsystem sftp /usr/libexec/openssh/sftp-server -l INFO
......
如果是 openSUSE & SLE, 将以下内容:
......
Subsystem sftp /usr/lib/ssh/sftp-server
......
修改为:
......
Subsystem sftp /usr/lib/ssh/sftp-server -l INFO
......
(补充:此时当通过 SFTP 登录系统时,系统日志记录文件 /var/log/messages 里登录记录后面会紧跟一行带 sftp-server 的记录)
作者:朱明宇
名称:批量比较服务器所有正在运行进程的变化
作用:批量比较服务器所有正在运行进程的变化
1. 服务器清单 $server_list 每台服务器占用 1 行
2. 在此脚本的分割线内写入相应的内容,并和此脚本放在同一目录下
3. 给此脚本添加执行权限
4. 执行此脚本
5. 此脚本执行完成后,会将运行结果写入当前目录下的 $compare_file 里
server_list=server_list.txt #服务器清单
first_time=first_time #存储第一次检结果的目录
second_time=second_time #存储第二次检查结果的目录
compare_file=comparison_results.txt #存储比较结果的文件
此脚本执行前必须要先保证执行本脚本的用户能无密码 ssh 远程这些远程服务器
#!/bin/bash
####################### Separator ########################
server_list=server_list.txt
first_time=first_time
second_time=second_time
compare_file=comparison_results.txt
####################### Separator ########################
mkdir $first_time &> /dev/null
mkdir $second_time &> /dev/null
echo > $compare_file
read -p "Please input first second or compare now: " choice
check(){
for server_name in `cat $1`
do
ssh -t $server_name "ps -A" | awk '{print $4}' > $2/$server_name
done
}
compare(){
for server_name in `cat $1`
do
echo $server_name >> $4
for process in `cat $2/$server_name`
do
grep $process $3/$server_name &> /dev/null
if [ $? -ne 0 ];then
echo $process >> $4
fi
done
echo >> $4
done
}
if [ $choice == first ];then
check $server_list $first_time
fi
if [ $choice == second ];then
check $server_list $second_time
fi
if [ $choice == compare ];then
compare $server_list $first_time $second_time $compare_file
fi
# vim /etc/hosts
Add the following:
......
<Redhat Satellite IP address> <Redhat Satellite Server FQDN>
# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://<Redhat Satellite Server FQDN>/pub/katello-ca-consumer-latest.noarch.rpm
# yum -y localinstall katello-ca-consumer-latest.noarch.rpm
# subscription-manager register --org="<organization>" --activationkey="<activation key>"
RHEL 7:
# subscription-manager repos --enable=rhel-\*-satellite-tools-\*-rpms
RHEL 8:
# subscription-manager repos --enable=satellite-tools-\*-rhel-\*-rpms
# subscription-manager repos --disable=satellite-tools-\*-rhel-\*-eus-rpms
# yum -y install katello-host-tools; yum -y install katello-host-tools-tracer; yum -y install katello-agent
# subscription-manager identity
# subscription-manager list --consumed