配置yum/dnf 源 nftables防火墙
目录
0.1 配置yum/dnf 源
CentOS 8 默认是会读取centos.org的mirrorlist的,所以一般来说是不需要配置镜像的。
cd /etc/yum.repos.d
#备份
cp CentOS-Base.repo CentOS-Base.repo.bak
cp CentOS-AppStream.repo CentOS-AppStream.repo.bak
cp CentOS-Extras.repo CentOS-Extras.repo.bak
---
vim /etc/yum.repos.d/CentOS-Base.repo
[BaseOS]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
---
vim /etc/yum.repos.d/CentOS-APPStream.repo
[AppStream]
name=CentOS-$releasever - AppStream
baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficia
---
vim /etc/yum.repos.d/CentOS-Extras.repo
[extras]
0.2 3.5 关闭selinux firewalld
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
0.3 3.6 安装tab补全插件
yum install bash-completion
source /etc/profile
0.4 3.7 最小化系统安装Cockpit Web控制台
dnf install cockpit -y
systemctl start cockpit
netstat -lntup|grep 9090
浏览器访问 https://ip:9090
0.5 3.8 常用软件包安装
对开发者的工具支持,可以用原生yum源安装了,不再需要通过第三方yum源。
@注意:CentOS8 严格区分pip2 和pip3,python2-pip和python3-pip
dnf install python3 php perl java-1.8.0 java-11 maven docker mysql-server mlocate lrzsz tree vim nc nmap wget bash-completion htop iotop iftop lsof net-tools sysstat unzip bc psmisc telnet-server -y