先说说最简单的如何在centos7中安装nmap,首先下载,然后编译,然后安装。命令一步一步如下:
su root ###注意这步,是让你以最高权限来执行已下命令。需要输入你的root密码哦。
wget https://nmap.org/dist/nmap-7.70.tar.bz2
cd /usr/src
bzip2 -cd nmap-7.70.tar.bz2 | tar xvf -
cd nmap-7.70
./configure
make
make install
其实上面的命令就是照超官网的...
可能遇到的错误:
问题:1、 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决方法 提高 vm.max_map_count 的大小
切换到 root 用户
vim /etc/sysctl.conf
在最后面追加下面内容
vm.max_map_count=262144 #
使用 sysctl -p 查看修改后的结果
sysctl -p
问题:2、Java HotSpot(TM) 64-Bit Server VM warning: ...
这个文件主要是用来限制用户对系统资源的使用,具体的使用方法 man 5 limits.conf,里面便给出了详细的用法
user@db-2:~$ cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#
#
#Where:
# can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, ...