首页 > 系统服务 > 详细

linux模板机配置

时间:2021-04-07 09:26:51      阅读:38      评论:0      收藏:0      [点我收藏+]

1、设置主机名称:

hostnamectl set-hostname centost7

su

2、更改ip获取方式为静态设置以及绑定主机名+ip到 /etc/hosts

vi /etc/sysconfig/network-scripts/ipcfg-ens33

TYPE="Ethernet"
BOOTPROTO="none"
IPADDR=10.1.1.10
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=119.29.29.29
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"

vi /etc/hosts

10.1.1.10 centos7

systemctl restart network

3、关闭防火墙和selinux

systemctl stop firewalld

systemctl disable firewalld

setenforce 0

vi /etc/selinux/config

SELINUX=disabled

4、配置公网yum源(推荐腾讯云)

百度:腾讯镜像站
https://mirrors.cloud.tencent.com/
找到 centos 点击查看
下载wget:

yum install wget -y

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo

yum clean all

yum makecache

5、安装扩展软件(自动补全、vin编辑器、net-tools网络工具包以及ntpdate时间同步工具)

yum install bash-completion vim net-tools ntpdate -y

同步时间

ntpdate 120.25.108.11

linux模板机配置

原文:https://www.cnblogs.com/public-communion/p/14624636.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!