报错命令案例
# scp eternalcenter.com:/home/mingyuzhu/test.txt .
报错代码案例
scp: Connection closed
解决方法
# scp -O eternalcenter.com:/home/mingyuzhu/test.txt .
# scp eternalcenter.com:/home/mingyuzhu/test.txt .
scp: Connection closed
# scp -O eternalcenter.com:/home/mingyuzhu/test.txt .
# vi /etc/rsyslog.conf
添加以下内容:
......
$FileOwner root
$FileGroup root
$FileCreateMode 0640
$DireCreateMode 0640
或者:
......
$FileOwner root
$FileGroup root
$Umask 0137
(补充:这里以所属主是 root、所属组是 root、文件的权限是 0640、目录的权限是 0755 为例)
如果是 RHEL 6 和 RHEL 6 之前的版本 RHEL:
# service rsyslog restart
# service auditd restart
如果是 RHEL 7 和 RHEL 7 之后版本的 RHEL 或者是 SLES:
# systemctl restart rsyslog
# service auditd restart
/etc/systemd/system/
[Unit]
Description=<service name>
Before=<another1.service> <another2.service> <another3.service>......
After=<another1.service> <another2.service> <another3.service>......
Requires=<another1.service> <another2.service> <another3.service>......
[Service]
Type=<type name>
ExecStart=<script>
[Install]
WantedBy=<action1>.target
WantedBy=<action2>.target
WantedBy=<action3>.target
......
(
补充:
1) Description= 服务的名称
2) Before= 必须在什么服务启动之前启动此服务
3) After= 必须在什么服务启动之后启动此服务
4) Requires= 启动此服务必须要求什么服务
5) Type= 启动此服务的方式,可以是 oneshot 或者 forking
6) ExecStart= 要执行的脚本
7) WantedBy= 在系统执行什么动作时启动此服务,可以是 default.target、poweroff.target、reboot.target 或者 halt.target
)
# chage -l mingyuzhu
configuration error - unknown item 'USERADD_CMD' (notify administrator)
configuration error - unknown item 'USERDEL_PRECMD' (notify administrator)
configuration error - unknown item 'USERDEL_POSTCMD' (notify administrator)
configuration error - unknown item 'CHARACTER_CLASS' (notify administrator)
......
# cat /var/log/messages
......
......chage[31546]: shadow: unknown configuration item 'USERADD_CMD' in '/etc/login.defs'
......chage[31546]: shadow: unknown configuration item 'USERDEL_PRECMD' in '/etc/login.defs'
......chage[31546]: shadow: unknown configuration item 'USERDEL_POSTCMD' in '/etc/login.defs'
......chage[31546]: shadow: unknown configuration item 'CHARACTER_CLASS' in '/etc/login.defs'
......
在 /etc/login.defs 文件中有不被系统支持的参数
SLES 15.7 及以上的版本不再支持以下参数:
USERADD_CMD
USERDEL_PRECMD
USERDEL_POSTCMD
CHARACTER_CLASS
将所有和报错相关的参数注释掉,例如
# vi /etc/login.defs
注释掉以下内容:
......
#USERADD_CMD /usr/sbin/useradd.local
......
#USERDEL_PRECMD /usr/sbin/userdel-pre.local
......
#USERDEL_POSTCMD /usr/sbin/userdel-post.local
......
#CHARACTER_CLASS ......
......
Problem: module php:7.2:820181215112050:76554e01.x86_64 from rhel-8-for-x86_64-appstream-rpms requires module(nginx:1.14), but none of the providers can be installed
- module nginx:1.14:820181214004940:9edba152.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(nginx:1.24) provided by nginx:1.24:8100020240119085512:e155f54d.x86_64 from rhel-8-for-x86_64-appstream-rpms
- module nginx:1.24:8100020240119085512:e155f54d.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(nginx:1.14) provided by nginx:1.14:820181214004940:9edba152.x86_64 from rhel-8-for-x86_64-appstream-rpms
- module nginx:1.14:8000020190830002848:f8e95b4e.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(nginx:1.24) provided by nginx:1.24:8100020240119085512:e155f54d.x86_64 from rhel-8-for-x86_64-appstream-rpms
- module nginx:1.24:8100020240119085512:e155f54d.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(nginx:1.14) provided by nginx:1.14:8000020190830002848:f8e95b4e.x86_64 from rhel-8-for-x86_64-appstream-rpms
- conflicting requests
Dependencies resolved.
# dnf module disable php
# dnf module reset php && dnf module enable php:7.2
(补充:这里以设置 php:7.2 模块为例)