Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Mobile Ragnarok M korea mobile game source(O) How To Play

Newbie Spellweaver
Joined
Sep 13, 2023
Messages
29
Reaction score
30
Fix ALL is today~~~2023-12-04 ALL is done!
PlanServer is OK today~~~2024-01-07 ALL is done!
FlentServer is OK today~~~2024-01-17 ALL is done!
Tools is OK today~~~2024-01-27 ALL is done!
This is Android System step.



RO_Server IP:192.168.6.18
WebServer IP:192.168.6.18



修改Develop_Android下的IP和端口

\Develop_Android\Assets\Resources\Script\FrameWork\GUI\view\StartGamePanel.txt [327行,改为子服务器IP]
----Source----
local checkurl = "103.85.85.216:9797/login/index.php"
----Fix----
local checkurl = "192.168.6.18/login/index.php"


\Develop_Android\Assets\Resources\Script\Net\NetConfig.txt [批量替换]
16行18889改为8889
----Source----
NetConfig = {}
-- 新的外网 用这个端口号吧 12001
NetConfig.PUBLIC_SPECIAL_SERVER_IP = "103.85.85.216"
NetConfig.PUBLIC_SPECIAL_SERVER_PORT = 10000

NetConfig.PRIVATE_GAME_SERVER_IP = "103.85.85.216"
NetConfig.PRIVATE_GAME_SERVER_PORT = 9000

NetConfig.PUBLIC_GAME_SERVER_IP = "103.85.85.216"
NetConfig.PUBLIC_GAME_SERVER_PORT = 5000

NetConfig.PrivateAuthServerUrl = "103.85.85.216"
NetConfig.PrivateAuthServerUrlPort = 5556

NetConfig.PrivateGameServerUrl = "103.85.85.216"
NetConfig.PrivateGameServerUrlPort = 18889


NetConfig.PriorityMessages = {
{id1=5, id2=23}
}

NetConfig.AnnounceAddress = "103.85.85.216/ro"

--sdk login
NetConfig.AccessTokenAuthHost = {CN = {"103.85.85.216","103.85.85.216"},EN = {"103.85.85.216"}}
NetConfig.NewAccessTokenAuthHost = {"1192.168.1.166","103.85.85.216","103.85.85.216"}


------------!!!!!!!!!!!!!!!!-------------------
NetConfig.GateHost = {CN = {"103.85.85.216","103.85.85.216"},EN = {"103.85.85.216"}}
NetConfig.NewGateHost = {"103.85.85.216","103.85.85.216","103.85.85.216"}
NetConfig.NewGateHost_NOTEST = {"103.85.85.216","103.85.85.216","103.85.85.216"}

--高防域名
NetConfig.NewGateHostGf = NetConfig.NewGateHost[1]
--海外域名
NetConfig.NewGateHostFg = NetConfig.NewGateHost[3]

----Fix----
NetConfig = {}
-- 新的外网 用这个端口号吧 12001
NetConfig.PUBLIC_SPECIAL_SERVER_IP = "192.168.6.18"
NetConfig.PUBLIC_SPECIAL_SERVER_PORT = 10000

NetConfig.PRIVATE_GAME_SERVER_IP = "192.168.6.18"
NetConfig.PRIVATE_GAME_SERVER_PORT = 9000

NetConfig.PUBLIC_GAME_SERVER_IP = "192.168.6.18"
NetConfig.PUBLIC_GAME_SERVER_PORT = 5000

NetConfig.PrivateAuthServerUrl = "192.168.6.18"
NetConfig.PrivateAuthServerUrlPort = 5556

NetConfig.PrivateGameServerUrl = "192.168.6.18"
NetConfig.PrivateGameServerUrlPort = 8889


NetConfig.PriorityMessages = {
{id1=5, id2=23}
}

NetConfig.AnnounceAddress = "192.168.6.18/ro"

--sdk login
NetConfig.AccessTokenAuthHost = {CN = {"192.168.6.18","192.168.6.18"},EN = {"192.168.6.18"}}
NetConfig.NewAccessTokenAuthHost = {"1192.168.1.166","192.168.6.18","192.168.6.18"}


------------!!!!!!!!!!!!!!!!-------------------
NetConfig.GateHost = {CN = {"192.168.6.18","192.168.6.18"},EN = {"192.168.6.18"}}
NetConfig.NewGateHost = {"192.168.6.18","192.168.6.18","192.168.6.18"}
NetConfig.NewGateHost_NOTEST = {"192.168.6.18","192.168.6.18","192.168.6.18"}

--高防域名
NetConfig.NewGateHostGf = NetConfig.NewGateHost[1]
--海外域名
NetConfig.NewGateHostFg = NetConfig.NewGateHost[3]


----Source----
--game server
NetConfig.AliyunSecurityIPSdkAppkey = ""
NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"}},EN = {}}
-- NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"}},EN = {{}}}
NetConfig.AliyunNetDelayDelta = 80 -- 游戏盾允许的最大延迟差

----Fix----
--game server
NetConfig.AliyunSecurityIPSdkAppkey = ""
NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"}},EN = {}}
-- NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"}},EN = {{}}}
NetConfig.AliyunNetDelayDelta = 80 -- 游戏盾允许的最大延迟差





编译:
Develop_Android:
AssetBundle->AssetBundleName设置->lua脚本 [大约耗时2分钟]
AssetBundle->纯打包(不扫描资源) [修改两个文件大约耗时12分钟左右,全部打包的话大约耗时7小时]
----------------------------------------------------------------------------------------------

这时Develop_Android编译后可以运行了





BuildAndroid:
\BuildAndroid\Assets\Code\Game\Version\ServerVersionCheckOpt.cs [改为子服务器IP]
----Source----
_cdnAddress = " " + ApplicationHelper.platformFolder + "/";
----Fix----
_cdnAddress = " " + ApplicationHelper.platformFolder + "/";

----Source----
Application.OpenURL (" " + chinese);
----Fix----
Application.OpenURL (" " + chinese);

\BuildAndroid\Assets\Resources\HttpOperationJson.txt [改为子服务器IP]
----Source----
{"urls":[" "],"elements":{"plat":"1"}}
----Fix----
{"urls":[" "],"elements":{"plat":"1"}}
----------------------------------------------------------------------------------------------

\Develop_Android\Assets\AssetBundles\Android\resources\script2\framework.unity3d
\Develop_Android\Assets\AssetBundles\Android\resources\script2\net.unity3d
替换到
\BuildAndroid\Assets\AssetBundles\Android\resources\script2\
----------------------------------------------------------------------------------------------
编译(打包Assets):
删除H:\DFS\RO\BuildAndroid\Assets\StreamingAssets下所有文件
AssetBundle->Archive->Zip AssetBundle To StreamingAssets [大约耗时5分钟]
一共会生成55个zip项目(0-54),可以在StreamingAssets目录下查看
打包完成后Unity也会有日志

File->BuildSetting->Build打包成品 [需要配置好JDK和SDK]


说明:
SDK使用27版本
Unity使用2017.4.40f1

Web Server Port :80 IP:192.168.6.18
Web files:archive.7zip
Fix php file ip set and mysql user & password

Fix mysql
DataBase ro_global -> Table proxy -> Filed id =0 port=8889 ext_port=8889

Now, it's Work!!

If you need Vedio tell to me, i 录制 Vedio to everybody。

Compile RO_Server

1)Need ContOS7, root login into system

2)Install some necessary compilation tools

yum install glibc.i686 -y
yum -y install gcc+ gcc-c++
yum install boost-devel.x86_64 -y
yum install libxml2-devel.x86_64 -y
yum install log4cxx-devel.x86_64 -y
yum install jansson-devel.x86_64 -y
yum install git -y
yum install gzip -y
yum install bzip2 -y
yum -y install automake
yum -y install libtool

3)Install cmake mysql
cd /root/ro_lib
wget
tar -zxvf cmake-3.12.4.tar.gz
cd cmake-3.12.4
./bootstrap
gmake
gmake install
cmake --version


cd /root/ro_lib
wget
rpm -ivh mysql-community-release-el7-5.noarch.rpm

yum install -y mysql-server
yum install -y mysql-community-common.x86_64
yum install -y mysql-community-devel.x86_64
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service
yum install -y mysql-server
systemctl mysqld status
systemctl mysql status

service mysql status
systemctl start mysqld.service
systemctl status mysqld.service

Run the following command in terminal mode:
mysql -u root
Enter MySQL command mode:choose one

> UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
> UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost";
> SET password for 'root'@'localhost'=password('123456');

> FLUSH PRIVILEGES;

> CREATE USER 'root'@'%' IDENTIFIED BY '123456';

> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
> FLUSH PRIVILEGES;

> quit;

Now Mysql user is root, password is 123456;

firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=8889/tcp --permanent

firewall-cmd --query-port=3306/tcp
firewall-cmd --query-port=8889/tcp

firewall-cmd --reload



After installing MySQL, import the database into MySQL

Tools: navicat premium or phpMyAdmin

Import Database. SQL File

4) Insatll googletest
cd /root/ro_lib
unzip googletest-release-1.8.0.zip
chmod -R 777 googletest-release-1.8.0
cd googletest-release-1.8.0/
cmake CMakeLists.txt
make
make install



g++ -o test test.cpp -lgtest -lpthread


5)Install jemalloc
cd /root/ro_lib
unzip jemalloc-3.4.0.zip
chmod -R 777 jemalloc-3.4.0
cd /jemalloc-3.4.0
./configure
make
make install


6)Install protobuf
protobuf-2.6.1-master.zip
cd /root/ro_lib
unzip protobuf-2.6.1-master.zip
chmod -R 777 protobuf-2.6.1-master
cd protobuf-2.6.1-master/
./configure --prefix=/usr/local
make
make install
protoc --version

vi /etc/ld.so.conf.d/protobuf.conf
/usr/local/lib
ldconfig




7) Fix premake4.lua
configuration "linux or macosx"
includedirs {
".",
"/usr/local/include",
"/usr/local/include/mysql",
"/usr/local/mysql/include",
"/usr/include",
"/usr/include/log4cxx",
"/usr/include/libxml2",
"/usr/include/mysql",
"/usr/local/include/google/protobuf",
}
libdirs {
"/usr/local/lib",
"/usr/local/mysql/lib",
"/usr/lib",
"/usr/lib/mysql",
"/lib64",
"/usr/lib64",
"/usr/lib64/mysql",
"/usr/local/protobuf/lib"
}
links {
"xml2",
"pthread",
"mysqlclient",
"log4cxx",
"protobuf",
"hiredis",
"jansson",
"jemalloc",
}


8) Install redis

cd /root/ro_lib
wget
tar -zxvf redis-4.0.14.tar.gz
cd redis-4.0.14
make MALLOC=libc
make install


cd /etc
mkdir redis
cp /root/ro_lib/redis-4.0.14/redis.conf /etc/redis/6379.conf
cp /root/ro_lib/redis-4.0.14/utils/redis_init_script /etc/init.d/redisd

修改
vi /etc/redis/6379.conf
将 daemonize no 修改为 daemonize yes

修改
vi /etc/init.d/redisd
添加两行注释
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database


chkconfig redisd on
service redisd start


cd /root/ro_lib
tar -zxvf hiredis-0.13.3.tar.gz
cd hiredis-0.13.3/

make && make install

9)Make RO Server
cd /root/ro_server
make clean
make -j4 tf


10)Run Server
cd bin/Debug

./restart
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jun 8, 2021
Messages
18
Reaction score
8
What service need turn on before recompile ro_server?
And please add step for attack database to Mysql.
Thanks u, very helpful! Im in step 8.
 
Newbie Spellweaver
Joined
Aug 1, 2023
Messages
24
Reaction score
16
finally someone with care for others share some tutorials...i appreciate it ur post..... ill go with it..

UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

how to work with this?

n file included from ../StatServer/StatServer.cpp:14:0:
../StatServer/StatUserData.h:7:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
FeatureConfig.cpp
make[2]: *** [../obj/Debug/libStatServer/StatServer.o] Error 1
make[1]: *** [libStatServer] Error 2
make[1]: *** Waiting for unfinished jobs....



got problem how to fix this

these one too.


SceneServer.cpp
SceneShop.cpp
SceneTimeTick.cpp
In file included from ../SceneServer/SceneTimeTick.cpp:21:0:
../SceneServer/StatMgr.h:12:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
make[2]: *** [../obj/Debug/libSceneServer/SceneTimeTick.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [libSceneServer] Error 2
make[1]: Leaving directory `/root/ro/build'
make: *** [tf] Error 2
[root@localhost ro]# cd bin/Debug
[root@localhost Debug]# ./restart
bash: ./restart: Permission denied
[root@localhost Debug]#
 
Last edited:
Newbie Spellweaver
Joined
Sep 13, 2023
Messages
29
Reaction score
30
finally someone with care for others share some tutorials...i appreciate it ur post..... ill go with it..

UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

how to work with this?

n file included from ../StatServer/StatServer.cpp:14:0:
../StatServer/StatUserData.h:7:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
FeatureConfig.cpp
make[2]: *** [../obj/Debug/libStatServer/StatServer.o] Error 1
make[1]: *** [libStatServer] Error 2
make[1]: *** Waiting for unfinished jobs....



got problem how to fix this

these one too.


SceneServer.cpp
SceneShop.cpp
SceneTimeTick.cpp
In file included from ../SceneServer/SceneTimeTick.cpp:21:0:
../SceneServer/StatMgr.h:12:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
make[2]: *** [../obj/Debug/libSceneServer/SceneTimeTick.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [libSceneServer] Error 2
make[1]: Leaving directory `/root/ro/build'
make: *** [tf] Error 2
[root@localhost ro]# cd bin/Debug
[root@localhost Debug]# ./restart
bash: ./restart: Permission denied
[root@localhost Debug]#
Incomplete code, please download someone else's
 
Newbie Spellweaver
Joined
Jun 8, 2021
Messages
18
Reaction score
8
Please teach me build command,
Make release is oke?
 
Newbie Spellweaver
Joined
Sep 13, 2023
Messages
29
Reaction score
30
What service need turn on before recompile ro_server?
And please add step for attack database to Mysql.
Thanks u, very helpful! Im in step 8.
yum install -y mysql-server
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

After installing MySQL, import the database into MySQL
 
Newbie Spellweaver
Joined
Jun 8, 2021
Messages
18
Reaction score
8
yum install -y mysql-server
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

After installing MySQL, import the database into MySQL
Can i ask why we need change 8889 into id 0 table proxy when look like server game use port 5678?
 
Newbie Spellweaver
Joined
Aug 1, 2023
Messages
24
Reaction score
16
yum install -y mysql-server
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

After installing MySQL, import the database into MySQL
how to import the database into Mysql
 
Newbie Spellweaver
Joined
Aug 1, 2023
Messages
24
Reaction score
16
i need to install it in centos 7 to execute mysql?
 
Newbie Spellweaver
Joined
Jun 8, 2021
Messages
18
Reaction score
8
1 - install mysql 5.6 in centos 7
2 - install navicat and do it. Google to how use Navicat. It easy.

yum install -y mysql-server
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

After installing MySQL, import the database into MySQL
Can”t use your UPDATE command, it has error version =.=
 
Newbie Spellweaver
Joined
Aug 1, 2023
Messages
24
Reaction score
16
how to fix this?

[root@localhost jemalloc-3.4.0]# make install
install -d /usr/local/bin
install -m 755 bin/pprof /usr/local/bin
install -m 755 bin/jemalloc.sh /usr/local/bin
install -d /usr/local/include/jemalloc
install -m 644 include/jemalloc/jemalloc.h /usr/local/include/jemalloc
install -m 644 include/jemalloc/jemalloc_defs.h /usr/local/include/jemalloc
gcc -std=gnu99 -Wall -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.pic.o src/jemalloc.c
In file included from include/jemalloc/internal/jemalloc_internal.h:492:0,
from src/jemalloc.c:2:
include/jemalloc/internal/ctl.h:47:28: error: ‘NBINS’ undeclared here (not in a function)
malloc_bin_stats_t bstats[NBINS];
^
In file included from src/jemalloc.c:2:0:
include/jemalloc/internal/jemalloc_internal.h: In function ‘s2u’:
include/jemalloc/internal/jemalloc_internal.h:623:14: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
if (size <= SMALL_MAXCLASS)
^
include/jemalloc/internal/jemalloc_internal.h:623:14: note: each undeclared identifier is reported only once for each function it appears in
include/jemalloc/internal/jemalloc_internal.h: In function ‘sa2u’:
include/jemalloc/internal/jemalloc_internal.h:666:16: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
if (usize <= SMALL_MAXCLASS)
^
In file included from include/jemalloc/internal/jemalloc_internal.h:460:0,
from src/jemalloc.c:2:
include/jemalloc/internal/tcache.h: In function ‘tcache_dalloc_small’:
include/jemalloc/internal/tcache.h:393:31: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
assert(tcache_salloc(ptr) <= SMALL_MAXCLASS);
^
include/jemalloc/internal/util.h:36:24: note: in definition of macro ‘assert’
if (config_debug && !(e)) { \
^
include/jemalloc/internal/tcache.h: In function ‘tcache_dalloc_large’:
include/jemalloc/internal/tcache.h:419:30: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
assert(tcache_salloc(ptr) > SMALL_MAXCLASS);
^
include/jemalloc/internal/util.h:36:24: note: in definition of macro ‘assert’
if (config_debug && !(e)) { \
^
In file included from include/jemalloc/internal/jemalloc_internal.h:749:0,
from src/jemalloc.c:2:
include/jemalloc/internal/arena.h: In function ‘arena_prof_ctx_get’:
include/jemalloc/internal/arena.h:855:11: warning: variable ‘binind’ set but not used [-Wunused-but-set-variable]
size_t binind = arena_ptr_small_binind_get(ptr,
^
include/jemalloc/internal/arena.h: In function ‘arena_prof_ctx_set’:
include/jemalloc/internal/arena.h:890:11: warning: variable ‘binind’ set but not used [-Wunused-but-set-variable]
size_t binind;
^
include/jemalloc/internal/arena.h: In function ‘arena_malloc’:
include/jemalloc/internal/arena.h:914:14: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
if (size <= SMALL_MAXCLASS) {
^
In file included from src/jemalloc.c:2:0:
include/jemalloc/internal/jemalloc_internal.h: In function ‘u2rz’:
include/jemalloc/internal/jemalloc_internal.h:887:15: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
if (usize <= SMALL_MAXCLASS) {
^
include/jemalloc/internal/jemalloc_internal.h:888:10: warning: variable ‘binind’ set but not used [-Wunused-but-set-variable]
size_t binind = SMALL_SIZE2BIN(usize);
^
src/jemalloc.c: In function ‘malloc’:
src/jemalloc.c:878:7: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
SMALL_MAXCLASS) {
^
src/jemalloc.c: In function ‘imemalign’:
src/jemalloc.c:962:35: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
(uintptr_t)1U && usize <= SMALL_MAXCLASS) {
^
src/jemalloc.c: In function ‘calloc’:
src/jemalloc.c:1070:10: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
<= SMALL_MAXCLASS) {
^
src/jemalloc.c: In function ‘realloc’:
src/jemalloc.c:1166:17: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
usize <= SMALL_MAXCLASS) {
^
src/jemalloc.c:1109:9: warning: variable ‘old_rzsize’ set but not used [-Wunused-but-set-variable]
size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
^
src/jemalloc.c: In function ‘free’:
src/jemalloc.c:1259:10: warning: variable ‘rzsize’ set but not used [-Wunused-but-set-variable]
size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
^
src/jemalloc.c: In function ‘allocm’:
src/jemalloc.c:1458:7: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
SMALL_MAXCLASS) {
^
src/jemalloc.c: In function ‘rallocm’:
src/jemalloc.c:1561:10: error: ‘SMALL_MAXCLASS’ undeclared (first use in this function)
<= SMALL_MAXCLASS) {
^
src/jemalloc.c:1507:9: warning: variable ‘old_rzsize’ set but not used [-Wunused-but-set-variable]
size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
^
src/jemalloc.c: In function ‘dallocm’:
src/jemalloc.c:1654:9: warning: variable ‘rzsize’ set but not used [-Wunused-but-set-variable]
size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
^
In file included from include/jemalloc/internal/../jemalloc.h:17:0,
from include/jemalloc/internal/jemalloc_internal.h:58,
from src/jemalloc.c:2:
src/jemalloc.c: At top level:
include/jemalloc/internal/private_namespace.h:205:28: warning: always_inline function might not be inlinable [-Wattributes]
#define iallocm JEMALLOC_N(iallocm)
^
include/jemalloc/internal/../jemalloc_defs.h:43:98: note: in definition of macro ‘JEMALLOC_N’
#define JEMALLOC_N(string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix) string_that_no_one_should_want_to_use_as_a_jemalloc_private_namespace_prefix
^
src/jemalloc.c:1406:1: note: in expansion of macro ‘iallocm’
iallocm(size_t usize, size_t alignment, bool zero, bool try_tcache,
^
src/jemalloc.c:303:1: warning: always_inline function might not be inlinable [-Wattributes]
malloc_init(void)
^
src/jemalloc.c:286:1: warning: always_inline function might not be inlinable [-Wattributes]
malloc_thread_init(void)
^
In file included from include/jemalloc/internal/jemalloc_internal.h:749:0,
from src/jemalloc.c:2:
include/jemalloc/internal/arena.h: In function ‘arena_malloc’:
include/jemalloc/internal/arena.h:934:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [src/jemalloc.pic.o] Error 1
[root@localhost jemalloc-3.4.0]#

[root@localhost ro]# make -j4 tf
premake4 --platform=x64 --file=premake4.lua gmake
mkdir -p bin/Debug
cp -au ./Config/* ./bin/Debug
Building configurations...
cp -au ./trade ./bin/Debug/
Running action 'gmake'...
Generating build/Makefile...
rm -fr bin/Debug/map/.svn
rm -fr bin/Debug/sql_log/.svn
rm -fr bin/Debug/sql_main/.svn
rm -fr bin/Debug/sql_main/platform/.svn
Generating build/libbase.make...
Generating build/testbase.make...
Generating build/libCommon.make...
Generating build/testCommon.make...
Generating build/libSceneServer.make...
Generating build/SceneServer.make...
Generating build/testSceneServer.make...
Generating build/libSessionServer.make...
Generating build/SessionServer.make...
Generating build/testSessionServer.make...
Generating build/libRecordServer.make...
Generating build/RecordServer.make...
Generating build/testRecordServer.make...
Generating build/libGateServer.make...
Generating build/GateServer.make...
Generating build/testGateServer.make...
Generating build/libSuperServer.make...
Generating build/SuperServer.make...
Generating build/testSuperServer.make...
Generating build/libProxyServer.make...
Generating build/ProxyServer.make...
Generating build/testProxyServer.make...
Generating build/libStatServer.make...
Generating build/StatServer.make...
Generating build/testStatServer.make...
Generating build/libTradeServer.make...
Generating build/TradeServer.make...
Generating build/testTradeServer.make...
Generating build/libMatchServer.make...
Generating build/MatchServer.make...
Generating build/testMatchServer.make...
Generating build/libSocialServer.make...
Generating build/SocialServer.make...
Generating build/testSocialServer.make...
Generating build/libTeamServer.make...
Generating build/TeamServer.make...
Generating build/testTeamServer.make...
Generating build/libGuildServer.make...
Generating build/GuildServer.make...
Generating build/testGuildServer.make...
Generating build/libGlobalServer.make...
Generating build/GlobalServer.make...
Generating build/testGlobalServer.make...
Generating build/libGZoneServer.make...
Generating build/GZoneServer.make...
Generating build/testGZoneServer.make...
Generating build/libAuctionServer.make...
Generating build/AuctionServer.make...
Generating build/testAuctionServer.make...
Generating build/libRobots.make...
Generating build/Robots.make...
Generating build/testRobots.make...
Generating build/libGProxyServer.make...
Generating build/GProxyServer.make...
Generating build/testGProxyServer.make...
Generating build/libWeddingServer.make...
Generating build/WeddingServer.make...
Generating build/testWeddingServer.make...
Generating build/libDataServer.make...
Generating build/DataServer.make...
Generating build/testDataServer.make...
Done.
cd ./build; config=debug make
make[1]: Entering directory `/root/ro/build'
==== Building libbase (debug) ====
==== Building libCommon (debug) ====
==== Building libSceneServer (debug) ====
Creating ../obj/Debug/libCommon
==== Building libSessionServer (debug) ====
GGuild.cpp
Creating ../obj/Debug/libSessionServer
ActivityManager.cpp
Creating ../obj/Debug/libSceneServer
AIAction.cpp
Creating ../obj/Debug/libbase
BaseConfig.cpp
In file included from ../base/xLuaTable.h:11:0,
from ../base/BaseConfig.h:12,
from ../base/BaseConfig.cpp:1:
../base/xlib/xDBFields.h:2:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
In file included from ../base/xLuaTable.h:11:0,
from ../SceneServer/AIAction.h:5,
from ../SceneServer/AIAction.cpp:1:
../base/xlib/xDBFields.h:2:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
make[2]: *** [../obj/Debug/libSceneServer/AIAction.o] Error 1
make[1]: *** [libSceneServer] Error 2
make[1]: *** Waiting for unfinished jobs....
Auction.cpp
make[2]: *** [../obj/Debug/libbase/BaseConfig.o] Error 1
make[1]: *** [libbase] Error 2
GSocial.cpp
In file included from ../SessionServer/TradeLog.h:6:0,
from ../SessionServer/SessionUser.h:12,
from ../SessionServer/ActivityManager.h:5,
from ../SessionServer/ActivityManager.cpp:1:
../base/xlib/xDBFields.h:2:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
In file included from ../SessionServer/TradeLog.h:6:0,
from ../SessionServer/Auction.cpp:1:
../base/xlib/xDBFields.h:2:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
In file included from ../base/xLuaTable.h:11:0,
from ../base/config/MiscConfig.h:15,
from ../Common/GSocial.cpp:3:
../base/xlib/xDBFields.h:2:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
make[2]: *** [../obj/Debug/libSessionServer/Auction.o] Error 1
make[2]: *** Waiting for unfinished jobs....
GTeam.cpp
make[2]: *** [../obj/Debug/libSessionServer/ActivityManager.o] Error 1
make[1]: *** [libSessionServer] Error 2
make[2]: *** [../obj/Debug/libCommon/GSocial.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [libCommon] Error 2
make[1]: Leaving directory `/root/ro/build'
make: *** [tf] Error 2


i got another problem
 
Last edited:
Newbie Spellweaver
Joined
Oct 14, 2023
Messages
5
Reaction score
0
RO_Server IP:192.168.6.18
WebServer IP:192.168.6.18

修改Develop_Android下的IP和端口

\Develop_Android\Assets\Resources\Script\FrameWork\GUI\view\StartGamePanel.txt [327行,改为子服务器IP]
----Source----
local checkurl = "103.85.85.216:9797/login/index.php"
----Fix----
local checkurl = "192.168.6.18/login/index.php"


\Develop_Android\Assets\Resources\Script\Net\NetConfig.txt [批量替换]
16行18889改为8889
----Source----
NetConfig = {}
-- 新的外网 用这个端口号吧 12001
NetConfig.PUBLIC_SPECIAL_SERVER_IP = "103.85.85.216"
NetConfig.PUBLIC_SPECIAL_SERVER_PORT = 10000

NetConfig.PRIVATE_GAME_SERVER_IP = "103.85.85.216"
NetConfig.PRIVATE_GAME_SERVER_PORT = 9000

NetConfig.PUBLIC_GAME_SERVER_IP = "103.85.85.216"
NetConfig.PUBLIC_GAME_SERVER_PORT = 5000

NetConfig.PrivateAuthServerUrl = "103.85.85.216"
NetConfig.PrivateAuthServerUrlPort = 5556

NetConfig.PrivateGameServerUrl = "103.85.85.216"
NetConfig.PrivateGameServerUrlPort = 18889


NetConfig.PriorityMessages = {
{id1=5, id2=23}
}

NetConfig.AnnounceAddress = "103.85.85.216/ro"

--sdk login
NetConfig.AccessTokenAuthHost = {CN = {"103.85.85.216","103.85.85.216"},EN = {"103.85.85.216"}}
NetConfig.NewAccessTokenAuthHost = {"1192.168.1.166","103.85.85.216","103.85.85.216"}


------------!!!!!!!!!!!!!!!!-------------------
NetConfig.GateHost = {CN = {"103.85.85.216","103.85.85.216"},EN = {"103.85.85.216"}}
NetConfig.NewGateHost = {"103.85.85.216","103.85.85.216","103.85.85.216"}
NetConfig.NewGateHost_NOTEST = {"103.85.85.216","103.85.85.216","103.85.85.216"}

--高防域名
NetConfig.NewGateHostGf = NetConfig.NewGateHost[1]
--海外域名
NetConfig.NewGateHostFg = NetConfig.NewGateHost[3]

----Fix----
NetConfig = {}
-- 新的外网 用这个端口号吧 12001
NetConfig.PUBLIC_SPECIAL_SERVER_IP = "192.168.6.18"
NetConfig.PUBLIC_SPECIAL_SERVER_PORT = 10000

NetConfig.PRIVATE_GAME_SERVER_IP = "192.168.6.18"
NetConfig.PRIVATE_GAME_SERVER_PORT = 9000

NetConfig.PUBLIC_GAME_SERVER_IP = "192.168.6.18"
NetConfig.PUBLIC_GAME_SERVER_PORT = 5000

NetConfig.PrivateAuthServerUrl = "192.168.6.18"
NetConfig.PrivateAuthServerUrlPort = 5556

NetConfig.PrivateGameServerUrl = "192.168.6.18"
NetConfig.PrivateGameServerUrlPort = 8889


NetConfig.PriorityMessages = {
{id1=5, id2=23}
}

NetConfig.AnnounceAddress = "192.168.6.18/ro"

--sdk login
NetConfig.AccessTokenAuthHost = {CN = {"192.168.6.18","192.168.6.18"},EN = {"192.168.6.18"}}
NetConfig.NewAccessTokenAuthHost = {"1192.168.1.166","192.168.6.18","192.168.6.18"}


------------!!!!!!!!!!!!!!!!-------------------
NetConfig.GateHost = {CN = {"192.168.6.18","192.168.6.18"},EN = {"192.168.6.18"}}
NetConfig.NewGateHost = {"192.168.6.18","192.168.6.18","192.168.6.18"}
NetConfig.NewGateHost_NOTEST = {"192.168.6.18","192.168.6.18","192.168.6.18"}

--高防域名
NetConfig.NewGateHostGf = NetConfig.NewGateHost[1]
--海外域名
NetConfig.NewGateHostFg = NetConfig.NewGateHost[3]


----Source----
--game server
NetConfig.AliyunSecurityIPSdkAppkey = ""
NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"}},EN = {}}
-- NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"103.85.85.216","103.85.85.216"},{"103.85.85.216","103.85.85.216"}},EN = {{}}}
NetConfig.AliyunNetDelayDelta = 80 -- 游戏盾允许的最大延迟差

----Fix----
--game server
NetConfig.AliyunSecurityIPSdkAppkey = ""
NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"}},EN = {}}
-- NetConfig.AliyunSecurityIPSdkServerGroup = {CN = {{"192.168.6.18","192.168.6.18"},{"192.168.6.18","192.168.6.18"}},EN = {{}}}
NetConfig.AliyunNetDelayDelta = 80 -- 游戏盾允许的最大延迟差





编译:
Develop_Android:
AssetBundle->AssetBundleName设置->lua脚本 [大约耗时2分钟]
AssetBundle->纯打包(不扫描资源) [修改两个文件大约耗时12分钟左右,全部打包的话大约耗时7小时]
----------------------------------------------------------------------------------------------

这时Develop_Android编译后可以运行了





BuildAndroid:
\BuildAndroid\Assets\Code\Game\Version\ServerVersionCheckOpt.cs [改为子服务器IP]
----Source----
_cdnAddress = " " + ApplicationHelper.platformFolder + "/";
----Fix----
_cdnAddress = " " + ApplicationHelper.platformFolder + "/";

----Source----
Application.OpenURL (" " + chinese);
----Fix----
Application.OpenURL (" " + chinese);

\BuildAndroid\Assets\Resources\HttpOperationJson.txt [改为子服务器IP]
----Source----
{"urls":[" "],"elements":{"plat":"1"}}
----Fix----
{"urls":[" "],"elements":{"plat":"1"}}
----------------------------------------------------------------------------------------------

\Develop_Android\Assets\AssetBundles\Android\resources\script2\framework.unity3d
\Develop_Android\Assets\AssetBundles\Android\resources\script2\net.unity3d
替换到
\BuildAndroid\Assets\AssetBundles\Android\resources\script2\
----------------------------------------------------------------------------------------------
编译(打包Assets):
删除H:\DFS\RO\BuildAndroid\Assets\StreamingAssets下所有文件
AssetBundle->Archive->Zip AssetBundle To StreamingAssets [大约耗时5分钟]
一共会生成55个zip项目(0-54),可以在StreamingAssets目录下查看
打包完成后Unity也会有日志

File->BuildSetting->Build打包成品 [需要配置好JDK和SDK]


说明:
SDK使用27版本
Unity使用2017.4.40f1

Web Server Port :80 IP:192.168.6.18
Web files:archive.7zip
Fix php file ip set and mysql user & password

Fix mysql
DataBase ro_global -> Table proxy -> Filed id =0 port=8889 ext_port=8889

Now, it's Work!!

If you need Vedio tell to me, i 录制 Vedio to everybody。

Compile RO_Server

1)Need ContOS7, root login into system

2)Install some necessary compilation tools

yum install glibc.i686 -y
yum -y install gcc+ gcc-c++
yum install boost-devel.x86_64 -y
yum install libxml2-devel.x86_64 -y
yum install log4cxx-devel.x86_64 -y
yum install jansson-devel.x86_64 -y
yum install git -y
yum install gzip -y
yum install bzip2 -y
yum -y install automake
yum -y install libtool




3)Install cmake mysql
cd /root/ro_lib
wget
tar -zxvf cmake-3.12.4.tar.gz
cd cmake-3.12.4
./bootstrap
gmake
gmake install
cmake --version


cd /root/ro_lib
wget
rpm -ivh mysql-community-release-el7-5.noarch.rpm


yum install -y mysql-server
systemctl mysqld status
systemctl mysql status
service mysql status
systemctl start mysqld.service
systemctl status mysqld.service

Run the following command in terminal mode:
mysql -u root
Enter MySQL command mode:

> UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
> UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost";
> SET password for 'root'@'localhost'=password('123456');
> FLUSH PRIVILEGES;
> quit;

Now Mysql user is root, password is 123456;

After installing MySQL, import the database into MySQL

Tools: navicat premium or phpMyAdmin

Import Database. SQL File

4) Insatll googletest
cd /root/ro_lib
unzip googletest-release-1.8.0.zip
chmod -R 777 googletest-release-1.8.0
cd googletest-release-1.8.0/
cmake CMakeLists.txt
make
make install



g++ -o test test.cpp -lgtest -lpthread


5)Install jemalloc
cd /root/ro_lib
unzip jemalloc-3.4.0.zip
chmod -R 777 jemalloc-3.4.0
cd /jemalloc-3.4.0
./configure
make
make install


6)Install protobuf
protobuf-2.6.1-master.zip
cd /root/ro_lib
unzip protobuf-2.6.1-master.zip
chmod -R 777 protobuf-2.6.1-master
cd protobuf-2.6.1-master/
./configure --prefix=/usr/local
make
make install
protoc --version


7) Fix premake4.lua
configuration "linux or macosx"
includedirs {
".",
"/usr/local/include",
"/usr/local/include/mysql",
"/usr/local/mysql/include",
"/usr/include",
"/usr/include/log4cxx",
"/usr/include/libxml2",
"/usr/include/mysql",
"/usr/local/protobuf/include",
}
libdirs {
"/usr/local/lib",
"/usr/local/mysql/lib",
"/usr/lib",
"/usr/lib/mysql",
"/lib64",
"/usr/lib64",
"/usr/lib64/mysql",
"/usr/local/protobuf/lib"
}
links {
"xml2",
"pthread",
"mysqlclient",
"log4cxx",
"protobuf",
"hiredis",
"jansson",
"jemalloc",
}


8) Install redis

cd /root/ro_lib
wget
tar -zxvf redis-4.0.14.tar.gz
cd redis-4.0.14
make MALLOC=libc
make install


cd /etc
mkdir redis
cp /root/ro_lib/redis-4.0.14/redis.conf /etc/redis/6379.conf
cp /root/ro_lib/redis-4.0.14/utils/redis_init_script /etc/init.d/redisd

修改
vi /etc/redis/6379.conf
将 daemonize no 修改为 daemonize yes

修改
vi /etc/init.d/redisd
添加两行注释
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database


chkconfig redisd on
service redisd start

9)Make RO Server
cd /root/ro_server
make clean
make -j4 tf


10)Run Server
cd bin/Debug

./restart
Hi can you make a vedio tutorial of that THX!
 
Newbie Spellweaver
Joined
Sep 7, 2023
Messages
16
Reaction score
10
finally someone with care for others share some tutorials...i appreciate it ur post..... ill go with it..

UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost"
UPDATE mysql.user SET password=PASSWORD("123456") WHERE user="root" AND Host="localhost";
UPDATE mysql.user SET password="123456" WHERE user="root" AND Host="localhost"

how to work with this?

n file included from ../StatServer/StatServer.cpp:14:0:
../StatServer/StatUserData.h:7:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
FeatureConfig.cpp
make[2]: *** [../obj/Debug/libStatServer/StatServer.o] Error 1
make[1]: *** [libStatServer] Error 2
make[1]: *** Waiting for unfinished jobs....



got problem how to fix this

these one too.


SceneServer.cpp
SceneShop.cpp
SceneTimeTick.cpp
In file included from ../SceneServer/SceneTimeTick.cpp:21:0:
../SceneServer/StatMgr.h:12:24: fatal error: GameStruct.h: No such file or directory
#include "GameStruct.h"
^
compilation terminated.
make[2]: *** [../obj/Debug/libSceneServer/SceneTimeTick.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [libSceneServer] Error 2
make[1]: Leaving directory `/root/ro/build'
make: *** [tf] Error 2
[root@localhost ro]# cd bin/Debug
[root@localhost Debug]# ./restart
bash: ./restart: Permission denied
[root@localhost Debug]#
here is the GameStuct.h put it in your common folder :)
 
Newbie Spellweaver
Joined
Oct 13, 2023
Messages
5
Reaction score
3
here is the GameStuct.h put it in your common folder :)



In file included from ../SessionServer/ActivityManager.cpp:2:0:
../base/RedisManager.h:11:29: fatal error: hiredis/hiredis.h: No such file or directory
#include <hiredis/hiredis.h>
^
compilation terminated.
ClientManager.cpp
make[2]: *** [../obj/Debug/libSessionServer/ActivityManager.o] Error 1
make[1]: *** [libSessionServer] Error 2
make[1]: *** Waiting for unfinished jobs....
GSocial.cpp
CommonConfig.cpp
GTeam.cpp
AICondition.cpp
GCharManager.cpp
In file included from ../base/GCharManager.cpp:2:0:
../base/RedisManager.h:11:29: fatal error: hiredis/hiredis.h: No such file or directory
#include <hiredis/hiredis.h>
^
compilation terminated.
make[2]: *** [../obj/Debug/libbase/GCharManager.o] Error 1
make[1]: *** [libbase] Error 2



i got three more problem... how to fix this?
i have already in my ro folder files but still no such file or directory
 
Newbie Spellweaver
Joined
Sep 7, 2023
Messages
16
Reaction score
10
In file included from ../SessionServer/ActivityManager.cpp:2:0:
../base/RedisManager.h:11:29: fatal error: hiredis/hiredis.h: No such file or directory
#include <hiredis/hiredis.h>
^
compilation terminated.
ClientManager.cpp
make[2]: *** [../obj/Debug/libSessionServer/ActivityManager.o] Error 1
make[1]: *** [libSessionServer] Error 2
make[1]: *** Waiting for unfinished jobs....
GSocial.cpp
CommonConfig.cpp
GTeam.cpp
AICondition.cpp
GCharManager.cpp
In file included from ../base/GCharManager.cpp:2:0:
../base/RedisManager.h:11:29: fatal error: hiredis/hiredis.h: No such file or directory
#include <hiredis/hiredis.h>
^
compilation terminated.
make[2]: *** [../obj/Debug/libbase/GCharManager.o] Error 1
make[1]: *** [libbase] Error 2



i got three more problem... how to fix this?
i have already in my ro folder files but still no such file or directory


install hiredis

wget
tar xzf v0.13.3.tar.gz
cd v0.13.3
sudo make && make install
 
Newbie Spellweaver
Joined
Aug 1, 2023
Messages
24
Reaction score
16
install hiredis

wget
tar xzf v0.13.3.tar.gz
cd v0.13.3
sudo make && make install
thank you.. ill do it after work 🙂

setup complete.. but after i try this..


9)Make RO Server
cd /root/ro_server
make clean
make -j4 tf


10)Run Server
cd bin/Debug

./restart


this is my error
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top