[Stand-alone Games] 发一个H5网单游戏——北塘西游H5
Tofloor
poster avatar
酷谷的谷子
deepin
2023-07-28 00:26
Author

免责申明:请勿架设私服获利,否则一切后果由使用者本人自行承担。

下载地址 https://cloud.189.cn/t/n6fEfueIraui (访问码:roz6)

首先先安装 docker

sudo apt install docker.io
sudo usermod -aG docker $USER
sudo systemctl daemon-reload
sudo systemctl restart docker

配置国内 docker 镜像源

sudo vim /etc/docker/daemon.json

{
  "registry-mirrors": [
    "https://dockerproxy.com",
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com",
    "https://ccr.ccs.tencentyun.com"
  ]
}
sudo systemctl daemon-reload
sudo systemctl restart docker

其他依赖:Appimage 扩展阅读 https://bbs.deepin.org/zh/post/236453

sudo apt install libdatrie1 libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0

然后 reboot 重启 系统

安装 docker 服务端 + el 浏览器客户端(不依赖其他浏览器)

sudo dpkg -i ./cn.btxy.web.deb
#倒入镜像
cd /opt/北塘西游H5 && ./InstallS
#创建容器:
cd /opt/北塘西游H5/RUN && ./创建间容器

然后在桌面 双击 【启动北唐西游容器】在终端运行,进入容器命令行

#进入容器修改 IP 【只需要改一次】
/Replacement.sh /www/wwwroot/game 192.168.5.123 你的IP
#启动服务端
cd /root/H5/server/sh1 && ./gamectl.sh startall
#关闭
cd /root/H5/server/sh1 && ./gamectl.sh stop

宝塔 你的IP:32307/f62cef07
帐号密码都是 i85200
游戏地址 IP:81
进入 宝塔 网站 添加你的 IP:81
重启 Nginx

数据库账号 root 密码 AH37XrPwZJs4RwpA

#---------------------------------------------

也可以直接通过浏览器完 IP:81

后台:

IP:81/gm
账号:admin
蜜码:QQ2958915216

2023-07-27 15-59-39 创建的截图.png

Reply Favorite View the author
All Replies
1 / 2
To page
阿尼樱奈奈
Moderator
2023-07-28 00:29
#1

ok

Reply View the author
青稚
Moderator
2023-07-28 02:53
#2

厉害👍🏻

Reply View the author
dongfang123456
deepin
2023-08-17 07:54
#3

对于一个新手来说,这完全是天书!完全操作不下去。sudo vim /etc/docker/daemon.json { "registry-mirrors": [ "https://dockerproxy.com", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com", "https://ccr.ccs.tencentyun.com" ] }这里我都不明白怎么操作。

Reply View the author
dongfang123456
deepin
2023-08-17 07:55
#4

E325: 注意
发现交换文件 "/etc/docker/.daemon.json.swp"
所有者: root 日期: Wed Aug 16 22:34:00 2023
文件名: /etc/docker/daemon.json
修改过: 是
用户名: root 主机名: cyz-PC
进程 ID: 66489
正在打开文件 "/etc/docker/daemon.json"
CANNOT BE FOUND
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
如果是这样,请用 ":recover" 或 "vim -r /etc/docker/daemon.json"
恢复修改的内容 (请见 ":help recovery")。
如果你已经进行了恢复,请删除交换文件 "/etc/docker/.daemon.json.swp"
以避免再看到此消息。

交换文件 "/etc/docker/.daemon.json.swp" 已存在!
以只读方式打开([O]), 直接编辑((E)), 恢复((R)), 删除交换文件((D)), 退出((Q)), 中止((A)):

Reply View the author
dongfang123456
deepin
2023-08-17 07:56
#5

输入后让输密码,然后出错几次密码,就这样了

Reply View the author
酷谷的谷子
deepin
2023-08-17 16:37
#6
sudo rm -rf /etc/docker/.daemon.json.swp
sudo rm -rf /etc/docker/daemon.json

然后手动管理员打开/etc/docker目录

手动创建文本文件daemon.json

复制下面保存

{
  "registry-mirrors": [
    "https://dockerproxy.com",
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com",
    "https://ccr.ccs.tencentyun.com"
  ]
}
Reply View the author
dongfang123456
deepin
2023-08-23 21:37
#7

创建数据库成功后,再次登陆现实帐号或者密码错误,无法进入后台
截图_20230823133635.png

Reply View the author
酷谷的谷子
deepin
2023-08-23 23:35
#8
dongfang123456

创建数据库成功后,再次登陆现实帐号或者密码错误,无法进入后台
截图_20230823133635.png

在宝塔后台数据库 大写的GM数据库名 找到user表 把密码改成QQ2958915216就可以

Reply View the author
dongfang123456
deepin
2023-08-24 13:53
#9

只能在电脑上玩,不能在服务器之外的手机上玩吗?

Reply View the author
酷谷的谷子
deepin
2023-08-24 18:51
#10
dongfang123456

只能在电脑上玩,不能在服务器之外的手机上玩吗?

/Replacement.sh /www/wwwroot/game 内网IP 外网IP

路由器虚拟机服务器

内外端口填81

IP填写内网 IP

协议选HTTP

宝塔后台网站添加 外网IP端口81

Reply View the author
dongfang123456
deepin
2023-08-25 02:58
#11

为什么电脑重启就不能玩了呢?我这是自动获取IP,但是ip也没变啊。有时候会变。-_-

Reply View the author
dongfang123456
deepin
2023-08-25 02:59
#12

我没有外网ip,只想在局域网内玩耍,那个外网ip是不是就可以填内网ip了?也就是虚拟服务器的ip?

Reply View the author
酷谷的谷子
deepin
2023-08-25 03:11
#13
dongfang123456

我没有外网ip,只想在局域网内玩耍,那个外网ip是不是就可以填内网ip了?也就是虚拟服务器的ip?

嗯是的,真个局域网都可以玩只要是同一个网段

是局域网玩就不用改,因为你现在就局域网,

Reply View the author
酷谷的谷子
deepin
2023-08-25 03:13
#14
dongfang123456

为什么电脑重启就不能玩了呢?我这是自动获取IP,但是ip也没变啊。有时候会变。-_-

内网IP不一样的使用用那个该就可以

/Replacement.sh /www/wwwroot/game 替换前的IP 替换后的IP

Reply View the author
dongfang123456
deepin
2023-08-25 06:28
#15

现在看到的问题是,电脑重启后,如果ip地址变化,需要重新走一边替换ip的程序,但是重启前的号登陆不上了,重启后能新建号,也能玩,就是重启前的不能玩了

即使ip不变,重启前的号也不能玩了。一直卡在登陆页面

Reply View the author
dongfang123456
deepin
2023-08-25 13:23
#16

原来是因为变成了GM帐号,所以不能用了

Reply View the author
dongfang123456
deepin
2023-08-25 14:03
#17

只能电脑玩,手机不能玩吗?

Reply View the author
dongfang123456
deepin
2023-08-25 14:04
#18

还是只能服务器所在的电脑能玩?对浏览器有要求吗?el浏览器是什么浏览器?

Reply View the author
酷谷的谷子
deepin
2023-08-25 16:21
#19
dongfang123456

还是只能服务器所在的电脑能玩?对浏览器有要求吗?el浏览器是什么浏览器?

这个不是flash游戏应该什么浏览器都可以,是标准的H5网页游戏

Reply View the author
酷谷的谷子
deepin
2023-08-25 16:21
#20
dongfang123456

只能电脑玩,手机不能玩吗?

只要是浏览器生上网

Reply View the author
1 / 2
To page