diff --git a/9de16b22-6965-4d68-b44d-774ea64b8008_backup_20210115175430.sql.gz b/9de16b22-6965-4d68-b44d-774ea64b8008_backup_20210115175430.sql.gz new file mode 100644 index 0000000..a3c61a8 Binary files /dev/null and b/9de16b22-6965-4d68-b44d-774ea64b8008_backup_20210115175430.sql.gz differ diff --git a/README.md b/README.md index 9c01ffa..a4357d2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,156 @@ # README -项目网址: [106.75.254.215:3389/](106.75.254.215:3389/mypads)[mypads](106.75.254.215:3389/mypads) +[toc] -码园URL: [http://](http://gitea.shuishan.net.cn/10164810127/DasePad)[gitea.shuishan.net.cn](http://gitea.shuishan.net.cn/10164810127/DasePad)[/10164810127](http://gitea.shuishan.net.cn/10164810127/DasePad)[/DasePad](http://gitea.shuishan.net.cn/10164810127/DasePad) +## 如何部署 -演示视频:链接: https://pan.baidu.com/s/1LGqm4T1gEGHv9ea9REedlg 密码: 148l +### 云主机 -云主机镜像ID: uimage-tbzchrze(名称:DasePad镜像) +从镜像恢复云主机 + +镜像ID: uimage-tbzchrze(名称:DasePad镜像) + +- IP: 106.75.254.215 +- 用户名:ubuntu +- 密码:cloudcomputing1 + +### 云数据库 + +**方法一:从云数据库备份恢复** + +备份链接:https://pan.baidu.com/s/1QMJxZ_4_9uS_9B_SK330sw 密码: 0nlu + +**方法二:重新创建MySQL云数据库** + +1. 创建数据库 + +![1](./images/1.png) + +2. 访问:mysql -h[新创建的数据库IP地址] -P[新创建的数据库端口] -uroot -pcloudcomputing1 + + 以上图数据库为例:mysql -h10.23.238.149 -P3306 -uroot -pcloudcomputing1 + +3. 修改:项目的setting.json为以下配置(使用数据库的内网IP) + + ```json + "dbType" : "mysql", + "dbSettings" : { + "user": "root", + "host": 【新创建的数据库IP地址】, + "port": 【新创建的数据库端口】, + "password": "cloudcomputing1", + "database": "etherpad_lite_db", + "charset": "utf8mb4" + }, + ``` + +4. 部署: + + - 创建数据库和数据表 + + ```sql + create database `etherpad_lite_db`; + CREATE TABLE `store` ( + `key` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '', + `value` longtext COLLATE utf8mb4_bin NOT NULL, + PRIMARY KEY (`key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + ``` + + - 修改MySQL配置: + + 修改MySQL的charset格式为`utf8mb4`, 因为以下原因: + + > MySQL的 `utf8` charset only partially implements proper UTF-8 encodingIt can only store UTF-8-encoded symbols that consist of one to three bytes; encoded symbols that take up four bytes aren’t supported. + + 修改方法: + + ```sql + # For each database: + ALTER DATABASE etherpad_lite_db CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + ``` + + 修改结果: + + ![2](images/2.png) + +### 负载均衡 + +1. 创建负载均衡节点 + +2. 负载均衡压测:分别启动1~3个节点后运行如下命令 + + ```shell + ab -c 1000 -n 10000 http://106.75.254.215:3389/mypads/index.html + ``` + + 可以看到如图输出 + + ![3](images/3.png) + + ![4](images/4.png) + + ![5](images/5.png) + + + +## 如何运行 + +1. 部署好云主机和云数据库,负载均衡不部署也可以 + +2. 进入云主机,如下图进入etherpad-lite文件夹 + + ![Screen Shot 2021-01-16 at 12.02.22 AM](images/6.png) + +3. 启动应用,需要约1-2分钟,命令和输出如下图 + + ![7](images/7.png) + + ![8](images/8.png) + +4. 应用启动后,可以在任意设备访问应用,入口为http://106.75.254.215:3389/mypads + +## 应用效果 + +### 视频 + +演示视频链接: https://pan.baidu.com/s/1LGqm4T1gEGHv9ea9REedlg 密码: 148l + +### 截图 + +用户登陆界面 + +![9](images/9.png) + +用户注册界面 + +![10](images/10.png) + +用户个人主页 + +![11](images/11.png) + +添加新文件夹(Pad创建在文件夹中、一个Pad即一个文档) + +![12](images/12.png) + +邀请用户共同编辑Pad(注册用户才能被邀请) + +![13](images/13.png) + +创建新Pad + +![14](images/14.png) + +共同编辑一个Pad,不同颜色代表不同用户 + +![15](images/15.png) + +对某行添加评论 + +![16](images/16.png) + +添加图片,图片可以放大缩小 + +![17](images/17.png) diff --git a/images/1.png b/images/1.png new file mode 100644 index 0000000..4dbe3f8 Binary files /dev/null and b/images/1.png differ diff --git a/images/10.png b/images/10.png new file mode 100644 index 0000000..a3b5e90 Binary files /dev/null and b/images/10.png differ diff --git a/images/11.png b/images/11.png new file mode 100644 index 0000000..de988aa Binary files /dev/null and b/images/11.png differ diff --git a/images/12.png b/images/12.png new file mode 100644 index 0000000..cced629 Binary files /dev/null and b/images/12.png differ diff --git a/images/13.png b/images/13.png new file mode 100644 index 0000000..4dc8afb Binary files /dev/null and b/images/13.png differ diff --git a/images/14.png b/images/14.png new file mode 100644 index 0000000..2f0b5bd Binary files /dev/null and b/images/14.png differ diff --git a/images/15.png b/images/15.png new file mode 100644 index 0000000..20783c6 Binary files /dev/null and b/images/15.png differ diff --git a/images/16.png b/images/16.png new file mode 100644 index 0000000..94303b0 Binary files /dev/null and b/images/16.png differ diff --git a/images/17.png b/images/17.png new file mode 100644 index 0000000..971bc5c Binary files /dev/null and b/images/17.png differ diff --git a/images/2.png b/images/2.png new file mode 100644 index 0000000..c20f0e9 Binary files /dev/null and b/images/2.png differ diff --git a/images/3.png b/images/3.png new file mode 100644 index 0000000..bfb75bf Binary files /dev/null and b/images/3.png differ diff --git a/images/4.png b/images/4.png new file mode 100644 index 0000000..534c826 Binary files /dev/null and b/images/4.png differ diff --git a/images/5.png b/images/5.png new file mode 100644 index 0000000..d82eb28 Binary files /dev/null and b/images/5.png differ diff --git a/images/6.png b/images/6.png new file mode 100644 index 0000000..2201347 Binary files /dev/null and b/images/6.png differ diff --git a/images/7.png b/images/7.png new file mode 100644 index 0000000..10971d5 Binary files /dev/null and b/images/7.png differ diff --git a/images/8.png b/images/8.png new file mode 100644 index 0000000..1b690c2 Binary files /dev/null and b/images/8.png differ diff --git a/images/9.png b/images/9.png new file mode 100644 index 0000000..92008ea Binary files /dev/null and b/images/9.png differ