websoft9/scripts/README.md

44 lines
1.4 KiB
Markdown
Raw Normal View History

2022-07-14 01:29:15 +00:00
# Scripts
## install.sh
2022-09-01 02:53:00 +00:00
install.sh 安装 Stackhub 的自动化脚本,支持两个参数:
2022-09-01 02:39:51 +00:00
* -r 代表项目名称例如magento, lamp, lnmp, wordpress, joomla, gitlab 等
2022-09-01 03:17:42 +00:00
* -i 代表是否用于镜像生产,支持 0默认值不用于镜像生产和 1 两种参数
2022-09-01 02:39:51 +00:00
2023-02-27 09:21:13 +00:00
主要有两种使用场景:
2022-09-01 02:39:51 +00:00
2023-02-27 09:21:13 +00:00
```
1 制作镜像
2022-09-01 02:53:00 +00:00
2023-02-27 09:21:13 +00:00
# 该场景下,脚本会删除服务器上的密钥对或运行云平台的某些恢复服务器出厂设置命令。
2022-07-14 01:29:15 +00:00
2022-09-01 03:17:42 +00:00
# 安装应用
2022-09-01 02:39:51 +00:00
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
2022-07-14 01:29:15 +00:00
2022-09-01 03:17:42 +00:00
2023-02-27 09:21:13 +00:00
2. 安装应用立即使用
# 此场景下,安装完成后,系统会强制重启
2022-07-14 01:29:15 +00:00
2022-09-01 03:17:42 +00:00
# 安装应用
2022-09-01 02:53:00 +00:00
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/install.sh; bash install.sh -r magento -i 0
2022-07-14 01:29:15 +00:00
2022-09-01 02:53:00 +00:00
# 中断后命令
2022-09-01 02:39:51 +00:00
cd /tmp/stackhub/apps && ansible-playbook -i hosts application.yml -c local -e init=0 -e appname=magento
```
2022-07-14 01:33:55 +00:00
## reset_mysql_password.sh
2023-02-27 09:21:13 +00:00
该脚本 fork from [Mysql_ResetPasswd_Script](https://github.com/EwigeveMicca/Mysql_ResetPasswd_Script)目前只适用于CentOS7 以上的系统和 MySQL5.6 版本;
用法:
```
sudo git clone https://github.com/Websoft9/linuxscript.git; cd linuxscript/Mysql_ResetPasswd_Script;sudo sh reset_mysql_password.sh
```