StendhalLocalhostServerOnLinux: Difference between revisions

Content deleted Content added
imported>Hendrik Brummermann
imported>Kribbel
m link for skipping
 
(32 intermediate revisions by 5 users not shown)
Line 1:
{{Navigation for Stendhal Top|Building & Hosting}}
 
This guide applies to:
*Marauroa 23.10 and above
*Stendhal 0.65.595 and above
<br>
= Setting up a localhost server =
Line 9 ⟶ 11:
*Command-line access ''(ask system administrator if it's a problem)''
 
For '''easy''' H2 database configuration (which is shipped with Stendhal and is installation-free) just skip straight to '''[[StendhalLocalhostServerOnLinux#Choosing_the_Java_Virtual_Machine|Choosing the Java Virtual Machine]]'''.
 
For '''advanced''' MySQL configuration, keep reading.
Line 43 ⟶ 45:
 
== Choosing the Java Virtual Machine ==
Stendhal works with OpenJDK or SunOracle Java, you will need Java 57 or greater.
 
For Sun Java: Use your Package manager to download '''OpenJDK 67''' or SunOracle Java 1.57 or greater version. At a command line, type
java -version
and if you see anything other than the new java you just installed, then you need to update the java used. At a command line, type
Line 51 ⟶ 53:
(using sudo if you are an ubuntu user, or as root if you are another linux user) which should give you output something like this:
 
*''java-1.57.0-sunoracle 53 /usr/lib/jvm/java-1.57.0-sunoracle''
*''java-gcj 1042 /usr/lib/jvm/java-gcj''
*''java-67-openjdk 1061 /usr/lib/jvm/java-67-openjdk''
 
now, lets say you want to use the ''java-67-openjdk''. Then you type
update-java-alternatives --set java-67-openjdk
Now run
java --version
again to check it worked.
 
Line 107 ⟶ 109:
*RSA key size- This is to make sure that the login information is valid and secure.
'''Warning:''' Any value for the RSA key generation smaller than 512 may cause the server not to work properly and refuse the client connections.
 
Download a recent mysql-connector.jar from the [https://dev.mysql.com/downloads/connector/j/ MySQL site].
 
Well, thats everything! When it's finished, you'll have a new file, "server.ini". Don't lose it, as it contains the information to get your server up & running, as well as the key to do that. If Marauroa won't start, and nor will your server, check to see if that INI file is there (at the same directory! NOWHERE ELSE!) and if it is not, try running the runserver.sh script again; the file could have changed when updating the RSA keys
Line 132 ⟶ 136:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
</pre>
 
''<span style="color:red;">DEPRECATED:</span> "log4j.jar" is now intended to be located in "libs" directory''
 
Please open runserver.sh in a text editor. You'll see the classpath defined there, something like
LOCALCLASSPATH=.:data/script/:data/conf/:stendhal-server-$STENDHAL_VERSION.jar:marauroa.jar:mysql-connector.jar:log4j.jar:commons-lang.jar