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 lrzsz telnet ntpdate lshw htop iftop

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

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

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

[THE END]

 

转载于:https://www.cnblogs.com/configure/p/9317364.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值