at 命令
at 命令白名单文件
/etc/at.allow
at 命令黑名单文件
/etc/at.deny
cron 命令
cron 命令白名单文件
/etc/cron.allow
cron 命令黑名单文件
/etc/cron.deny
/etc/at.allow
/etc/at.deny
/etc/cron.allow
/etc/cron.deny
# echo "1100 32999" > /proc/sys/net/ipv4/ip_local_port_range
(补充:这里以设置应用可自动随机使用的 IPv4 端口号是从 1100 到 32999 为例)
# echo "33000-34000" > /proc/sys/net/ipv4/ip_local_reserved_ports
(补充:这里以要保留的 IPv4 端口号范围是从 33000 到 34000 为例)
# vim /etc/sysctl.conf
添加以下内容:
......
net.ipv4.ip_local_port_range = 1100 32999
net.ipv4.ip_local_reserved_ports = 33000-34000
(
补充:
1) 这里以设置应用可自动随机使用的 IPv4 端口号是从 1100 到 32999
2) 要保留的 IPv4 端口号范围是从 33000 到 34000
为例
)
# sysctl -p
# cat /proc/sys/net/ipv4/ip_local_port_range
# cat /proc/sys/net/ipv4/ip_local_reserved_ports
# sysctl -a | grep net.ipv4.ip_local_port_range
# sysctl -a | grep net.ipv4.ip_local_reserved_ports
# cat /proc/sys/net/ipv4/ip_local_port_range
32768 65536
(补充:从这里的输出结果可以看出应用可自动随机使用的 IPv4 端口号是从 32768 到 65536)
# sudo sysctl -a | grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 65536
(补充:从这里的输出结果可以看出应用可自动随机使用的 IPv4 端口号是从 32768 到 65536)
# echo "32768 65536" > /proc/sys/net/ipv4/ip_local_port_range
(补充:这里以设置应用可自动随机使用的 IPv4 端口号是从 32768 到 65536 为例)
# vim /etc/sysctl.conf
添加以下内容:
......
net.ipv4.ip_local_port_range = 32768 65536
(补充:这里以设置应用可自动随机使用的 IPv4 端口号是从 32768 到 65536 为例)
# sysctl -p
# vim /etc/default/grub
添加以下内容:
......
GRUB_TIMEOUT_STYLE=hidden
......
添加后的案例:
......
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=" "
......
# update-grub
重启系统后按下 “E” 键不放
grub> normal
(步骤略)
(注意:有时候要重复步骤 2.1 和 2.2 才能显示 GRUB 开机菜单)
此时选择以下选项并按下 “回车” 键,就可以通过拯救模式进入 root 模式了
root Drop to root shell prompt
https://askubuntu.com/questions/381613/how-to-return-from-grub-prompt-to-the-grub-menu
https://blog.csdn.net/geekqian/article/details/82912518
/dev/vg/lv_var /var xfs nodev,nosuid,noexec 0 0
/dev/vg/lv_var_log /var/log xfs nodev,nosuid,noexec,x-systemd.requires-mounts-for=/var 0 0
(
Add:
1) nodev parameter here means this directory can not be interpreted by devices or blocks
2) nosuid parameter here means no setuid files can be created in this directory
3) noexec parameter here means no files can be executed in this directory
4) x-systemd.requires-mounts-for=/var here parameter means /var/log directory can not be mounted until /var directory has been mounted
)