Java教程

OpenSUSE安装后的基本操作

本文主要是介绍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"

这篇关于OpenSUSE安装后的基本操作的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!