InstallingStendhal: Difference between revisions
imported>Zzorn No edit summary |
imported>Hendrik Brummermann added navigation menu |
||
| (194 intermediate revisions by 12 users not shown) | |||
| Line 1: | Line 1: | ||
{{Navigation for Stendhal Top|Building & Hosting}} |
|||
| ⚫ | |||
This is a generic guide. You may prefer a specific installation guide for [[Easy_Stendhal_Server Installation_On_Windows|Windows]] or [[StendhalLocalhostServerOnLinux|Linux]] |
|||
| ⚫ | |||
__toc__ |
|||
| ⚫ | |||
The server files are available as a .zip. |
|||
| ⚫ | |||
* Go to [http://arianne.sourceforge.net/?arianne_url=games/game_stendhal#downloadsection download files] and download stendhal-server-{{version}}.zip |
|||
* Save |
|||
* Extract |
|||
== |
== Configure server == |
||
From where you extracted the files to, type command: |
|||
java -cp stendhal-server-{{version}}.jar games.stendhal.server.core.engine.GenerateINI |
|||
Download Maraurora from http://www.arianne.cx/ |
|||
or check out the cvs version and build it. |
|||
For easy H2 database configuration just hit enter to accept each default and skip straight to [[InstallingStendhal#Start_the_server|Start the server]]. |
|||
For MySQL configuration (advanced): |
|||
| ⚫ | |||
<small> |
|||
*Which database system do you want to use? write mysql (mysql) |
|||
*database name, hit enter to use the default (marauroa) |
|||
*host, hit enter to use the default (localhost) |
|||
*user, write the username you used in giving MySQL permissions (FOO) |
|||
*password, write the password you used giving MySQL permissions (BAR) |
|||
*port, anything above 1024. 32160 is the default for stendhal, but it can be anything above 1024 |
|||
*game, type "stendhal" (or a number for that, if a multiple-choice menu appears) |
|||
*turn time, or how long the server takes to process each event, choose anything above 200, but below 1000. This is in milliseconds. default is 300 |
|||
*log and stats generation logs, use the default ("./") - it's in the same directory as everything else |
|||
*RSA key size, choose anything smaller than 1024 bits, but greater than 512 (or equal to). This is to make sure that the login information is valid and secure. Like the prompt says, anything greater than 1024 can take a LONG time. But, if you have ~30 minutes to spare (more or less, depending on your comp), you could use the extra security.</small> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
'''You only need to do this if you chose the advanced MySQL option, not H2''' |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
'''You only need to do this if you chose the advanced MySQL option, not H2''' |
|||
| ⚫ | |||
| ⚫ | |||
== Create a MySql user and database for the game == |
|||
| ⚫ | |||
Run the sql client (bin/mysql.exe on the windows noinstall package). |
|||
Paste the following lines to the prompt that opens: |
|||
=== Configure MySQL (optional) === |
|||
| ⚫ | |||
Read at [[InitialStepsWithMarauroa#Configuration|Marauroa configuration]] how to create a database which matches the options given in the configuration file server.ini which you made above. |
|||
| ⚫ | |||
The mysql command is: |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
It should produce output similar to this: |
|||
Now start marauroa server by running runserver.bat, or runserver.sh, or |
|||
java -jar stendhal-server-{{version}}.jar |
|||
Welcome to the MySQL monitor. Commands end with ; or \g. |
|||
Your MySQL connection id is 1 to server version: 4.1.10 |
|||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
|||
mysql> create database stendhal; |
|||
Query OK, 1 row affected (0.03 sec) |
|||
mysql> grant all on stendhal.* to testuser@localhost identified by 'testpass'; |
|||
Query OK, 0 rows affected (0.00 sec) |
|||
mysql> |
|||
== See also == |
|||
* [[StendhalServerTroubleShooting|Trouble shooting]] |
|||
== Edit the Marauro ini file == |
|||
* [[StendhalPublicServer|Host an online Stendhal server]] |
|||
Fill in the correct values for the database related fields in the marauroa.ini file. |
|||
== Copy Stendhal to the Maraurora classpath == |
|||
For example copy the stendhal jar to the same folder where the compiled code for Maraurora is. |
|||
| ⚫ | |||
Run the maraurora.bat file (or create an equivalent shell script if in unix). |
|||
<br> |
|||
<br> |
|||
<br> |
|||
---- |
|||
[[Stendhal | Back to stendhal main wiki page]] |
|||
| ⚫ | |||
[[Category:Stendhal]] |
|||
TODO: We need a bat file or such for starting the client. |
|||
Latest revision as of 17:03, 16 February 2012
This is a generic guide. You may prefer a specific installation guide for Windows or Linux
Download Stendhal server
The server files are available as a .zip.
- Go to download files and download stendhal-server-1.48.zip
- Save
- Extract
Configure server
From where you extracted the files to, type command:
java -cp stendhal-server-1.48.jar games.stendhal.server.core.engine.GenerateINI
For easy H2 database configuration just hit enter to accept each default and skip straight to Start the server.
For MySQL configuration (advanced):
- Which database system do you want to use? write mysql (mysql)
- database name, hit enter to use the default (marauroa)
- host, hit enter to use the default (localhost)
- user, write the username you used in giving MySQL permissions (FOO)
- password, write the password you used giving MySQL permissions (BAR)
- port, anything above 1024. 32160 is the default for stendhal, but it can be anything above 1024
- game, type "stendhal" (or a number for that, if a multiple-choice menu appears)
- turn time, or how long the server takes to process each event, choose anything above 200, but below 1000. This is in milliseconds. default is 300
- log and stats generation logs, use the default ("./") - it's in the same directory as everything else
- RSA key size, choose anything smaller than 1024 bits, but greater than 512 (or equal to). This is to make sure that the login information is valid and secure. Like the prompt says, anything greater than 1024 can take a LONG time. But, if you have ~30 minutes to spare (more or less, depending on your comp), you could use the extra security.
Install MySQL (optional)
You only need to do this if you chose the advanced MySQL option, not H2 Download the appropriate MySQL install package from http://dev.mysql.com/downloads/
Also download the java connector library from the same place (it's called "MySQL Connector/J" ), unzip it, and make sure it is on the classpath when running maraurorad later. You can save this download if you get compiled version of Marauroa.
Start MySQL (optional)
You only need to do this if you chose the advanced MySQL option, not H2 Refer to the MySQL installation documentation for details.
If you used the noinstall package, you can run bin/mysqld.exe.
Make sure to edit the configuration files to disallow external access if you are just going to use it for local testing, or simply use a firewall to block external access to the database.
Configure MySQL (optional)
Read at Marauroa configuration how to create a database which matches the options given in the configuration file server.ini which you made above. The mysql command is:
create database marauroa; grant all on marauroa.* to 'FOO'@'localhost' identified by 'BAR';
Start the server
Now start marauroa server by running runserver.bat, or runserver.sh, or
java -jar stendhal-server-1.48.jar
See also