title: centos7 bash: fuser: command not found 解决办法
category: linux
tag :centos7
- centOs7
bash: fuser: command not found
解决办法
- 提示没有
fuser
需要安装psmisc
Psmisc软件包包含三个帮助管理/proc目录的程序。
安装下列程序: fuser, killall,pstree和pstree.x11(到pstree的链接)
简短说明
fuser 显示使用指定文件或者文件系统的进程的PID。
killall 杀死某个名字的进程,它向运行指定命令的所有进程发出信号。
pstree 树型显示当前运行的进程。
pstree.x11 与pstree功能相同,只是在退出前需要确认。
Psmisc 安装依赖关系
Psmisc 依赖于: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed.
- 安装psmisc
yum install psmisc
centos7 防火墙无法加入nginx权限问题
firewall-cmd --zone=public --add-port=80/tcp --permanent
- 错误提示
Error: INVALID_SERVICE: 'nginx' not among existing services
- vi /etc/firewalld/services/nginx.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Nginx</short>
<description>nginx</description>
<port protocol="tcp" port="80"/>
</service>
firewall-cmd --reload
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
systemctl start firewalld.service #开启firewall
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
systemctl restart firewalld.service #重启firewall
安装nginx
yum install nginx
service nginx start
chkconfig --levels 235 nginx on