问题一、安装
- 进入目录
cd /root/ServerAgent-2.2.1/
- 添加执行权限
chmod +x startAgent.sh
- nohup 英文全称 no hang up(不挂起),用于在系统后台不挂断地运行命令,退出终端不会影响程序的运行。 nohup 命令,在默认情况下(非重定向时),会输出一个名叫 nohup.out 的文件到当前目录下,如果当前目录的 nohup.out 文件不可写,输出重定向到 $HOME/nohup.out 文件中。
-
touch nohup.out
- 后台启动进程
nohup ./startAgent.sh nohup.out &
- 查询正在使用的端口
应该有默认的4444端口netstat -ntlp
- 进行serverAnent进程
ps -ef | grep Agent
- 查看运行日志
tail -f /root/ServerAgent-2.2.3/nohup.out