免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

MZ

  1. #!/bin/sh
  2. clear
  3. echo "程序载入中,请稍后..."
  4. TTHl='
  5. ==================================================================
  6. 梦幻诛仙服务端管理工具                                                                                               
  7. ==================================================================';
  8. clear
  9. echo "$TTHl"
  10. echo -e "\033[1;31m 基础环境安装:(只运行一次!) \033[0m"
  11. echo
  12. echo -e "\033[1;31m> 1 - 安装基础库文件(必需) \033[0m"
  13. echo
  14. echo -e "\033[1;31m> 2 - 安装java(必需) \033[0m"
  15. echo
  16. echo -e "\033[1;31m> 3 - 安装宝塔面板(出现停顿输入 y 即可)(可选) \033[0m"
  17. echo
  18. echo -e "\033[1;31m> 4 - 安装后台JRE(必需) \033[0m"
  19. echo
  20. echo
  21. echo -e "\033[1;31m 游戏相关: \033[0m"
  22. echo
  23. echo -e "\033[1;31m> qd - 启动梦幻诛仙\033[0m"
  24. echo
  25. echo -e "\033[1;35m> gb - 关闭梦幻诛仙\033[0m"
  26. echo
  27. echo -e "\033[1;35m> ht - 打开后台\033[0m"
  28. echo
  29. echo -e "\033[1;35m> gbht - 关闭后台\033[0m"
  30. echo
  31. echo -e "\033[1;35m> qc - 清理垃圾\033[0m"
  32. echo
  33. echo -e "\033[1;35m> hy - 还原数据\033[0m"
  34. echo
  35. echo -n -e "请输入对应指令:"
  36. read aa
  37. if [ $aa = "qd" ] ; then
  38. echo "正在启动梦幻诛仙!请稍后!"
  39. service iptables stop
  40. cd /home/mhzx/au
  41. ./start.sh  &
  42. sleep 5
  43. cd /home/mhzx/matcher
  44. ./start.sh  &
  45. sleep 5
  46. cd /home/mhzx/mhzx_4095/ghubd
  47. ./starthub.sh     &
  48. sleep   5
  49. cd /home/mhzx/mhzx_4095
  50. ./run.sh    &
  51. cd /home/mhzx/mhzx_4095/gs
  52. ./rungs.sh  &
  53. sleep 5
  54. cd /home/mhzx/zdir/android
  55. ./service.sh start  &
  56. sleep 5
  57. cd /home/mhzx/zdir/ios
  58. ./service.sh start     &
  59. sleep   5
  60.         echo "..."
  61.         sleep 0.2
  62.         echo "..."
  63.         sleep 0.2
  64.         echo "..."
  65.         sleep 0.2
  66.         echo "..."
  67.         sleep 0.2
  68.         echo "..."
  69.         sleep 0.2
  70.         echo "..."
  71.         echo "梦幻诛仙服务端启动完成"
  72. elif [ $aa = "2" ] ; then
  73. echo "正在安装java!请稍后!"
  74. cd /root
  75. chmod -R 777 /root/jdk-6u21-linux-x64-rpm.bin  &
  76. echo "jdk权限修改完成"
  77. sleep 0.5
  78. ./jdk-6u21-linux-x64-rpm.bin   &
  79. sleep 10
  80.         echo "..."
  81.         sleep 1
  82.         echo "..."
  83.         sleep 1
  84.         echo "..."
  85.         sleep 1
  86.         echo "..."
  87.         sleep 1
  88.         echo "..."
  89.         sleep 1
  90.                 echo "java安装完毕!"
  91. elif [ $aa = "4" ] ; then
  92. echo "正在安装后台jak!请稍后!"
  93. cd /root
  94. chmod -R 777 /root/jre-8u181-linux-x64.tar.gz  &
  95. echo "jdk权限修改完成"
  96. sleep 0.5
  97. tar -xzvf jre-8u181-linux-x64.tar.gz   &
  98. sleep 10
  99.         echo "..."
  100.         sleep 1
  101.         echo "..."
  102.         sleep 1
  103.         echo "..."
  104.         sleep 1
  105.         echo "..."
  106.         sleep 1
  107.         echo "..."
  108.         sleep 1
  109.                 echo "java安装完毕!"
  110. elif [ $aa = "3" ] ; then
  111. echo "正在安装宝塔面板!请稍后!"
  112. yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
  113. elif [ $aa = "1" ] ; then
  114. echo "正在安装基础库文件!请稍后!"
  115. yum -y install gcc gcc-c++ make kernel-devel libssh2-devel libevent-devel pcre* && yum -y groupinstall "Development Tools"
  116. elif [ $aa = "qc" ] ; then
  117. echo "正在清档!请稍后!"echo "删档前请将mhzx目录auauy文件夹改为au文件夹如不是au请手动前往删除"
  118. rm -f /mhzx//logs/*.log
  119. rm -rf /mhzx//au/xbackup
  120. rm -rf /mhzx//au/xdb
  121. rm -rf /mhzx//au/logs

  122. rm -rf /home/mhzx/auauy/xbackup
  123. rm -rf /home/mhzx/auauy/xdb
  124. rm -rf /home/mhzx/auauy/logs

  125. rm -rf /home/mhzx/matcher/xbackup
  126. rm -rf /home/mhzx/matcher/xdb
  127. rm -rf /home/mhzx/matcher/logs

  128. rm -rf /home/mhzx/mhzx_4095/uniqname/uqxbackup
  129. rm -rf /home/mhzx/mhzx_4095/uniqname/uqxdb

  130. rm -rf /home/mhzx/mhzx_4095/gs/xbackup
  131. rm -rf /home/mhzx/mhzx_4095/gs/xdb

  132. rm -rf /home/mhzx/mhzx_4095/gdeliver/*.pid
  133. rm -rf /home/mhzx/mhzx_4095/gdeliver/*.log
  134. rm -rf /home/mhzx/mhzx_4095/ghubd/*.pid
  135. rm -rf /home/mhzx/mhzx_4095/ghubd/*.log
  136. rm -rf /home/mhzx/mhzx_4095/link/*.pid
  137. rm -rf /home/mhzx/mhzx_4095/link/*.log
  138. rm -rf /home/mhzx/mhzx_4095/logservice/*.pid
  139. rm -rf /home/mhzx/mhzx_4095/logservice/*.log
  140. rm -rf /home/mhzx/mhzx_4095/gs/*.pid
  141. rm -rf /home/mhzx/mhzx_4095/gs/*.log
  142. sleep 5s
  143. echo "删档成功!!!!!!"
  144. sleep 3
  145. elif [ $aa = "hy" ] ; then   
  146. echo "注意请关闭梦幻诛仙才能还原数据,正在还原数据!请稍后!"
  147. mysqldump -u root -p123456  mhzx_4095|grep ^DROP|mysql -u root -p123456 mhzx_4095;
  148. echo "[Delete]-Game_Mysql_Del.......OK......."
  149. mysql -uroot -p123456 mhzx_4095 < /home/mhzx.sql
  150. echo "[Import database]-Game_Mysql.......OK......."
  151. sleep 5s
  152. echo "游戏数据还原完成。"
  153. sleep 3s
  154. elif [ $aa = "gb" ] ; then   
  155. echo "正在关闭梦幻诛仙!请稍后!"
  156. export LC_ALL=zh_CN
  157. export LANG=zh_CN

  158. echo "所有文件清理完毕..."
  159. # AU服务 #
  160. killall gdeliverd
  161. killall zdir_android
  162. killall ghubd
  163. killall java
  164. killall zlogd
  165. killall glinkd
  166. killall zdir_ios

  167. echo "梦幻诛仙关闭成功!"
  168. elif [ $aa = "ht" ] ; then
  169. echo "正在打开后台!请稍后!"
  170. cd /root
  171. nohup /root/jre1.8.0_181/bin/java -jar /root/gm.jar > /dev/null 2>&1 &
  172. sleep 5
  173. elif [ $aa = "gbht" ] ; then
  174. echo "正在关闭后台!请稍后!"
  175. cd /root
  176. ps -ef | grep gm.jar | grep -v grep | awk '{print $2}' | xargs kill -9
  177. sleep 5
  178. fi
复制代码

ifcfg-eth0
  1. DEVICE="eth0"
  2. BOOTPROTO="static"
  3. HWADDR="00:0C:29:D3:C0:7B"
  4. IPV6INIT="yes"
  5. NM_CONTROLLED="yes"
  6. ONBOOT="yes"
  7. TYPE="Ethernet"
  8. UUID="dc3cdbb6-e789-4131-9046-01a5be14ca58"
  9. IPADDR=192.168.1.128
  10. NETMASK=255.255.255.0
复制代码

TOP

返回列表