ip+ssh+yum+firewall+域名解析

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static
IPADDR=1.1.1.112
NETMASK=255.255.255.0
GATEWAY=1.1.1.2
NAME=eno16777736
DEVICE=eno16777736
ONBOOT=yes
systemctl restart network.service

###############################################################

vim /etc/ssh/sshd_config
需要修改下面两处地方然后再重启。

默认为no,需要开启root用户访问改为yes

PermitRootLogin yes

默认为no,改为yes开启密码登陆

PasswordAuthentication yes
重启ssh服务:
systemctl restart sshd.service

###############################################################

//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld

###############################################################

vi /etc/yum.repo/centos.repo
[centos]
name=centos
baseurl=file:///mnt
gpgcheck=0
enabled=1

mount /dev/cdrom /mnt
yum list

yum reportlist

yum clean all
yum makecache


redhat 8.10 yum配置方法:
[LocalRepo_BaseOS]
name=LocalRepo_BaseOS
baseurl=file:///mnt/BaseOS/
enabled=1
gpgcheck=0

[LocalRepo_APPStream]
name=LocalRepo_AppStream
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0

#################################################################
vi /etc/resolv.conf
nameserver 192.168.16.2

修改主机名:
hostnamectl set-hostname mysql

posted @ 2025-03-21 15:16  ocmji  阅读(41)  评论(0)    收藏  举报