安装宝塔
安装
nginx-1.12
mysql-5.5
php5.3 找到禁用函数,删除exec,然后重载配置,重启php
-------------------------------------------------------------------------------
安装redis
tar -zxvf redis-4.0.0.tar.gz
cd redis-4.0.0
cd src
make
yum install tcl
make test
make install
cd /etc/
mkdir redis
cd /var/
mkdir redis
cd redis
mkdir data log run
-------------------------------------------------------------------------------
在Linux中增加swap空间
dd if=/dev/zero of=/home/swap bs=1024 count=4096000
/sbin/mkswap /home/swap
/sbin/swapon /home/swap
现在再用free -m命令查看一下内存和swap分区大小,就发现增加了4G的空间了。不过当计算机重启了以后,发现swap还是原来那么大,新的swap没有自动启动,还要手动启动。那我们需要修改/etc/fstab文件,增加如下一行
/home/swap swap swap defaults 0 0
-------------------------------------------------------------------------------
jdk-6u21-linux-x64-rpm.bin 上传到root目录
cd /root
chmod +x jdk-6u21-linux-x64-rpm.bin
./jdk-6u21-linux-x64-rpm.bin
-------------------------------------------------------------------------------
mhzx.tar上传到home目录
给予mhzx.tar 0777权限
cd /home
tar -zxvf mhzx.tar.gz
chmod -R 777 /home
chmod -R 777 /root
-------------------------------------------------------------------------------
宝塔 - 数据库 - root密码 输入 123456 提交
宝塔 - 网站 - 添加站点 输入IP 根目录/www/wwwroot/
宝塔 - 安全 - 放行端口 - 添加3306
mysql -u root -p
隐藏输入123456回车
创建数据库
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit
navicat导入数据库
mhzx_4095.sql 运行 account.sql
-------------------------------------------------------------------------------
/home/mhzx/zdir/android/meta
修改servers.xml IP
/home/mhzx/zdir/ios/meta
修改servers.xml IP
-------------------------------------------------------------------------------
关闭防火墙
chkconfig iptables off
立即生效
service iptables stop
-------------------------------------------------------------------------------
ziyuan.tar 上传到www/wwwroot 目录
cd /www/wwwroot
tar -zxvf ziyuan.tar.gz
-------------------------------------------------------------------------------
客户端修改\com.efun.twzx\res\values\strings.xml
<string name="efun_pd_url_login_base">http://你的IP/</string>
<string name="efun_pd_url_login_base_spa">http://你的IP/</string>
<string name="efun_pd_url_pay_base">http://你的IP/zxpay/</string>
<string name="efun_pd_url_pay_base_spa">http://你的IP/zxpay/</string>
apkide\Work\com.efun.twzx\assets\config\all_platform_config.xml里面全部IP
-------------------------------------------------------------------------------
启动游戏
cd /home/mhzx/au
./start.sh
cd /home/mhzx/matcher
./start.sh
cd /home/mhzx/zdir/android
./service.sh start
cd /home/mhzx/zdir/ios
./service.sh start
cd /home/mhzx/mhzx_4095/ghubd
./starthub.sh
cd /home/mhzx/mhzx_4095
./run.sh
cd /home/mhzx/mhzx_4095/gs
./rungs.sh
-------------------------------------------------------------------------------
top 查看CPU使用情况
netstat -ntlp查看进程
kill -9 进程编号 并且结束掉
-------------------------------------------------------------------------------