码神Linux01
来源:互联网 发布:private在java 编辑:程序博客网 时间:2024/05/13 14:23
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
- 码神Linux01
- linux01
- Linux01
- linux01
- Linux01
- linux01用户管理
- linux01-常用命令、网络、mysql、yum
- 走进Linux01-磁盘分区与目录结构
- 我的DBA之路-Linux01
- 码神Linux02
- 码神20172
- 码神-day2-linux
- 码神-day3-linux
- 码神-day4-linux
- 码神-day6-java
- 码神-day7-java
- 码神-day8-java
- 码神-day9-java
- Linux进程通信(一)管道
- Qt中修改应用程序和标题栏的图标
- 如何将PADS layout的封装转换为allegro封装
- Internet网络上遇到的操作问题集合
- POJ3295
- 码神Linux01
- 为 webrtc 创建 xcode工程
- pelco-d协议数据解析示例
- 自定义软键盘
- SSH框架整合
- Clipping-planes in OpenGL ES 2.0
- 继承与组合·
- css判断不同分辨率显示不同宽度布局实现自适应宽度
- LIN总线数据记录