王乃俞的个人博客 - psystemctl
type: channel
link: https://www.naiyu.club/tag/psystemctl/
items: 脚本 | CentOS7一键配置yum源、永久关闭防火墙及SELinux等

脚本 | CentOS7一键配置yum源、永久关闭防火墙及SELinux等
type: item
date: 2022-02-27T18:38:00+08:00
description: #!/bin/bash yum install -y wget vim 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.aliyun.com/repo/Centos-7.repo yum install -y epel-release yum clean all yum makecache fast echo "1" > /proc/sys/net/ipv4/ip_forward sysctl -p systemctl disable firewalld sed -i 's/enforcing/disabled/' /etc/selinux/config yum install -y ntp timedatectl set-timezone Asia/Shanghai sed -i 's/0.centos.pool.ntp.org/ntp1.aliyun.com/g' /etc/ntp.conf systemctl enable ntpd yum install bash-completion -y yum update -y && yum upgrade -y reboot