Oracle Linux 自定义配置

针对新安装或新购买的 Oracle Linux 系统,可参考如下步骤完成系统加固或前期规范操作。本文以 Oracle Linux 8.9 为例

交付前期

1. 配置ip地址

cat /etc/sysconfig/network-scripts/ifcfg-ens160 
nmcli con reload
nmcli con up ens160
nmcli con sh
ip a show ens160

2. 替换为阿里云的yum源

cat /etc/resolv.conf | grep nameserver | grep "223.5.5.5" || echo "nameserver 223.5.5.5" >> /etc/resolv.conf
mv /etc/yum.repos.d/oracle-linux* /tmp/
curl -sL http://mirrors.aliyun.com/repo/Centos-8.repo -o /etc/yum.repos.d/CentOS-Base.repo
yum makecache

3. 安装基础软件

yum install -y wget lrzsz telnet zip unzip net-tools make chrony

4. 设置DNS及时区及时间同步

#.设置时区为上海
timedatectl set-timezone "Asia/Shanghai"
timedatectl status | grep Time

#.配置ntp时间同步
yum install -y chrony
systemctl start chronyd
systemctl enable chronyd
chronyc -a makestep
date
Copyright © www.sqlfans.cn 2021 - 2026 All Right Reserved更新时间: 2026-07-09 15:22:39

results matching ""

    No results matching ""