StendhalLocalhostServerOnLinux: Difference between revisions

Content deleted Content added
imported>Kiheru
Setting up a localhost server: removed a missleading note about marauroa in the needed packages; it should be in the server zip
imported>Kymara
fixes. sorry too tired to summarise. please see diffs..
Line 44:
then you need to login to mysql as the root mysql user, who should have 'grant' access. As root you can then try
grant all on marauroa.* to 'FOO'@'localhost' identified by 'BAR';
again.
 
== Note for Slackware users: ==
 
If when you try to run the server later, you get this error in the log:
Caused by: java.net.ConnectException: Connection refused
 
Type:
 
ps xa | grep mysqld
 
If it shows that mysqld is running with the option "--skip-networking" then comment it out in the "my.cnf" file (It has been reported that the line to comment out is actually: SKIP="--skip-networking", found at: /etc/rc.d/rc.mysqld ).
 
If you have already commented it out then perhaps you have previously started the server with:
 
#/etc/rc.d/rc.mysqld start
 
Stop the server and then restart with:
 
mysqld_safe &
 
Check with:
 
ps xa | grep mysqld
 
that no "--skip-networking" is present.
 
Then run the stendhal server again.
 
(Many thanks to Tam Tam. Original source: http://forums.mysql.com/read.php?39,24742,147169#msg-147169 )
 
= Makin' the cake =
Line 89 ⟶ 60:
This will create a directory called "stendhal_server" in your home directory. See how easy that was? And how easy to tell what will be in that directory? That's the beauty of organization.
 
== Marauroa and Stendhal: Movingserver time!files ==
Unzip the stendhal server zip which you downloaded, into the stendhal_server directory.
 
Line 105 ⟶ 76:
*commons-lang.jar
 
... or in a directory called ''lib'' or ''libs'' inside the stendhal_server directory. If any are in ''lib'' or ''libs'' please move them up into the main stendhal_server directory.
If any of the latter jars are missing you can fetch them here: http://arianne.cvs.sourceforge.net/arianne/stendhal/libs/
Done!
 
'''Note<small>If aboutany marauroa.jar''':of Ifthe latter jars are missing you takecan thefetch marauroa.jarthem straight fromhere: http://arianne.cvs.sourceforge.net/arianne/stendhal/libs/ then get the one which is tagged for the release of stendhal you're using. If you're not sure about this, there is a lengthier way ...</small>
Done!
You can instead download the marauroa.zip from http://arianne.sourceforge.net/?arianne_url=servers/server_marauroa#downloadsection and extract just the jar file. The jar file might be called marauroa-Y.YY.jar so please rename to just marauroa.jar
 
== MySQL & Marauroa: Let the 2 be one ==
Line 129 ⟶ 99:
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, try running the GenerateINI command again; the file could have change with updating the RSA keys
 
== Starting MarauroaServer ==
To start Marauroa,the simplystendhal openserver thethere marauroadis a script runserver.sh file in the stendhal_server directory with Marauroa - you may need to make it executable first.
So
cd /path/to/stendhal_server
To make it executable, in a command prompt type
chmod u+x /path/to/marauroadrunserver.sh
To start it from a command prompt, type
./runserver.sh
cd /path/to/
 
./marauroad
where /path/to/ is the path to the directory in which Marauroa is installed.
 
== Have fun ==
Well, that's it! Just follow the previous steps under ''Starting Marauroa'' to start the server. Pretty easy, huh? Check out the troubleshooting and extras sections for more things to do.
 
= Extras =
This is the extras section! Here you have trouble shooting, and hints & tips
== Troubleshooting ==
PleaseIn general please see [[StendhalServerTroubleShooting]].
 
=== Class not found exceptions ===
For example:
<pre>
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
</pre>
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
 
In this case the user had his log4j.jar in the folder called ''libs'' but the classpath expects it to be in the main folder where runserver.sh ran from. So you can: edit the classpath, replacing ''log4j.jar'' above with ''libs/log4j.jar'' '''or''' move the file.
 
=== Note for Slackware users: ===
 
If when you try to run the server later, you get this error in the log:
Caused by: java.net.ConnectException: Connection refused
 
Type:
 
ps xa | grep mysqld
 
If it shows that mysqld is running with the option "--skip-networking" then comment it out in the "my.cnf" file (It has been reported that the line to comment out is actually: SKIP="--skip-networking", found at: /etc/rc.d/rc.mysqld ).
 
If you have already commented it out then perhaps you have previously started the server with:
 
#/etc/rc.d/rc.mysqld start
 
Stop the server and then restart with:
 
mysqld_safe &
 
Check with:
 
ps xa | grep mysqld
 
that no "--skip-networking" is present.
 
Then run the stendhal server again.
 
(Many thanks to Tam Tam. Original source: http://forums.mysql.com/read.php?39,24742,147169#msg-147169 )
 
== Server bonuses ==