日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

游戏服务器部署

發布時間:2025/4/16 编程问答 16 豆豆
生活随笔 收集整理的這篇文章主要介紹了 游戏服务器部署 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#!/bin/bash #小菜鳥 #掛機 #版本:1.0 #游戲服務器部署 #基礎環境:MYSQL數據庫svn客戶端需部署才能運行此腳本 #################################################### if?[?"$UID"?=?"0"?] thenecho?"game?server?install" elseexit?1 fi read?-p?"Please?create?the?storage?game?server?directory:"?directory mkdir?/application/$directory path="/application/$directory" svn?co?http://192.168.0.5:8080/svn/Tools/ops/guaji/game_server/game?$path?--username?baisc?--password?bsc123?>?/dev/null if?[?"$?"?=?"0"?] thenecho?"ok" elseexit?1 fi########################服務器配置################################## echo?"game_server?configure" configure="/application/$directory/config/bootconfig.xml" read?-p?"Please?enter?your?node_name:"?node_name sed?-i?'s/s111/'$node_name'/'?$configure if?[?"$?"?=?"0"?] thenecho?"ok" elseexit?1 firead?-p?"Please?enter?your?listen_port:?"?port sed?-i?'s/8285/'$port'/'?$configure if?[?"$?"?=?"0"?] thenecho?"ok" elseexit?1 firead?-p?"Please?enter?your?server_id:"?id sed?-i?'s/111/'$id'/'?$configure if?[?"$?"?=?"0"?] thenecho?"ok" elseexit?1 firead?-p?"Please?enter?your?publicip:"?ip sed?-i?'s/118.178.130.64/'$ip'/'?$configure if?[?"$?"?=?"0"?] thenecho?"ok" elseexit?1 fi######################數據庫導入############################## data="/application/$directory/" echo?"database?configure" read?-p?"Please?enter?database?ip:"?address read?-p?"Please?enter?database?name:"?databasename read?-p?"Please?enter?database?user:"?user stty?-echo read?-p?"Please?enter?database?password:"?password stty?echo echo?"being?import?database" mysql?-h?$address?-u?root?-p$password?-e?"create?database?$databasename?character?set?'utf8';" mysql?-h?$address?-u$user?-p$password??$databasename?<?$data/sql/gamedb.sql? if?[?"$?"?=?"0"?] thenecho?"import?database?ok" elseecho?"import?not?ok"exit?1 fi ######################數據庫配置############################## databaseconfigure="/application/$directory/config/database.xml" sed?-i?'s/gamedbtest/'$databasename'/'?$databaseconfigure?????#數據庫名 sed?-i?'s/127.0.0.1/'$address'/'??$databaseconfigure????????#數據庫ip sed?-i?'s/root/'$user'/'?$databaseconfigure?????????????????#數據庫用戶名 sed?-i?'s/test/'$password'/'?$databaseconfigure?????????????#數據庫密碼########################啟動服務器################################ read?-p?"Please?enter?servername:"?servername read?-p?"Do?you?want?to?start?the?server?now?(yes/no)"?start if?[?"$start"?=?"yes"?] thenchmod?a+x?$data/gameservermv?$data/gameserver?$data/$servernamecd?$data/?&&?./$servername?-d????if?[?"$?"?=?"0"?]thenecho?"gameserver?is?ok"elseecho?"not?ok?"exit?1fi? elseexit?1 fi


轉載于:https://blog.51cto.com/baishuchao/1949671

總結

以上是生活随笔為你收集整理的游戏服务器部署的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。