Cheat Sheet#
你可以用本文档来快速查询常用的 bootstrap 命令, 并复制粘贴.
Note
本文档中的所有命令都需要 SSH 到 EC2 游戏服务器上运行. 除了 BootStrap 中的命令, 其他命令都要确保你已经下载安装了 acore_server_bootstrap. 如果你还没有安装, 你可以参考 BootStrap 来一键安装.
BootStrap#
Just Bootstrap:
sudo /home/ubuntu/.pyenv/shims/python3 -c "$(curl -fsSL https://raw.githubusercontent.com/MacHu-GWU/acore_server_bootstrap-project/main/install.py)"
如果你需要指定用特定的 Python 版本来运行 (例如用 3.11), 你可以这样做:
sudo /home/ubuntu/.pyenv/shims/python3.11 -c "$(curl -fsSL https://raw.githubusercontent.com/MacHu-GWU/acore_server_bootstrap-project/main/install.py)"
Bootstrap 的过程中需要将这几个项目安装到服务器上 acore_server_bootstrap, acore_soap_app, 如果你需要指定它们的特定版本 (推荐这么做, 以增加确定性), 你可以用下面的命令, 只要修改对应项目的版本即可 (版本号就是 Git Tag 例如 0.1.1):
sudo /home/ubuntu/.pyenv/shims/python3.11 -c "$(curl -fsSL https://raw.githubusercontent.com/MacHu-GWU/acore_server_bootstrap-project/main/install.py)" --acore_server_bootstrap_version 1.0.1 --acore_soap_app_version 0.3.6 --acore_db_app_version 0.2.3
1. Configure Ubuntu#
1.1 Disable Ubuntu Auto Upgrade#
sudo /home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs disable_ubuntu_auto_upgrade
1.2 Setup EC2 Run On Restart Script#
sudo /home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs setup_ec2_run_on_restart_script
2. Configure DB#
2.1 Create Database#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs create_database
2.2 Create User#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs create_user
2.3 Update Realmlist#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs update_realmlist
2.4 Configure DB#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs configure_db
3. Apply Server Config#
3.1 Apply authserver Config#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs apply_authserver_conf
3.2 Apply worldserver Config#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs apply_worldserver_conf
3.3 Apply mod_lua_engine Config#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs apply_mod_lua_engine_conf
3.4 Apply Server Config#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs apply_server_config
3.5 Sync Lua Scripts#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs sync_lua_scripts
4. Check Server Status#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs run_check_server_status_cron_job
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs stop_check_server_status_cron_job
5. Run Server#
5.1 Run Server#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs run_server
5.2 List Server#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs list_session
5.3 Enter worldserver#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs enter_worldserver
5.4 Stop Server#
/home/ubuntu/git_repos/acore_server_bootstrap-project/.venv/bin/acorebs stop_server