随笔分类 - linux
linux服务器相关
摘要:#!/bin/bash # 安装Docker脚本 # 检查是否为root用户,因为某些命令需要root权限 if [ "$(id -u)" != "0" ]; then echo "该脚本必须以root权限运行" 1>&2 exit 1 fi # 更新系统(可选) echo "正在更新系统..."
阅读全文
摘要:查看centos版本cat /etc/centos-release 1.安装docker curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 启动dockersudo systemctl start docker 设置
阅读全文
摘要:一.防火墙的启动关闭 启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status firewalld开机禁用 : systemctl disable firewalld开机启用 : systemctl
阅读全文
摘要:#!/bin/bash # 应用程序的名字 APP_NAME="wecom" BASE_PATH="/home/cy/soft/wecom/" # JAR文件的新版本路径 JAR_PATH="${BASE_PATH}${APP_NAME}.jar" # PID文件的路径 PID_PATH="${BA
阅读全文
摘要:history查看以前历史命令 $ history 526 ls web/ 527 clear 528 ls -a !n 执行对应的序号命令 !! 这将会重新执行上一条命令 !?String? 查找匹配的第一条命令并执行 fc n 弹出vim窗口编辑命令,退出时执行
阅读全文
浙公网安备 33010602011771号