随笔分类 -  linux

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