centos7 常见配置
Centos reset hostname 修改/etc/hostname文件,将包含当前的hostname改为新的hostname。 关闭Selinux 查看SELinux状态: /usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态 SELinux status: enabled getenforce ##也可以用这个命令检查 关闭SELinux: #临时关闭(不用重启机器):setenforce 0 #设置SELinux 成为permissive模式 #setenforce 1 设置SELinux 成为enforcing模式 修改配置文件需要重启机器: #修改/etc/selinux/config 文件 将SELINUX=enforcing改为SELINUX=disabled 重启机器即可 Centos 设置普通用户有使用sudo权限 ,且不再需要密码 最简单的创建用户 useradd test passwd test 配置/etc/sudoers sudo vi /etc/sudoers ## Allow root to run any commands anywhere root ALL=(ALL) ALL yc ALL=(ALL) ALL /*允许yc用sudo*/ ## Allows members of