Centos 7.X 初始化配置
来源:互联网 发布:windows下载单机游戏 编辑:程序博客网 时间:2024/06/04 20:06
因为平时经常需要使用的是centos 7最小化安装,所以这里记录下在安装之后的初始配置
1、配置网络
修改配置文件:vi /etc/sysconfig/network-scrips/ifcfg-ens33
(需要查看自己的网关进行配置)
BOOTPROTO=noneDEVICE=ens33ONBOOT=yesIPADDR=192.168.1.3PREFIX=24GATEWAY=192.168.1.2
修改dns解析文件:
vi /etc/resolv.confnameserver 8.8.8.8
安装网络工具:yum insatll net-tools
重启网络:service network restart
然后通过:ifconfig 查看网络配置成功
2、配置源
yum install wget vim -y
配置网易源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
配置阿里云:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
生成缓存:
yum makecache
3、安装yum的优先级插件
yum install yum-plugin-priorities -y
4、关闭 SELinux 和 防火墙
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinuxsetenforce 0
查看SELinux状态:sestatus
关闭防火墙:
systemctl status firewalldsystemctl stop firewalldsystemctl disable firewalldsystemctl status firewalldfirewall-cmd --state
5、epel源
yum install epel-release
查看repo情况:
yum repolist
6、同步时间
yum install ntpsystemctl enable ntpd.servicesystemctl start ntpd.service
手工同步时间
ntpdate 0.centos.pool.ntp.org
7、修改主机名 域名解析
8、重启主机 reboot
阅读全文
1 0
- Centos 7.X 初始化配置
- CentOS 7.x安装配置
- Centos初始化配置
- centos 6.x 初始化配置,静态IP配置,IPV6禁止等
- CentOS 7.x NAT模式上网配置
- centOS-7.x如何配置ipv6
- CentOS 7.X配置连接网络
- CentOS 7.X 配置mongoDB(阿里)
- CentOs预装pg初始化配置
- centos系统服务配置初始化
- CentOS 6.X 系统初始化脚本
- CentOS 5.x 系统安全配置
- CentOS 5.x 系统安全配置
- CentOS 5.x 系统安全配置
- centos 6.x sftp配置
- CentOS 6.X Denyhosts配置
- CentOS 6.x安装配置
- CentOS 6.X网络配置
- css文本超出长度用省略号显示
- Linux CAN总线驱动与canutils
- sqlserver游标的使用示例
- HttpContext.Curent.Session未将对象应用到对象的实例
- 创建node.js项目
- Centos 7.X 初始化配置
- React Native 加载图片的正确姿势和遇到的一些幺蛾子
- Java web 开发之路
- python中re.sub的使用 正则表达式
- Mangos源码分析(13):再谈登录服的实现
- 使用ShareSdk进行第三方登录和分享(过程比较详细)
- maven修改本地仓库,远程仓库与中央仓库
- Go-Ethereum 1.7.2 结合 Mist 0.9.2 实现代币智能合约的实例
- html编码规范