Running 2 Servers on 1 Host?

wallaby

New member
Messages
78
Points
0
Dear all,

I'm wondering if it's possible to run 2 servers on 1 Host? Reason why is I've got a server that's running right now but it's on a really really old Hercules emulator. Is it possible for me to have another server running on the same host so that while this current one is up and running, I can also start working on the new server?

If it's possible, would there be conflicts in the IP, etc. especially when players try to connect to the server?

Well bottom line is I wanna get the latest Hercules emulator so that I can implement the new plugins that are there and not bound by the limitation of the old emulator's compatibility.

So yea...

Please advice and appreciate any input given.

Thanks!

 
Last edited by a moderator:
You can change the PORT, it will not conflict

Code:
char-server.conf
---------------------
char_configuration: {
	server_name: "New Server"
	inter: {
		char_ip: "server2 IP"
		login_ip: "localhost"
 		char_port: 6122
		login_port: 6901	
	}
}

login-server.conf
---------------------
login_configuration: {
                inter: {
                        login_port: 6901
                }
}

map-server.conf
---------------------
map_configuration: {
                inter: {
                        map_port: 5122
                        char_ip: "localhost"
                        char_port: 6122
                        map_ip: "New Server IP"
                }
}
 
Thanks for the speedy reply astralprojection!

QUESTION

Urm... with this scenario in mind (2 servers running on 1 host), can these two servers share 1 database (I was thinking it would be easier for 'migration' that way), and if sharing 1 database is possible, how is it done/configured?

Thanks again!

 
just create 2 sets of database

example:

server 2: ragnarok2 & log2 <- 2nd server..  I suggest create new user on your VPS by:

login as root:

#add new user for 2nd server
useradd --create-home --shell /bin/bash <NewUser>
passwd <NewUser>


login as <NewUser> and obtain Hercules

login as root in your vps and run these commands:

or you can use "su" command

Code:
mysql --user=root
CREATE DATABASE ragnarok2;
CREATE DATABASE log2;
// To grant access for your localhost
CREATE USER '<your_new_db_user>'@'localhost' IDENTIFIED BY '<your_new_db_pass>';
GRANT ALL ON `ragnarok2`.* TO '<your_new_db_user>'@'localhost';
GRANT ALL ON `log2.* TO '<your_new_db_user>'@'localhost';
// To grant access for your webhost
CREATE USER '<your_new_db_user>'@'<your webhost>' IDENTIFIED BY '<your_new_db_pass>';
GRANT ALL ON `ragnarok2`.* TO '<your_new_db_user>'@'<your webhost>';
GRANT ALL ON `log2`.* TO '<your_new_db_user>'@'<your webhost>';
FLUSH PRIVILEGES;
exit

cd ~/home/<NewUser>/Hercules2/sql-files/
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < main.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db2.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db2.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db2.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> log2 < logs.sql
// add renewal db if you are running renewal
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db_re.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db2_re.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db_re.sql
mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db_re.sql
// add administrator
mysql --user=root
use ragnarok2;
INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`,`group_id`) VALUES ('2000000', '<admin username>', '<admin_pass>', 'M','[email protected]',99);
 
Last edited by a moderator:
Back
Top