Welcome to the [LJC] Forum. Forum Index Welcome to the [LJC] Forum.
Clan Discussions, Linux Help, WineX Help, and more!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting up JEDI OUTCAST/ACADEMY Linux Server

 
Post new topic   Reply to topic    Welcome to the [LJC] Forum. Forum Index -> WineX/Wine Information
View previous topic :: View next topic  
Author Message
[LJC]the1
Site Admin


Joined: 30 Jan 2003
Posts: 1011
Location: Los Angeles, CA.

PostPosted: Thu Nov 11, 2004 2:23 pm    Post subject: Setting up JEDI OUTCAST/ACADEMY Linux Server Reply with quote

HOWTO: (copy/paste from one of my other posts)

1. First make an linux account where your server will run from, as root type:
Code:

useradd bob
passwd bob
 <enter pass>
 <verify pass>


Next, create a directory in that user's home location where we will setup the JK2/JKA server.

So login as user "bob" and type in:

Code:
 mkdir ~/Server


If you have done that, you should have this location: /home/bob/Server

2. We need to load all the needed server binaries now, giving you got the latest server patches. If not, download the proper file:
Jedi Academy: http://linuxfusion.net/downloads/jalinuxded_1.011.zip
or...
Jedi Outcast: http://linuxfusion.net/downloads/jk2linuxded104.zip

Once download is done, unzip the file INSIDE the "Server" directory.

Code:

for Jedi Academy:
unzip jalinuxded_1.011.zip

or for Jedi Outcast:

unzip jk2linuxded104.zip 


>>>>> Now, COPY ALL the PK3 files from your game installation in to the "base" directory <<<<<<

3. Make sure that the libcxa.so.1 file is in your lib list, which should be located in

Code:
 /usr/lib/libcxa.so.1


.... if you need to move that file there, make sure u do it as root.. and later, add proper permitions to it as well.

Code:
 chmod a+r /usr/lib/libcxa.so.1


...also, we need to make the jk2ded or linuxjampded file executable:

Code:
 chmod a+x /home/bob/Server/linuxjampded


4. Make sure you are still logged in as "bob" (your user) not root, and edit your server.cfg to your likings.

After doing so, I recommend you test the server "as is" right now, so start it with a command similar to this:

Code:
 Jedi Academy:
./linuxjampded +exec server.cfg

or Jedi Outcast:
./jk2ded +exec server.cfg


The server should start succesfully at this point and register a heart beat with the raven master server. If the master server fials you will configure your firewall to open all the proper server ports. If it failes to start, note the error... redo all the steps above and try again. Make sure you running it all as bob and that bob has permitions to all the files including the assets files.

(Step 5, 6, and 7 are only for installing the academy MOD for Jedi Outcast)
5. Installing the mods is easy. First, get the mod. MAKE SURE you are getting the correct mod. After the download, unzip it INSIDE of the "Server" dir. This should give you new files sich as this:

Code:
 /Server/academy/academy.cfg
/Server/academy/banIP.dat
/Server/academy/description.txt 
/Server/academy/dummy.pk3 
/Server/academy/jk2logbackup.pl 
/Server/academy/vm/jk2mpgame.qvm


6. Make proper changes to the academy.cfg file. Also, add this to the end of your server.cfg

Code:
 exec academy.cfg


7. Lets give the server a try. You can start the new server with the mod thru this command:

Code:
 ./jk2ded +exec server.cfg +set fs_game academy


...the server should start and ya should be on you way to some gaming.


=============================================================
Some Notes:
It might be a bit tricky if you setting up this server behind a router (such as linksys etc..) because you might be required to open incoming/outgoing ports for the server to reach the public. Also, make sure your linux firewall (if u have any) allows the JK2 ports to come in and out.

Hope this helps.

Peace.
_________________
http://www.linuxfusion.net rocks your face!
Back to top
View user's profile Send private message Visit poster's website AIM Address
RadMaN



Joined: 20 May 2004
Posts: 805

PostPosted: Sat Apr 25, 2009 5:43 am    Post subject: Reply with quote

Just to add to it... Startup Script!!

For Redhat machines, put this in /etc/init.d

Then

Code:

chmod +x /etc/init.d/jkastartupscript
chkconfig --add jkastartupscript
chkconfig --levels 35 jkastartupscript on


Please read the comment to be sure you understand not to run as root and that only this instance of the JKA server is running as the chosen user. If you run this as root, you will kill everything. I was lazy...

If you want, you can just grep the process ID and kill it or store the pid when you start it. I prefer just killing everything in the user Very Happy

Code:

#!/bin/bash
#
# chkconfig: 35 20 80
# description: JKA Startup Script
# -k start/stop/restart
# Andrew Moulton -- RadMaN
# Assumes you run this as a user other than root, and only this one instance of the JKA server is running as user


#source function library
. /etc/init.d/functions

RUN_AS_USER=JKA
JKA_LOCATION=/home/JKA/jkaserver
JKA_BASE=$JKA_LOCATION/base

#Looks for config file in $JKA_BASE
JKA_CONFIG_NAME=yourserverconfig.cfg

LOG_FILE=/home/JKA/yourserverconfig.log


start() {
        echo "Starting JKA Server: "
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "cd ${JKA_LOCATION} && nohup ./linuxjampded +exec ${JKA_CONFIG_NAME} > ${LOG_FILE} &"
        else
          cd ${JKA_LOCATION} && nohup ./linuxjampded +exec ${JKA_CONFIG_NAME} > ${LOG_FILE} &
        fi
        echo
}
stop() {
        echo "Shutting down JKA Server: "
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "kill -9 -1"
        else
          kill -9 -1
        fi
        echo
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  *)
        echo $"Usage: $0 {start|stop}"
        exit 1
esac

exit



This will start your server as a service when your Linux box starts. You can also run it manually either by doing "/etc/init.d/jkaserver start" or "service jkaserver start"
_________________
Back to top
View user's profile Send private message AIM Address
RadMaN



Joined: 20 May 2004
Posts: 805

PostPosted: Wed Apr 29, 2009 6:01 pm    Post subject: Reply with quote

Note, to get the server to restart if it crashes or is shut down, run another script that puts it in a while loop.
_________________
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Welcome to the [LJC] Forum. Forum Index -> WineX/Wine Information All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Space Pilot 3K template by Jakob Persson.
Powered by phpBB © 2001 phpBB Group