[步骤] openSUSE & SLE 开机自启

内容一:openSUSE & SLE 开机设置文档介绍

1) /etc/init.d/boot.local
2) /etc/init.d/halt.local
3) /etc/init.d/before.local
4) /etc/init.d/after.local


补充:
1) 其中的 boot.local 是在刚开机时,在所有其他的程序执行前执行的文件
2) 其中的 after.local 是在刚开机后,在所有其他的程序执行后执行的文件

(注意:上面第三和第四个档案默认是不存在的,可以自己创建一个, 就像写个 shell 一样很简单)

内容二:设置 openSUSE & SLE 开机自启命令的案例

2.1 创建 after.local 文件

# vim /etc/init.d/after.local

创建以下内容:

sudo systemctl restart httpd

(补充:这里以开机自启 httpd 程序为例)

2.2 给 after.local 文件执行权限

# chmod u+x /etc/init.d/after.local

[内容] 软件源的设置 (openSUSE 版) (非官方版)

步骤一:禁用所有原有的软件源

# zypper mr -da

步骤二:添加阿里的 openSUSE 软件源

# sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.0/repo/oss openSUSE-Aliyun-OSS
# sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.0/repo/non-oss openSUSE-Aliyun-NON-OSS
# sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.0/oss openSUSE-Aliyun-UPDATE-OSS
# sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.0/non-oss openSUSE-Aliyun-UPDATE-NON-OSS


补充:
1) 命令中最后一个参数为每这个源指定了一个别称
2) 这里以添加 openSUSE 15.0 版本的 oss、non-oss、update 和 update-now-oss 库为例

步骤三:刷新所有处于 enable 状态的软件源

# zypper ref

[内容] CentOS Linux & RHEL YUM 的使用 (只更新安全补丁)

内容一:更新全部安全补丁

1.1 安装 yum-security 插件

# yum install yum-security

1.2 列出所有的安全补丁

# yum --security check-update

1.3 批量安装所有的安全补丁

# yum update --security

内容二:列出某个安全补丁的详细信息

2.1 加载 bugzillas

# yum list-security bugzillas

2.2 显示某个安全补丁的详细信息

# yum info-security <patch name>

(补充:CentOS&RHEL 的补丁名都是以 RHSA 开头,例:RHSA-2009:1148-1)