Centos7

Centos7源镜像修改

# Insatll wget
yum install -y wget
# Backup repo;
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# clean session
yum clean all
yum makecache
# 注:centos 源地址有很多,自己更换源地址大部分都更换阿里云源地址
# ISRC镜像站:https://mirror.iscas.ac.cn/mirror/centos.html

Centos7 Firewalld and SElinux

#stop firewalld
systemctl stop firewalld
systemctl disable firewalld
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
reboot
sestatus
#firewalld
https://zhuanlan.zhihu.com/p/165602516 转载知乎 “一起玩转Linux”,侵权删

network

#安装硬件服务器 网卡配置
cat /etc/sysconfig/network-scripts/ifcfg-p8p1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=p8p1
DEVICE=p8p1
ONBOOT=yes
IPADDR=10.15.8.25
PREFIX=25
GATEWAY=10.15.8.129
DNS1=10.15.3.12
DNS2=8.8.8.8

常用命令安装

yum install -y vim ntpdate tree net-tools

// 根据使用程度不断更新

posted on 2021-04-01 18:15  浩元  阅读(115)  评论(0编辑  收藏  举报