CentOS7 初始化设置
CentOS7安装完成后进行初始化设置
操作方法
- 01
一、添加账号 [root@linuxprobe~]# useradd linuprobe [root@linuprobe ~]# passwd linuprobe Changing password for user linuprobe. New UNIX password:# set password Retype new UNIX password:# confirm passwd: all authentication tokens updated successfully. [root@linuprobe ~]# exit
- 02
二、关闭防火墙 2.1、 [root@linuprobe ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2017-08-18 13:41:55 CST; 3 weeks 0 days ago Docs: man:firewalld(1) Main PID: 865 (firewalld) Memory: 236.0K CGroup: /system.slice/firewalld.service └─865 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid ..... [root@linuprobe ~]# systemctl stop firewalld # 停止 [root@linuprobe ~]# systemctl disable firewalld rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service' rm '/etc/systemd/system/basic.target.wants/firewalld.service'/ 2.2、关闭SELinux [root@linuprobe ~]# vi /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # change to disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted [root@linuprobe ~]# reboot # 重启时配置生效
- 03
三、更新系统,添加源仓库 [root@linuprobe ~]# yum -y update [root@linuprobe ~]# yum -y install yum-plugin-priorities [root@linuprobe ~]# yum -y install epel-release [root@linuprobe ~]# yum -y install centos-release-scl-rh centos-release-scl