Jump to content
  • 0
Sign in to follow this  
wallaby

Running 2 Servers on 1 Host?

Question

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!

Edited by wallaby

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You can change the PORT, it will not conflict

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"
                }
}

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites
  • 0

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

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);

Edited by astralprojection

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.