码神-day2-linux

 


1、A:答:首先进入cd /etc/firewalld/zones/,

然后打开public.xml,vi 打开并编辑文本,
然后把<service name="ssh"/>删掉就行,接着保存退出。
重新加载防火墙配置:firewall-cmd --reload 


第二种方法:
[root@bogon zones]# firewall-cmd --add-port=80/tcp --permanent      
success
查看防火墙放开的服务:
[root@bogon zones]# firewall-cmd --list-all
public (default, active)
  interfaces: eno16777736
  sources: 
  services: dhcpv6-client ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
删除ssh服务:
[root@bogon zones]# firewall-cmd --remove-port=80/tcp --permanent
success
重新加载防火墙配置:firewall-cmd --reload 


B:一、systemctl stop sshd.service
   二、首先查22号端口的进程:[root@bogon zones]# lsof -i:22


# lsof -i:22
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    1532 root    3u  IPv4  20972      0t0  TCP *:ssh (LISTEN)
sshd    1532 root    4u  IPv6  20981      0t0  TCP *:ssh (LISTEN)


然后结束进程就可以:kill -9 1532


[root@bogon Desktop]# kill -9 1532
[root@bogon Desktop]#


C:systemctl disable postfix.service


2、CPU: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:                 58
Model name:            Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
Stepping:              9
CPU MHz:               2594.117
BogoMIPS:              5188.23
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0


内存:
MemTotal:        1001332 kB
MemFree:           99124 kB
MemAvailable:     242788 kB
Buffers:              44 kB
Cached:           247152 kB
SwapCached:           40 kB
Active:           392876 kB
Inactive:         193748 kB
Active(anon):     279996 kB
Inactive(anon):    67968 kB
Active(file):     112880 kB
Inactive(file):   125780 kB
Unevictable:          16 kB
Mlocked:              16 kB
SwapTotal:       2097148 kB
SwapFree:        2097100 kB
Dirty:                16 kB
Writeback:             0 kB
AnonPages:        339452 kB
Mapped:           101868 kB
Shmem:              8536 kB
Slab:              87492 kB
SReclaimable:      35256 kB


主板:
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-56 4d 0a 7d 85 9b 8d 28-0e 01 bf 90 8b 6a 91 d1
UUID: 7D0A4D56-9B85-288D-0E01-BF908B6A91D1
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


硬盘:
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:        21,474,836,480 bytes [21.4 GB]
Logical block size:   512 bytes
Device type:          disk
Local Time is:        Wed Jul 13 00:06:23 2016 CST
SMART support is:     Unavailable - device lacks SMART capability.


=== START OF READ SMART DATA SECTION ===


Error Counter logging not supported


Device does not support Self Test logging

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值