SUSE15 vmware网络配置 本地ISO镜像 软件安装 SSH连接

suse这个系统,对于刚接触的用户,是非常不友好的。

新安装的suse15sp1,没有vi,ifconfig等命令。

第一步:VMWARE中设置或添加CD/DVD ,选择本地的iso文件(PACKAGE安装包镜像)

第二步:blkid -o list

可以看到有光驱资源

如果第一步中不想加载,也可以将文件拷贝到linux系统中进行设置。

mount -o loop /root/my_file/SLE-12-SP5-Server-DVD-x86_64-GM-DVD1.iso /mnt/iso1

设置为本地的zypper源:

mkdir /mnt/cdrom_sr0

mount  -o loop /dev/sr0 /mnt/cdrom_sr0

配置本地repo

zypper ar file:///mnt/cdrom_sr0 local-sles

验证是否配置好了:

zypper lr

接下来可以安装VIM以及其它的工具

zypper install vim

如果zypper lr 结果列表中第一行存在如下这样的:

linux-2yas:~ # zypper lr
# | Alias                                            | Name                                             | Enabled | Refresh
--+--------------------------------------------------+--------------------------------------------------+---------+--------
1 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | Yes     | No     
2 | local-dvd                                        | local-dvd                                        | Yes  

那么zypper install vim时,可能还是从上面这个找,然后示要插入SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109

提示内容:

Retrieving package libneon27-0.29.6-6.7.1.x86_64 (1/20), 152.0 KiB (489.0 KiB unpacked)
Failed to mount cd:///?devices=/dev/sr1,/dev/sr0 on /var/adm/mount/AP_0xrvRxb8: Mounting media failed (mount: no medium found on /dev/sr0)

Please insert medium [SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109] #1 and type 'y' to continue or 'n' to cancel the operation. [yes/no] (no):

此时要做的,是将第一行删除。

zypper rs SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109  

上面一行命令因为没有注意到名称中有空格,操作会分为两个部分了。会提示:

linux-2yas:~ # zypper rs SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 
Service 'SUSE-Linux-Enterprise-Server-11-SP4' not found by alias, number or URI.
Service '11.4.4-1.109' not found by alias, number or URI.

正确命令:

zypper rs SUSE-Linux-Enterprise-Server-11-SP4\ 11.4.4-1.109

ssh连接不上时的解决方法:

首先配置网络。

vmware将网卡设置为nat网络

在系统中 vim /etc/sysconfig/network/ifcfg-eth0

BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.40.172'
MTU=''
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
DHCLIENT_SET_DEFAULT_ROUTE='yes'

就修改了三处:BOOTPROTO='static'  和 IPADDR='192.168.40.172' 以及 NETMASK='255.255.255.0'

然后service network restart

关闭防火墙:

systemctl stop firewalld

修改sshd_config文件,命令为:vi /etc/ssh/sshd_config 
         将#PasswordAuthentication no的注释去掉并改为PasswordAuthentication  Yes

         需要使用ROOT账户SSH登录:  PermitRootLogin  no修改为PermitRootLogin  yes 

service sshd restart

至此解决SSH连接问题。

附: SUSE10SP2等老版本的SUSE系统软件源挂载

    zypper sa file:///mnt/dvd1 local-dvd1
    zypper sa file:///mnt/dvd2 local-dvd2
    zypper sa file:///mnt/dvd3 local-dvd3

查看资源设备:
    zypper sl

SUSE10SP2安装 fuse-devel库

suse10sp2:/home/CompileSrcGit/native/os_public/App/i2fuse # zypper install fuse-devel
Restoring system sources...
Parsing metadata for local-dvd3...
Parsing metadata for local-dvd1...
Parsing metadata for local-dvd2...
Parsing metadata for SUSE Linux Enterprise Server 10 SP2...
Parsing RPM database...
1 Problems:
Problem: fuse-devel-2.7.2-15.3.x86_64[local-dvd2] cannot be installed due to missing dependencies

Problem: fuse-devel-2.7.2-15.3.x86_64[local-dvd2] cannot be installed due to missing dependencies
 There are no installable providers of libfuse2 == 2.7.2 for fuse-devel-2.7.2-15.3.x86_64[local-dvd2]
 Solution 1: do not install fuse-devel
  do not install fuse-devel-2.7.2-15.3.x86_64[local-dvd2]
 Solution 2: Ignore this requirement just here
number, (r)etry or (c)ancel> 2
Applying solution 2
Summary:
<install>   [S3:1][package]fuse-2.7.2-15.3.x86_64
<install>   [S3:1][package]fuse-devel-2.7.2-15.3.x86_64
Continue? [y/n]: y
Downloading: [S3:1][package]fuse-2.7.2-15.3.x86_64, 63.8 K(188.1 K unpacked)
Installing: [S3:1][package]fuse-2.7.2-15.3.x86_64
Downloading: [S3:1][package]fuse-devel-2.7.2-15.3.x86_64, 72.6 K(295.8 K unpacked)
Installing: [S3:1][package]fuse-devel-2.7.2-15.3.x86_64
[S3:1][package]fuse-devel-2.7.2-15.3.x86_64 Subprocess failed. Error: RPM failed: error: Failed dependencies:
        libfuse2 = 2.7.2 is needed by fuse-devel-2.7.2-15.3.x86_64


Invalid object
Invalid object
Installing: [S3:1][package]fuse-devel-2.7.2-15.3.x86_64

附:SUSE15SP2作为最新的SUSE标准系统,配置和老的SUSE有区别

suse15sp2的本地ISO镜像作为源的配置:

suse15sp2:~ # find /mnt/dvd1/ -name git-core*
/mnt/dvd1/Module-Basesystem/x86_64/git-core-2.26.2-3.28.2.x86_64.rpm

执行如下添加,我这只添加/mnt/dvd1 ,zypper install时无法找到相应的包。

zypper ar file:///mnt/dvd1/Module-Basesystem/ local-dvd1
 

附suse15sp3中iso配置:

zypper ar file:///mnt/dvd1/Module-Basesystem Module-Basesystem

zypper ar file:///mnt/dvd1/Module-CAP-Tools Module-CAP-Tools

zypper ar file:///mnt/dvd1/Module-Containers Module-Containers

zypper ar file:///mnt/dvd1/Module-Development-Tools Module-Development-Tools

其它的Module用不上就没配了,配置完后zypper update

=======================2023-08-28新增=======================

suse15sp4添加ISO源

localhost:~ # find /mnt/dvd1/ -name rzsz* 
/mnt/dvd1/Module-Basesystem/x86_64/rzsz-0.12.21~rc-1.8.x86_64.rpm

查看到是在/mnt/dvd1/Module-Basesystem中,因此执行

zypper ar file:///mnt/dvd1/Module-Basesystem/ local-dvd2

zypper refresh

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值