1. 麒麟系统概述
银河麒麟操作系统是国产自主可控的操作系统,基于Linux内核开发,支持多种CPU架构。更多学习教程www.fgedu.net.cn
# cat /etc/os-release
NAME=”Kylin Linux Advanced Server”
VERSION=”V10 (Tercel)”
ID=”kylin”
VERSION_ID=”V10″
PRETTY_NAME=”Kylin Linux Advanced Server V10 (Tercel)”
ANSI_COLOR=”0;31″
HOME_URL=”http://www.kylinos.cn”
SUPPORT_URL=”http://www.kylinos.cn/support”
BUG_REPORT_URL=”http://www.kylinos.cn/support”
# 查看内核版本
# uname -r
4.19.90-24.4.v2101.ky10.x86_64
# 查看系统信息
# cat /etc/kylin-release
Kylin Linux Advanced Server release V10 (Tercel)
# 查看CPU架构
# uname -m
x86_64
# 查看系统位数
# getconf LONG_BIT
64
# 查看系统授权信息
# cat /etc/.kyinfo
[Runtime]
License=Production
Version=V10
Arch=x86_64
InstallTime=2026-04-01 10:00:00
2. 系统安装配置
麒麟系统安装支持图形化和命令行两种方式。学习交流加群风哥微信: itpux-com
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 100G 0 part /
├─sda4 8:4 0 50G 0 part /home
├─sda5 8:5 0 50G 0 part /var
├─sda6 8:6 0 50G 0 part /tmp
└─sda7 8:7 0 248G 0 part /data
# 查看文件系统
# df -hT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 32G 0 32G 0% /dev
tmpfs tmpfs 32G 0 32G 0% /dev/shm
tmpfs tmpfs 32G 8.5M 32G 1% /run
tmpfs tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/sda3 ext4 100G 5.0G 95G 5% /
/dev/sda2 ext4 1014M 150M 865M 15% /boot
/dev/sda1 vfat 1022M 6.1M 1016M 1% /boot/efi
/dev/sda4 ext4 50G 1.0G 49G 2% /home
/dev/sda5 ext4 50G 2.0G 48G 4% /var
/dev/sda6 ext4 50G 50M 50G 1% /tmp
/dev/sda7 ext4 248G 20G 229G 8% /data
# 配置fgedu.net.cn
# hostnamectl set-hostname fgedu-kylin01.fgedu.net.cn
# 查看fgedu.net.cn
# hostnamectl
Static hostname: fgedu-kylin01.fgedu.net.cn
Icon name: computer-server
Chassis: server
Machine ID: abc123def456
Boot ID: ghi789jkl012
Operating System: Kylin Linux Advanced Server V10 (Tercel)
CPE OS Name: cpe:/o:kylin:kylin_linux_advanced_server_v10
Kernel: Linux 4.19.90-24.4.v2101.ky10.x86_64
Architecture: x86-64
# 配置时区
# timedatectl set-timezone Asia/Shanghai
# 查看时区
# timedatectl
Local time: Fri 2026-04-03 10:00:00 CST
Universal time: Fri 2026-04-03 02:00:00 UTC
RTC time: Fri 2026-04-03 02:00:00
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
3. 用户权限管理
麒麟系统支持多种用户权限管理方式,包括本地用户和域用户。
# useradd -m -s /bin/bash fgedu_user
# 设置用户密码
# passwd fgedu_user
Changing password for user fgedu_user.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
# 创建用户组
# groupadd fgedu_group
# 将用户加入组
# usermod -aG fgedu_group fgedu_user
# 查看用户信息
# id fgedu_user
uid=1001(fgedu_user) gid=1001(fgedu_user) groups=1001(fgedu_user),1002(fgedu_group)
# 配置sudo权限
# cat /etc/sudoers.d/fgedu
fgedu_user ALL=(ALL) NOPASSWD: ALL
# 查看登录用户
# w
10:00:00 up 2 days, 5:30, 3 users, load average: 0.10, 0.05, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.1.10 09:00 0.00s 0.05s 0.00s w
fgedu_us pts/1 192.168.1.20 09:30 5:00 0.02s 0.02s -bash
# 查看用户历史命令
# cat ~/.bash_history | tail -20
systemctl status nginx
systemctl restart nginx
tail -f /var/log/nginx/access.log
vi /etc/nginx/nginx.conf
# 配置密码策略
# cat /etc/security/pwquality.conf
minlen = 12
minclass = 4
maxrepeat = 3
maxclassrepeat = 3
lcredit = -1
ucredit = -1
dcredit = -1
ocredit = -1
# 配置登录失败锁定
# cat /etc/pam.d/password-auth
auth required pam_env.so
auth required pam_faillock.so preauth audit deny=5 unlock_time=900
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_faillock.so authfail audit deny=5 unlock_time=900
auth required pam_deny.so
# 查看登录失败记录
# faillock –user fgedu_user
fgedu_user:
When Type Source Valid
2026-04-03 09:55:00 R 192.168.1.100 V
4. 网络配置管理
网络配置包括IP地址、DNS、防火墙等设置。学习交流加群风哥QQ113257174
# ip addr show
1: lo:
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
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0:
link/ether 00:50:56:ab:cd:ef brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:feab:cdef/64 scope link
valid_lft forever preferred_lft forever
# 配置静态IP
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=static
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.2
DNS2=192.168.1.3
# 重启网络服务
# systemctl restart network
# 配置DNS
# cat /etc/resolv.conf
nameserver 192.168.1.2
nameserver 192.168.1.3
search fgedu.net.cn
# 查看路由表
# ip route show
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100
# 添加静态路由
# ip route add 10.0.0.0/8 via 192.168.1.254 dev eth0
# 持久化路由配置
# cat /etc/sysconfig/network-scripts/route-eth0
10.0.0.0/8 via 192.168.1.254 dev eth0
# 查看网络连接
# ss -tuln
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:123 0.0.0.0:*
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
tcp LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
tcp LISTEN 0 128 0.0.0.0:443 0.0.0.0:*
# systemctl start firewalld
# systemctl enable firewalld
# 查看防火墙状态
# firewall-cmd –state
running
# 开放端口
# firewall-cmd –permanent –add-port=80/tcp
# firewall-cmd –permanent –add-port=443/tcp
# firewall-cmd –permanent –add-port=8080/tcp
# 开放服务
# firewall-cmd –permanent –add-service=ssh
# firewall-cmd –permanent –add-service=http
# firewall-cmd –permanent –add-service=https
# 重新加载配置
# firewall-cmd –reload
success
# 查看开放的端口
# firewall-cmd –list-ports
80/tcp 443/tcp 8080/tcp
# 查看开放的服务
# firewall-cmd –list-services
ssh dhcpv6-client http https
# 配置富规则
# firewall-cmd –permanent –add-rich-rule=’rule family=”ipv4″ source address=”192.168.1.0/24″ port protocol=”tcp” port=”22″ accept’
# firewall-cmd –reload
# 配置NAT转发
# firewall-cmd –permanent –add-masquerade
# firewall-cmd –permanent –add-forward-port=port=80:proto=tcp:toport=8080:toaddr=192.168.1.200
# firewall-cmd –reload
5. 存储管理
存储管理包括磁盘分区、LVM、文件系统等。更多学习教程公众号风哥教程itpux_com
# fdisk -l
Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: ABC12345-DEF6-7890-GHIJ-KLMNOPQRSTUV
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G EFI System
/dev/sda2 2099200 4196351 2097152 1G Linux filesystem
/dev/sda3 4196352 214958079 210761728 100G Linux filesystem
/dev/sda4 214958080 319819775 104861696 50G Linux filesystem
/dev/sda5 319819776 424681471 104861696 50G Linux filesystem
# 创建LVM
# pvcreate /dev/sdb
Physical volume “/dev/sdb” successfully created.
# vgcreate vg_data /dev/sdb
Volume group “vg_data” successfully created
# lvcreate -L 100G -n lv_app vg_data
Logical volume “lv_app” created.
# 创建文件系统
# mkfs.xfs /dev/vg_data/lv_app
meta-data=/dev/vg_data/lv_app isize=512 agcount=4, agsize=6553600 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=26214400, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
# 挂载文件系统
# mkdir /app
# mount /dev/vg_data/lv_app /app
# 配置自动挂载
# cat /etc/fstab
/dev/mapper/vg_data-lv_app /app xfs defaults 0 0
# 扩展LVM
# lvextend -L +50G /dev/vg_data/lv_app
Size of logical volume vg_data/lv_app changed from 100.00 GiB to 150.00 GiB.
Logical volume vg_data/lv_app successfully resized.
# 扩展文件系统
# xfs_growfs /app
meta-data=/dev/mapper/vg_data-lv_app isize=512 agcount=4, agsize=6553600 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=26214400, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 26214400 to 39321600
6. 软件包管理
麒麟系统使用rpm和yum进行软件包管理。author:www.itpux.com
# cat /etc/yum.repos.d/kylin.repo
[Kylin-BaseOS]
name=Kylin Linux Advanced Server – BaseOS
baseurl=https://update.kylinos.cn/KY10/V10/BaseOS/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin
[Kylin-AppStream]
name=Kylin Linux Advanced Server – AppStream
baseurl=https://update.kylinos.cn/KY10/V10/AppStream/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin
# 更新软件源
# yum clean all
# yum makecache
# 查看可用软件包
# yum list available | head -20
# 安装软件包
# yum install -y nginx
Kylin Linux Advanced Server – BaseOS 1.2 MB/s | 3.4 kB 00:00
Kylin Linux Advanced Server – AppStream 1.5 MB/s | 4.5 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nginx x86_64 1:1.20.1-10.ky10 Kylin-AppStream 500 k
Installing dependencies:
nginx-filesystem
noarch 1:1.20.1-10.ky10 Kylin-AppStream 8.5 k
Transaction Summary
================================================================================
Install 2 Packages
Total download size: 509 k
Installed size: 1.5 M
Downloading Packages:
(1/2): nginx-filesystem-1.20.1-10.ky10.noarch.rpm 50 kB/s | 8.5 kB 00:00
(2/2): nginx-1.20.1-10.ky10.x86_64.rpm 5.0 MB/s | 500 kB 00:00
——————————————————————————–
Total 2.5 MB/s | 509 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : nginx-filesystem-1:1.20.1-10.ky10.noarch 1/2
Installing : nginx-1:1.20.1-10.ky10.x86_64 2/2
Verifying : nginx-filesystem-1:1.20.1-10.ky10.noarch 1/2
Verifying : nginx-1:1.20.1-10.ky10.x86_64 2/2
Installed:
nginx-1:1.20.1-10.ky10.x86_64 nginx-filesystem-1:1.20.1-10.ky10.noarch
Complete!
# 查看已安装软件
# rpm -qa | grep nginx
nginx-1.20.1-10.ky10.x86_64
nginx-filesystem-1.20.1-10.ky10.noarch
# 查看软件包信息
# rpm -qi nginx
Name : nginx
Epoch : 1
Version : 1.20.1
Release : 10.ky10
Architecture: x86_64
Install Date: Fri 03 Apr 2026 10:00:00 AM CST
Group : Unspecified
Size : 1677721
License : BSD
Signature : RSA/SHA256, Fri 01 Jan 2026 10:00:00 AM CST, Key ID abc123def456
Source RPM : nginx-1.20.1-10.ky10.src.rpm
Build Date : Fri 01 Jan 2026 10:00:00 AM CST
Build Host : build.kylinos.cn
Relocations : (not relocatable)
Vendor : Kylin
URL : https://nginx.org/
Summary : A high performance web server and reverse proxy server
Description :
Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and
IMAP protocols, with a strong focus on high concurrency, performance and low
memory usage.
# 卸载软件包
# yum remove -y nginx
7. 服务管理
麒麟系统使用systemd进行服务管理。
# systemctl status nginx
● nginx.service – The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2026-04-03 10:00:00 CST; 1h ago
Main PID: 12345 (nginx)
Tasks: 5 (limit: 49141)
Memory: 10.0M
CGroup: /system.slice/nginx.service
├─12345 nginx: master process /usr/sbin/nginx
├─12346 nginx: worker process
├─12347 nginx: worker process
├─12348 nginx: worker process
└─12349 nginx: worker process
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Starting The nginx HTTP and reverse proxy server…
Apr 03 10:00:00 fgedu-kylin01 nginx[12344]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Apr 03 10:00:00 fgedu-kylin01 nginx[12344]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Started The nginx HTTP and reverse proxy server.
# 启动服务
# systemctl start nginx
# 停止服务
# systemctl stop nginx
# 重启服务
# systemctl restart nginx
# 开机自启
# systemctl enable nginx
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.
# 禁用开机自启
# systemctl disable nginx
Removed /etc/systemd/system/multi-user.target.wants/nginx.service.
# 查看所有运行的服务
# systemctl list-units –type=service –state=running
UNIT LOAD ACTIVE SUB DESCRIPTION
auditd.service loaded active running Security Auditing Service
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
firewalld.service loaded active running firewalld – dynamic firewall daemon
NetworkManager.service loaded active running Network Manager
nginx.service loaded active running The nginx HTTP and reverse proxy server
polkit.service loaded active running Authorization Manager
rsyslog.service loaded active running System Logging Service
sshd.service loaded active running OpenSSH server daemon
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
systemd-udevd.service loaded active running udev Kernel Device Manager
# 创建自定义服务
# cat > /etc/systemd/system/fgedu-app.service << 'EOF'
[Unit]
Description=FGedu Application Service
After=network.target
[Service]
Type=simple
User=app
Group=app
ExecStart=/opt/app/bin/start.sh
ExecStop=/opt/app/bin/stop.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# systemctl daemon-reload
# systemctl enable fgedu-app
# systemctl start fgedu-app
8. 安全加固
安全加固确保系统安全可靠。
# getenforce
Enforcing
# 临时设置SELinux模式
# setenforce 0
# 永久配置
# cat /etc/selinux/config
SELINUX=enforcing
SELINUXTYPE=targeted
# 配置SSH安全
# cat /etc/ssh/sshd_config | grep -v “^#” | grep -v “^$”
Port 22
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
GSSAPIAuthentication no
UseDNS no
# systemctl restart sshd
# 配置审计
# yum install -y audit
# systemctl enable auditd
# systemctl start auditd
# 添加审计规则
# cat >> /etc/audit/rules.d/audit.rules << 'EOF'
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k sudoers
-w /var/log/secure -p wa -k logins
-a exit,always -F arch=b64 -S execve
EOF
# service auditd restart
# 查看审计日志
# ausearch -k identity | tail -10
----
time->Fri Apr 3 10:00:00 2026
type=PROCTITLE msg=audit(1712120400.123:456): proctitle=76696D2F6574632F706173737764
type=PATH msg=audit(1712120400.123:456): item=0 name=”/etc/passwd” inode=123456 dev=08:01 mode=0100644 ouid=0 ogid=0 rdev=00:00
type=CWD msg=audit(1712120400.123:456): cwd=”/root”
type=SYSCALL msg=audit(1712120400.123:456): arch=c000003e syscall=2 success=yes exit=3 a0=7ffc12345678 a1=0 a2=1b6 a3=0 items=1 ppid=1234 pid=5678 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=”vim” exe=”/usr/bin/vim” key=”identity”
# 安全扫描
# yum install -y openscap-scanner
# oscap xccdf eval –profile standard –report /tmp/scan-report.html /usr/share/xml/scap/ssg/content/ssg-kylin10-ds.xml
9. 性能调优
性能调优优化系统性能。
# cat >> /etc/sysctl.conf << 'EOF' # 网络优化 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_keepalive_time = 600 # 内存优化 vm.swappiness = 10 vm.dirty_ratio = 20 vm.dirty_background_ratio = 5 # 文件系统优化 fs.file-max = 6815744 EOF # sysctl -p # 系统限制调优 # cat >> /etc/security/limits.conf << 'EOF' * soft nofile 65535 * hard nofile 65535 * soft nproc 65535 * hard nproc 65535 * soft memlock unlimited * hard memlock unlimited EOF # 查看系统资源使用 # top -bn1 | head -20 top - 10:00:00 up 2 days, 5:30, 3 users, load average: 0.10, 0.05, 0.01 Tasks: 150 total, 1 running, 149 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.0 us, 0.5 sy, 0.0 ni, 98.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 65536.0 total, 60000.0 free, 5000.0 used, 536.0 buff/cache MiB Swap: 16384.0 total, 16384.0 free, 0.0 used. 60000.0 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 169924 11256 8236 S 0.0 0.0 0:01.23 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp # 查看磁盘I/O # iostat -x 1 3 Linux 4.19.90-24.4.v2101.ky10.x86_64 (fgedu-kylin01) 04/03/2026 _x86_64_ (8 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 1.00 0.00 0.50 0.00 0.00 98.50 Device r/s w/s rkB/s wkB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz 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 0.00 0.00 0.00 0.00
10. 故障排查
故障排查帮助定位和解决系统问题。
# journalctl -xe | tail -50
— Logs begin at Thu 2026-04-01 10:00:00 CST, end at Fri 2026-04-03 10:00:00 CST. —
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Started The nginx HTTP and reverse proxy server.
Apr 03 10:00:00 fgedu-kylin01 sshd[12345]: Accepted publickey for root from 192.168.1.10 port 54321 ssh2
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Started Session 10 of user root.
# 查看特定服务日志
# journalctl -u nginx -f
— Logs begin at Thu 2026-04-01 10:00:00 CST. —
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Starting The nginx HTTP and reverse proxy server…
Apr 03 10:00:00 fgedu-kylin01 nginx[12344]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Apr 03 10:00:00 fgedu-kylin01 nginx[12344]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Apr 03 10:00:00 fgedu-kylin01 systemd[1]: Started The nginx HTTP and reverse proxy server.
# 查看内核日志
# dmesg | tail -20
[ 0.000000] Linux version 4.19.90-24.4.v2101.ky10.x86_64 (mockbuild@kylin10-build) (gcc version 7.3.0 (GCC)) #1 SMP Fri Jan 15 10:00:00 CST 2026
[ 0.000000] Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.19.90-24.4.v2101.ky10.x86_64 root=/dev/mapper/klas-root ro crashkernel=auto resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
# 查看系统消息
# tail -50 /var/log/messages
Apr 3 10:00:00 fgedu-kylin01 systemd: Started The nginx HTTP and reverse proxy server.
Apr 3 10:00:00 fgedu-kylin01 sshd[12345]: Accepted publickey for root from 192.168.1.10 port 54321 ssh2
Apr 3 10:00:00 fgedu-kylin01 systemd: Started Session 10 of user root.
# 查看安全日志
# tail -50 /var/log/secure
Apr 3 10:00:00 fgedu-kylin01 sshd[12345]: Accepted publickey for root from 192.168.1.10 port 54321 ssh2
Apr 3 10:00:00 fgedu-kylin01 sshd[12345]: pam_unix(sshd:session): session opened for user root by (uid=0)
# 网络故障排查
# ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.521 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.432 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.398 ms
— 192.168.1.1 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.398/0.450/0.521/0.052 ms
# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 0.521 ms 0.432 ms 0.398 ms
本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html
