CentOS7 初始化设置

2025-04-08 14:59:40

1、一、添加账号[root@linuxprobe~]# useradd linuprobe[root@l足毂忍珩inuprobe ~]# passwd linuprobeChanging password for user linuprobe.New UNIX password:# set passwordRetype new UNIX password:# confirmpasswd: all authentication tokens updated successfully.[root@linuprobe ~]# exit

2、二、关闭防火墙2.1、[root@linuprobe ~]# systemctl status firewalld● firewalld.s髫潋啜缅ervice - 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 firewalldrm '/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 # 重启时配置生效

3、三、更新系统,添加源仓库[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

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢