1、SSH远程服务的管理操作
A、通过两种方式来拒绝开放一个端口22(SSH端口):
要求:一种是通过修改配置文件并重新加载配置;另一种是通过命令操作方式来实现开放一个端口,并测试端口是否通。
方法一:[root@bogon ~]#firewall-cmd --remove-port=80/tcp --permanent
方法二: [root@bogon ~]#vi /etc/firewalld/zones/public.xml
B、通过两种方式来结束ssh服务,并把步骤写在上面;
第一种:[root@bogon ~]#systemctl stop sshd.service
第二种:[root@bogon ~]#ps –aux |grep ssh
[root@bogon ~]#kill -9 PID
C、把ssh服务设置成开机禁用,并把步骤及效果写在上面。
[root@bogon ~]#systemctl disablesshd.service
Removed symlink/etc/systemd/system/multi-user.target.wants/sshd.service.
2、查看自己虚拟机的软(系统)硬件(CPU、内存、硬盘、主板)信息,并把信息打出的结果打印在作业上。
[root@bogon ~]#lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Model name: Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz
Stepping: 3
CPU MHz: 2494.235
BogoMIPS: 4988.47
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0
[root@bogon ~]# more /proc/meminfo
MemTotal: 1868660 kB
MemFree: 427344 kB
MemAvailable: 849604 kB
Buffers: 1084 kB
Cached: 511908 kB
SwapCached: 0 kB
Active: 656980 kB
Inactive: 385260 kB
Active(anon): 530104 kB
Inactive(anon): 9720 kB
Active(file): 126876 kB
Inactive(file): 375540 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 529288 kB
Mapped: 108372 kB
Shmem: 10576 kB
Slab: 125244 kB
SReclaimable: 64936 kB
SUnreclaim: 60308 kB
KernelStack: 12864 kB
PageTables: 24608 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3031476 kB
Committed_AS: 2893744 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 173092 kB
VmallocChunk: 34359556996 kB
HardwareCorrupted: 0 kB
AnonHugePages: 280576 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 110464 kB
DirectMap2M: 1986560 kB
DirectMap1G: 0 kB
[root@bogon ~]# smartctl -a /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-327.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Vendor: VMware,
Product: VMware Virtual S
Revision: 1.0
User Capacity: 32,212,254,720 bytes [32.2 GB]
Logical block size: 512 bytes
Device type: disk
Local Time is: Tue Jul 19 13:19:59 2016 CST
SMART support is: Unavailable - device lacks SMART capability.
[root@bogon ~]# dmidecode |grep -A16 "System Information$"
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-56 4d 75 67 93 8b aa e9-f9 aa ec 7e 3e 81 02 7f
UUID: 67754D56-8B93-E9AA-F9AA-EC7E3E81027F
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Intel Corporation
Product Name: 440BX Desktop Reference Platform
Version: None
Serial Number: None
Asset Tag: Not Specified