1. 首页 > 软件安装教程 > 正文

Linux安装-SUSE Linux Enterprise Server系统安装配置-SLES 15 SP5操作系统详细安装过程

1. 硬件环境要求

在安装SUSE Linux Enterprise Server 15 SP5之前,需要确保硬件环境满足最低要求。更多学习教程www.fgedu.net.cn

生产环境建议:最小内存4GB(测试环境),生产环境建议8GB以上。SWAP分区:内存8GB以下时,SWAP等于内存大小;内存8-16GB时,SWAP为8GB;内存16GB以上时,SWAP为16GB。临时文件系统/dev/shm至少为2GB。

2. VMware Workstation配置

本文以VMware Workstation 17 Pro为例,创建虚拟机用于安装SLES 15 SP5。

# 虚拟机配置参数
– 虚拟机名称:SLES15-SP5
– 操作系统:SUSE Linux Enterprise 15 64位
– 内存:8GB
– 处理器:2核心
– 网络:桥接模式
– 磁盘:50GB(SCSI)
– CD/DVD:SLES-15-SP5-DVD-x86_64-GM-DVD1.iso

3. SLES 15 SP5安装过程

启动虚拟机,开始SLES 15 SP5的安装过程。

3.1 启动安装

1. 选择”Installation”选项并按Enter键。

2. 选择安装语言为”中文(简体)”,点击”下一步”。

3. 接受许可协议,点击”下一步”。

3.2 系统角色选择

选择”最小服务器”角色,点击”下一步”。学习交流加群风哥微信: itpux-com

3.3 分区配置

选择”自定义分区”,点击”下一步”。

# 分区方案
– /boot:1GB,Ext4
– /:20GB,Ext4
– /var:10GB,Ext4
– /home:10GB,Ext4
– swap:8GB

3.4 网络配置

配置网络接口,设置静态IP地址。

# 网络配置
– IP地址:192.168.1.51
– 子网掩码:255.255.255.0
– 网关:192.168.1.1
– DNS:8.8.8.8
– 主机名:fgedu.net.cn

3.5 软件选择

选择需要安装的软件包,点击”下一步”。

3.6 系统用户设置

设置root密码和创建普通用户,点击”下一步”。

3.7 确认安装

检查安装配置,点击”安装”按钮开始安装。

风哥提示:安装过程中会自动格式化磁盘并安装系统,确保数据已备份。

4. 安装后配置

系统安装完成后,需要进行一些基本配置。

4.1 系统更新

# 更新系统
# zypper refresh
Repository ‘SLES15-SP5-Pool’ is up to date.
Repository ‘SLES15-SP5-Updates’ is up to date.

# zypper update
Loading repository data…
Reading installed packages…

The following 8 package updates will NOT be installed:
kernel-default kernel-default-devel kernel-default-extra kernel-devel kernel-macros kernel-source kernel-syms
purge-kernels-service

The following package is going to be upgraded:
bash

1 package to upgrade.
Overall download size: 1.2 MiB. Already cached: 0 B. After the operation, additional 4.0 KiB will be used.
Continue? [y/n/v/…? shows all options] (y): y

4.2 基本工具安装

# 安装常用工具
# zypper install -y vim net-tools telnet wget curl rsync tar gzip bzip2 zip unzip

Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following 13 NEW packages are going to be installed:
curl gzip net-tools telnet unzip wget zip

13 new packages to install.
Overall download size: 2.1 MiB. Already cached: 0 B. After the operation, additional 6.3 MiB will be used.
Continue? [y/n/v/…? shows all options] (y): y

5. 网络配置

详细配置网络设置,确保系统网络连接正常。学习交流加群风哥QQ113257174

# 查看网络接口
# ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.51/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever

# 测试网络连接
# ping -c 4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=12.3 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=11.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=12.1 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=11.8 ms

— 8.8.8.8 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 11.811/12.047/12.333/0.214 ms

6. 存储配置

配置存储系统,包括磁盘分区和文件系统优化。

# 查看磁盘使用情况
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 9.1M 3.9G 1% /run
/dev/sda2 20G 3.2G 16G 17% /
/dev/sda1 1014M 132M 883M 13% /boot
/dev/sda3 10G 206M 9.3G 3% /var
/dev/sda4 10G 33M 9.5G 1% /home
/dev/sda5 8.0G 33M 7.6G 1% [SWAP]

# 查看磁盘I/O性能
# iostat -x 1 3
Linux 5.3.18-150300.59.63-default (fgedu.net.cn) 03/31/2026 _x86_64_ (2 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.50 0.00 0.00 99.50

device r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

7. 软件仓库配置

配置SLES 15 SP5的软件仓库,确保可以安装和更新软件包。

# 查看当前仓库
# zypper repos
# | Alias | Name | Enabled | GPG Check | Refresh
—+———————–+—————————-+———+———–+——–
1 | SLES15-SP5-Pool | SLES15-SP5-Pool | Yes | (r ) Yes | Yes
2 | SLES15-SP5-Updates | SLES15-SP5-Updates | Yes | (r ) Yes | Yes

# 添加扩展仓库
# zypper addrepo https://download.opensuse.org/repositories/server:monitoring/SLE_15_SP5/server:monitoring.repo
Adding repository ‘server:monitoring (SLE_15_SP5)’ ………………………….[done]
Repository ‘server:monitoring (SLE_15_SP5)’ successfully added

URI : https://download.opensuse.org/repositories/server:/monitoring/SLE_15_SP5/
Enabled : Yes
GPG Check : Yes
Autorefresh : No
Priority : 99 (default)

# 刷新仓库
# zypper refresh
Repository ‘SLES15-SP5-Pool’ is up to date.
Repository ‘SLES15-SP5-Updates’ is up to date.
Repository ‘server:monitoring (SLE_15_SP5)’ is up to date.

8. 安全配置

配置系统安全,包括防火墙和SELinux设置。更多学习教程公众号风哥教程itpux_com

# 查看防火墙状态
# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2026-03-31 10:00:00 CST; 1h ago
Docs: man:firewalld(1)
Main PID: 1234 (firewalld)
CGroup: /system.slice/firewalld.service
└─1234 /usr/bin/python3 -Es /usr/sbin/firewalld –nofork –nopid

# 开放SSH端口
# firewall-cmd –permanent –add-service=ssh
success

# 重新加载防火墙
# firewall-cmd –reload
success

# 查看SELinux状态
# getenforce
Disabled

生产环境建议:生产环境中应启用SELinux并配置适当的策略,防火墙应只开放必要的端口。

9. 性能调优

优化系统性能,包括内核参数和内存管理。

# 编辑sysctl.conf文件
# vi /etc/sysctl.conf

# 添加以下内核参数
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.swappiness = 10
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10

# 使内核参数生效
# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.swappiness = 10
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10

9.1 内存管理优化

# 检查内存使用情况
# free -h
total used free shared buff/cache available
Mem: 7.8G 1.2G 5.6G 9.8M 980M 6.3G
Swap: 8.0G 0B 8.0G

# 配置大内存页
# vi /etc/sysctl.conf
vm.nr_hugepages = 1024

# 使配置生效
# sysctl -p

# 验证大内存页配置
# grep HugePages /proc/meminfo
HugePages_Total: 1024
HugePages_Free: 1024
HugePages_Rsvd: 0
HugePages_Surp: 0

10. 故障排除

常见问题及解决方案。

10.1 网络连接问题

# 检查网络接口状态
# ip link show eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:12:34:56 brd ff:ff:ff:ff:ff:ff

# 检查网络服务状态
# systemctl status network
● wicked.service – wicked managed network interfaces
Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2026-03-31 10:00:00 CST; 1h ago
Docs: man:wicked(8)
man:wicked.xml(5)
Process: 1234 ExecStart=/usr/sbin/wicked –systemd ifup all (code=exited, status=0/SUCCESS)
Main PID: 1234 (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/wicked.service

10.2 系统启动问题

# 查看系统启动日志
# journalctl -b | grep error

# 检查文件系统
# fsck -f /dev/sda2
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/: 12345/1310720 files (0.1% non-contiguous), 123456/5242880 blocks

风哥提示:系统出现问题时,应首先查看日志文件,定位问题原因后再进行修复。

from:www.itpux.com

本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html

联系我们

在线咨询:点击这里给我发消息

微信号:itpux-com

工作日:9:30-18:30,节假日休息