2022-07-14 01:29:15 +00:00
|
|
|
|
# Scripts
|
2022-09-01 02:39:51 +00:00
|
|
|
|
# 脚本说明
|
|
|
|
|
|
2022-07-14 01:29:15 +00:00
|
|
|
|
|
|
|
|
|
## 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 02:53:00 +00:00
|
|
|
|
* -i 代表是否用于,支持 0(默认值,即重启)和 1 两种参数
|
2022-09-01 02:39:51 +00:00
|
|
|
|
|
|
|
|
|
主要有两种使用场景
|
|
|
|
|
|
2022-09-01 02:53:00 +00:00
|
|
|
|
### 制作镜像
|
|
|
|
|
|
|
|
|
|
适用于
|
2022-07-14 01:29:15 +00:00
|
|
|
|
|
|
|
|
|
```
|
2022-09-01 02:53:00 +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-09-01 02:53:00 +00:00
|
|
|
|
```
|
2022-07-14 01:29:15 +00:00
|
|
|
|
|
2022-09-01 02:53:00 +00:00
|
|
|
|
### 场景2
|
2022-07-14 01:29:15 +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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
```
|