CentOS 7 系统基础配置

系统版本:CentOS 7.2.1511 Minimal

采用最小化系统安装,许多组件默认是不安装的,通过手工安装一些常用工具包,让系统用起来更顺手。

1、修改机器名:

[root@centos7-minimal /]# hostnamectl set-hostname nginx

2、修改Hosts文件:

[root@nginx /]# sed -i '$a 192.168.1.139   nginx' /etc/hosts

3、关闭SELinux:

[root@nginx /]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

以上设置需要重启系统后方可生效:

[root@nginx /]# reboot

4、停止Firewalld防火墙:

[root@nginx /]# systemctl stop firewalld
[root@nginx /]# systemctl disable firewalld

5、安装iptables防火墙:

[root@nginx /]# yum -y install iptables iptables-services iptables-devel iptables-utils

6、启动iptables防火墙服务:

[root@nginx /]# systemctl start iptables.service
[root@nginx /]# systemctl enable iptables.service

7、查看iptables服务的状态:

[root@nginx /]# systemctl list-unit-files | grep "iptables"
iptables.service                            enabled

8、安装EPEL源:

[root@nginx /]# yum -y install epel-release
[root@nginx /]# yum clean all
[root@nginx /]# yum makecache

9、安装常用软件:

[root@nginx /]# yum -y install vim tree xz unzip wegt git curl telnet ntpdate lshw htop iftop

10、安装编译源码所需的软件包:

[root@nginx /]# yum -y install gcc gcc-c++ autoconf automake

至此系统维护所需要的基础软件包安装完毕。

[THE END]

猜你喜欢

转载自www.cnblogs.com/configure/p/9317364.html