配置yum/dnf 源 nftables防火墙

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]

setenforce 0
systemctl stop firewalld
systemctl disable firewalld
yum install bash-completion
source /etc/profile
dnf install cockpit -y
systemctl start cockpit
netstat -lntup|grep 9090

浏览器访问 https://ip:9090

对开发者的工具支持,可以用原生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

随机文章