服务器启动jar包时报错:-bash: nohup: command not found
新配置好的服务器或者没有运行过jar包的服务器第一次启动jar包时报错:-bash: nohup: command not found,是因为没有安装nohup,下面我们来安装:
1,在linux根目录下执行指令:(找到nohup所在位置)
which nohup
2,记录绝对位置,到当前用户的根目录(我的是root)
cd
编辑配置文件:
vi .bash_profile
在原来后边加上":/usr/bin",如下图标记:
3,保存,退出 (然后保存退出(先按ESC,再输入:wq!保存退出)
4,重新加载一下
source ~/.bash_profile
5,测试是否安装好:
nohup --version
如下图即可安装完成: