CentOS7 初始化设置

 时间:2026-02-15 21:34:27

1、一、添加账号

[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 

2、二、关闭防火墙

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  # 重启时配置生效

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

  • java怎么进行数据转化
  • 如何使用Vue.js中的指令绑定多个样式类属性
  • ubuntu下安装拼音及五笔输入法
  • 如何使用d3js中的map并获取map中的元素值
  • win10系统,怎么安装Web管理控制台和工具?
  • 热门搜索
    肃怎么读 罗非鱼怎么做 中暑了怎么办 职业目标怎么写 美度手表怎么样 王鹤棣怎么读 早射怎么办 excel怎么排序 玉兰油护肤品怎么样 酸奶怎么做