配置yum/dnf 源 nftables防火墙

配置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]

3.5 关闭selinux firewalld

setenforce 0
systemctl stop firewalld
systemctl disable firewalld

3.6 安装tab补全插件

yum install bash-completion
source /etc/profile

3.7 最小化系统安装Cockpit Web控制台

dnf install cockpit -y
systemctl start cockpit
netstat -lntup|grep 9090

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

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

赞(2) 打赏
特别声明:除特殊标注,本站文章均为原创,遵循CC BY-NC 3.0,转载请注明出处。三伏磨 » 配置yum/dnf 源 nftables防火墙

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏