websoft9/scripts
2022-12-08 13:48:36 +08:00
..
auto_addport.sh Update auto_addport.sh 2022-12-08 13:48:36 +08:00
containers_version.sh Update containers_version.sh 2022-11-17 17:02:27 +08:00
docker-installer.sh Update docker-installer.sh 2022-03-24 13:23:31 +08:00
enable_ssh_root.sh Create enable_ssh_root.sh 2022-07-14 09:28:33 +08:00
get_ip.sh Create get_ip.sh 2022-07-14 09:25:01 +08:00
install.sh Update install.sh 2022-09-01 14:22:27 +08:00
README.md Update README.md 2022-09-01 11:17:42 +08:00
reset_mysql57_password.sh Create reset_mysql57_password.sh 2022-07-14 09:33:16 +08:00
reset_mysql_password.sh Create reset_mysql_password.sh 2022-07-14 09:32:53 +08:00

Scripts

脚本说明

install.sh

install.sh 安装 Stackhub 的自动化脚本,支持两个参数:

  • -r 代表项目名称例如magento, lamp, lnmp, wordpress, joomla, gitlab 等
  • -i 代表是否用于镜像生产,支持 0默认值不用于镜像生产和 1 两种参数

主要有两种使用场景

制作镜像

制作镜像的场景下,脚本会删除服务器上的密钥对或运行云平台的某些恢复服务器出厂设置命令。

# 安装应用
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/install.sh; bash install.sh -r magento -i 1

# 中断后命令
cd /tmp/stackhub/apps && ansible-playbook -i hosts application.yml -c local -e init=1 -e appname=magento

安装应用立即使用

此场景下,安装完成后,系统会强制重启

# 安装应用
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/install.sh; bash install.sh -r magento -i 0

# 中断后命令
cd /tmp/stackhub/apps && ansible-playbook -i hosts application.yml -c local -e init=0 -e appname=magento

reset_mysql_password.sh

  1. 该脚本目前只适用于CentOS7以上的系统和MySQL5.6版本;
  2. 该脚本基于 https://github.com/EwigeveMicca/Mysql_ResetPasswd_Script 进行修改;
  3. 使用方法:远程连接到服务器,运行一下命令,按提示输入新密码即可。
    sudo git clone https://github.com/Websoft9/linuxscript.git; cd linuxscript/Mysql_ResetPasswd_Script;sudo sh reset_mysql_password.sh