3.5 服务管理与安全
小于 1 分钟
3.5 服务管理与安全
- systemd:
systemctl start/stop/restart/status/enable/disable 服务 - 服务单元:
/usr/lib/systemd/system/*.service;journalctl -u 服务名查看服务日志 - SSH:
ssh 用户@主机、密钥认证(ssh-keygen+ssh-copy-id)、/etc/ssh/sshd_config(禁止 root 登录、改端口) - 防火墙:
firewall-cmd --permanent --add-port=8080/tcp+--reload;firewalldvsiptables - SELinux:
getenforce、setenforce 0(临时)、/etc/selinux/config永久;semanage fcontext放行文件上下文
