随笔分类 - Linux
摘要:1:配置 history 命令查询历史操作命令记录时显示操作时间 1):编辑文件: /etc/profile 2):在文件末尾添加以下行并保存: export HISTTIMEFORMAT="%F %T " 3):重新加载配置:source /etc/profile
阅读全文
摘要:sh脚本(直接重启,推荐): #!/bin/bash # 配置部分 JAR_PATH="/xxx/xxxxx/xxxxxx/xxxxx.jar" # JAR文件路径 LOG_PATH="/xxx/xxxx/xxxxx/xxxxx.log" # 日志文件路径 # 获取正在运行的进程的PID PID=$
阅读全文
摘要:查看端口号netstat -lnp|grep 8002 启动jar包命令nohup java -jar /xxx/xxx/xxx.jar --server.port=80808 > /opt/log.log 2>&1 & nohup:表示忽略终端挂断信号,即使关闭终端或注销用户,应用程序也会继续在后
阅读全文
摘要:1:查看防火状态 systemctl status firewalld service iptables status 2:暂时关闭防火墙 systemctl stop firewalld service iptables stop 3:永久关闭防火墙 systemctl disable firew
阅读全文

浙公网安备 33010602011771号