OpenSUSE安装后的基本操作

一、网络配置

   

1、配置IP,vi /etc/sysconfig/network/ifcfg-eth0

BOOTPROTO=static

IPADDR=192.168.100.100

NETMASK=255.255.255.0

NETWORK='192.168.100.0'

2、配置路由,vi /etc/sysconfig/network/routes

default 192.168.100.2

3、配置DNS,vi /etc/resolv.conf

nameserver 223.5.5.5

nameserver 223.6.6.6

   

4、修改主机名,vi /etc/hostsname,vi /etc/hosts

   

5、重启网卡,service network restart

二、切换软件安装源

zypper mr -da

zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/oss/ Aliyun-openSUSE-15.1-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.1/repo/non-oss/ Aliyun-openSUSE-15.1-Non-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/15.1/oss/ Aliyun-openSUSE-15.1-Update-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/15.1/non-oss/ Aliyun-openSUSE-15.1-Update-Non-Oss

zypper update

   

三、允许root用户远程ssh

   

1、配置SSHD服务,vi /etc/ssh/sshd_config

将#PasswordAuthentication no的注释去掉,并将no改为yes

将#PermitRootLogin yes的注释去掉

重新启动SSH服务service sshd restart

   

2、配置防火墙,vi /etc/sysconfig/SuSEfirewall2.d/services/sshd

添加:TCP="22"或者TCP="ssh"

四、设置用户自动登录

   

Yast2 → Security and User → User and Group Management → Expert Options → Login Settings

   

vi /etc/sysconfig/displaymanager

   

DISPLAYMANAGER_AUTOLOGIN="root"

上一篇:linux命令面试题-掌握这一篇就足够了


下一篇:C语言运行库翻译