DNF阿拉德游戏论坛
标题:
Ubuntu系统如何搭建DNF单机安装与外网教程
[打印本页]
作者:
dnf台服吧
时间:
2020-2-21 18:29
标题:
Ubuntu系统如何搭建DNF单机安装与外网教程
首先:安装Ubuntu系统所需DNF支持库
sudo apt-get install nautilus-open-terminal bison zlib1g-dev doxygen libxext-dev libpulse-dev libasound2-dev libesd0-dev git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libpango1.0-dev ccache libxcursor-dev libgstreamer0.10-dev python-m2crypto python-lxml netpbm libswitch-perl
sudo apt-get install build-essential git subversion bison gperf ccache gitk meld rabbitvcs-nautilus rabbitvcs-gedit eclipse eclipse-cdt dh-autoreconf gcc -y
sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6 -y
sudo apt-get install libc-dev:i386 g++-4.8-multilib g++-multilib libc6-dev:i386 gcc -y
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
复制代码
然后:安装apache2、lampp、mysql数据库
一、升级软件版本
sudo apt-get update -y
sudo apt-get upgrade -y
复制代码
我们可以将当前系统的源升级到最新版本。
二、安装和启动Apache
sudo apt-get install apache2 -y
sudo systemctl start apache2.service
复制代码
我们直接编译Apache源安装,安装完毕之后我们在浏览器中默认打开IP地址可以看到Apache安装成功的默认提示页面。
三、安装MySQL数据库
sudo apt-get install mysql-server -y
复制代码
数据库安装完毕之后,我们需要进行设置安全。
sudo mysql_secure_installation
复制代码
根据提示我们设置账户密码修改以及一些清理默认数据表。设置密码之后,我们其他可以回车默认都可以。
四、安装PHP以及组件
sudo apt-get install php -y
复制代码
这里直接安装系统自带的PHP软件版本,如果我们需要安装指定版本需要自定义安装。
sudo apt-get install php-{bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm} -y
复制代码
这里需要安装PHP支持的软件。
五、启动和测试
sudo systemctl enable apache2.service
sudo systemctl enable mysql.service
复制代码
这里我们需要启动Apache和MySQL。
systemctl restart apache2.service
复制代码
最后重启生效。
接着:上传服务端与数据库文件
(
百度台服DNF吧出品:DNF台服单机架设教程及局域网教程
可在这里提取)
1.推荐使用Xshell进行文件上传;
2.上传完成后如果是压缩包请记得解压;
3.解压后编译run、stop文件;
RUN:
service mysql start
/etc/init.d/apache2 start
cd /home/neople/stun
chmod 755 *
rm -f /home/neople/stun/pid/*.pid
rm -rf /home/neople/stun/log/*.*
./df_stun_r start &
cd /home/neople/monitor
chmod 755 *
rm -f /home/neople/monitor/pid/*.pid
rm -rf /home/neople/monitor/log/*.*
./df_monitor_r mnt_siroco start &
cd /home/neople/manager
chmod 755 *
rm -f /home/neople/manager/pid/*.pid
rm -rf /home/neople/manager/log/*.*
./df_manager_r manager start &
cd /home/neople/relay
chmod 755 *
rm -f /home/neople/relay/pid/*.pid
rm -rf /home/neople/relay/log/*.*
./df_relay_r relay_200 start &
cd /home/neople/bridge
chmod 755 *
rm -f /home/neople/bridge/pid/*.pid
rm -rf /home/neople/bridge/log/*.*
./df_bridge_r bridge start &
cd /home/neople/channel
chmod 755 *
rm -f /home/neople/channel/pid/*.pid
rm -rf /home/neople/channel/log/*.*
./df_channel_r channel start &
cd /home/neople/dbmw_guild
chmod 755 *
rm -f /home/neople/dbmw_guild/pid/*.pid
rm -rf /home/neople/dbmw_guild/log/*.*
./df_dbmw_r dbmw_gld_siroco start &
cd /home/neople/dbmw_mnt
chmod 755 *
rm -f /home/neople/dbmw_mnt/pid/*.pid
rm -rf /home/neople/dbmw_mnt/log/*.*
./df_dbmw_r dbmw_mnt_siroco start &
cd /home/neople/dbmw_stat
chmod 755 *
rm -f /home/neople/dbmw_stat/pid/*.pid
rm -rf /home/neople/dbmw_stat/log/*.*
./df_dbmw_r dbmw_stat_siroco start &
cd /home/neople/auction
chmod 755 *
rm -f /home/neople/auction/pid/*.pid
rm -rf /home/neople/auction/log/*.*
./df_auction_r ./cfg/auction_siroco.cfg start ./df_auction_r &
cd /home/neople/point
chmod 755 *
rm -f /home/neople/point/pid/*.pid
rm -rf /home/neople/point/log/*.*
./df_point_r ./cfg/point_siroco.cfg start df_point_r &
cd /home/neople/guild
chmod 755 *
rm -f /home/neople/guild/pid/*.pid
rm -rf /home/neople/guild/log/*.*
./df_guild_r gld_siroco start &
cd /home/neople/statics
chmod 755 *
rm -f /home/neople/statics/pid/*.pid
rm -rf /home/neople/statics/log/*.*
./df_statics_r stat_siroco start &
cd /home/neople/coserver
chmod 755 *
rm -f /home/neople/coserver/pid/*.pid
rm -rf /home/neople/coserver/log/*.*
./df_coserver_r coserver start &
cd /home/neople/community
chmod 755 *
rm -f /home/neople/community/pid/*.pid
rm -rf /home/neople/community/log/*.*
./df_community_r community start &
cd /home/neople/secsvr/gunnersvr
chmod 755 *
rm -f /home/neople/secsvr/gunnersvr/*.pid
./gunnersvr -t30 -i1 &
cd /home/neople/secsvr/zergsvr
chmod 755 *
rm -f /home/neople/secsvr/zergsvr/*.pid
./secagent &
./zergsvr -t30 -i1 &
cd /home/neople/game
chmod 755 *
rm -rf /home/neople/game/log/*
sleep 2
./df_game_r siroco11 start &
sleep 2
./df_game_r siroco52 start &
复制代码
STOP:
killall -9 df_stun_r
killall -9 df_monitor_r
killall -9 df_manager_r
killall -9 df_relay_r
killall -9 df_bridge_r
killall -9 df_channel_r
killall -9 df_dbmw_r
killall -9 df_auction_r
killall -9 df_point_r
killall -9 df_guild_r
killall -9 df_statics_r
killall -9 df_coserver_r
killall -9 df_community_r
killall -9 gunnersvr
killall -9 zergsvr
killall -9 df_game_r
killall -9 secagent
复制代码
最后:通过数据库恢复数据,启动游戏程序即可;
1.数据库工具可以选择navicat进行数据库导入;
2.启动命令:run(路径填写文件位置)
3.停止命令:stop(路径填写文件位置)
作者:
1191238363
时间:
2020-2-25 16:56
感谢分享~ .
作者:
王者好贱
时间:
2020-2-25 23:24
大佬用的是Ubuntu那个版本?
欢迎光临 DNF阿拉德游戏论坛 (https://oldbbs.arad.ink/)
Powered by Discuz! X3.3