Author Topic: Guide To Setting Up A Server On A MAC  (Read 106897 times)

HotSoup

  • Posts: 19
  • Turrets: +2/-0
Guide To Setting Up A Server On A MAC
« on: April 01, 2007, 12:20:44 am »
Ok, so I realized that there are a lot of you guys that have MACs and there's really no guide that tells how to make a server on a MAC. Thus, I have decided to make one. I'm not some Pro-Gamer/Pro-Coder, but I eventually figured this shit out, so here we go.


Go to "Applications", then "Utilities", and then finally, "Terminal"

Once it's opened, copy and paste the follow commands, and press enter after each command...

Code: [Select]
mkdir -p ~/Library/Application\ Support/Tremulous/base/vm
Code: [Select]
cd ~/Library/Application\ Support/Tremulous/base/vm
Code: [Select]
curl -O http://tjw.org/tremulous/game.qvm
Code: [Select]
curl -O http://tjw.org/tremulous/mac/tremded.ub
Code: [Select]
chmod a+x tremded.ub

The next step, 6, can be tricky if you don't exactly know where tremulous is installed. If you don't know where, go to spotlight, type in Tremulous, and when the little Tyrant w/ sunglasses icon comes up, right-click on it, and then click "Get Info". Under the tab "General Info" it says "where" followed by a /list/of/things/with/slashes/ect. This is where tremulous is installed

For step six you need to type the following...

Code: [Select]
cp tremded.ub /the/place/where/tremulous/is/installed

the "/the/place/where/tremulous/is/installed" is what it says under "where" in the "get info" for Tremulous.

For example, on my computer, I installed Tremulous to the Applications folder, so I would type

Code: [Select]
cp tremded.ub /Applications/Tremulous

and then I would press enter.

The next time 7 is similar, the command you enter is

Code: [Select]
cd /the/place/where/tremulous/is/installed

Once, again, its the same place you typed in the last command.

Code: [Select]
cp Tremulous.app/Contents/MacOS/libSDL-1.2.0.dylib .
Code: [Select]
./tremded.ub +set dedicated 2 +exec server.cfg

Ok, there you go, then your server should be up and running! That's how to get it started.

Now close the terminal and quit the process.

Next, in the "Base" folder where tremulous is installed, there is file called "server.cfg"

Right click the file, and select "Open With..." and choose the program "text edit"

This is where you are able to set how many players, the name of your server, /rcon password, ect.

For example, to have a server named "Mac OS X Server" that displays the link for Apple.com when it loads, starts on the map ATCS, has a 16 player max limit, SD is at 35 and game time limit is 55 WITH an /rcon password "butter" the text would look like this...

Observe where it says everything, you change most of the stuff by entering different positive integers.

Code: [Select]
set sv_pure 0

//passwords
set g_needpass 0
//set g_password password   //server password
set rconPassword butter

//loading screen
set sv_hostname "Mac OS X Server"
set g_motd "www.apple.com"

//disallow downloads from the server
set sv_allowdownload 0

//maximum number of clients
//greater than 24 is not recommended from a gameplay point of view
set sv_maxclients 16

//after 35 minutes, all build points are removed
set g_suddenDeathTime 35
//after 55 minutes, the game will end as a draw
set timelimit 55

//forces each team to have a similar number of players
set g_teamForceBalance 1

//following the first map, start this rotation
set g_initialMapRotation rotation1

//misc settings
set pmove_fixed     0
set sv_minRate      5000
set sv_maxRate      15000
set sv_minSnaps     10

//start this map first
map atcs


To change these, all you do is replace the values or name within the quotations.

I'll do one more just so people can see where to change things exactly

This next server is named "L33T Server". It has a 24 max player with a time limit of 25 minutes, with SD at 15 minutes. The /rcon password is 1337. As the game loads, it says "I'm going to eat your children..." The server starts on the map Niveus

Code: [Select]
set sv_pure 0

//passwords
set g_needpass 0
//set g_password password   //server password
set rconPassword 1337

//loading screen
set sv_hostname "L33T Server"
set g_motd "I'm going to eat your children..."

//disallow downloads from the server
set sv_allowdownload 0

//maximum number of clients
//greater than 24 is not recommended from a gameplay point of view
set sv_maxclients 24

//after 15 minutes, all build points are removed
set g_suddenDeathTime 15
//after 25 minutes, the game will end as a draw
set timelimit 25

//forces each team to have a similar number of players
set g_teamForceBalance 1

//following the first map, start this rotation
set g_initialMapRotation rotation1

//misc settings
set pmove_fixed     0
set sv_minRate      5000
set sv_maxRate      15000
set sv_minSnaps     10

//start this map first
map niveus


Just so you don't get confused, look at the two, to see what exactly was changed and what didn't.

After you finish customizing your server, click "Save" and then quit.

Next is the admin.dat files to make administrators on your server.

Click on the following series of files

Finder--->Users--->YourComputerName--->Library--->Application Support--->Tremulous--->Base

Once you are here, keep this open, and then open the "text edit" in "Applications" folder. Save a blank file into the "base" folder you just found. Name the files "admin"

Once it is saved in that file, right click on it, and then click "Get Info"

Under the name and extension category highlight and erase it, and retype "admin.dat", when the message comes up to whether want to use .dat or .rtf, click the one with .dat.

Now all you have to do is open Terminal back up and type the following commands and press enter after each one.

Code: [Select]
cd /the/place/tremulous/is/installed

Code: [Select]
./tremded.ub +set dedicated 2 +exec server.cfg

You're server, fully customized is fully operational and up and running. Whenever you want to run your server, open Terminal and type the last two following commands.

The final step is going into your server, which should appear in the master list. Once you enter the game open console (that happens by pressing the "~" button next to the "1" and by typing the following, you can !setlevel yourself as the operator of the server, and you can be an administrator with !commands.

Code: [Select]
/rcon password !setlevel partofyourname 5

and then you should be admin!

And you can now have a fully operational server.

Notes
To close the server, simply close terminal, and quit the process.

Feel free to copy and paste my sample server.cfgs but I suggest that you change the /rcon password first, this way people can't !setlevel themself.

Some problems...

If your server does not appear in the master list, but instead the LAN list, this means you either

A. Have to change your firewall settings

or

B. You are on a network and need to set up port forwarding with your main router

How to fix this is all situational towards what type of router and system you have. If this is the case, I suggest Google-ing it!

I hope this works, any MAC-heads out there, please tell me if something needs to be changed!
^1Hot^7Soup~

Stunt

  • Posts: 42
  • Turrets: +0/-2
Guide To Setting Up A Server On A MAC
« Reply #1 on: April 01, 2007, 09:14:41 am »
Thank you for this!

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Guide To Setting Up A Server On A MAC
« Reply #2 on: April 01, 2007, 06:21:22 pm »
Quote from: "HotSoup"
If your server does not appear in the master list, but instead the LAN list, this means you either

A. Have to change your firewall settings

or

B. You are on a network and need to set up port forwarding with your main router

How to fix this is all situational towards what type of router and system you have. If this is the case, I suggest Google-ing it!

I dispute this. My server shows up on my LAN list (I connect to it through port 30720 locally) but it shows up on other people's Internet lists (they connect through some other crazy port that I can't really work out). This is down to a router setting called universal Plug and Play, which sorts out port forwarding perfectly for everyone, as if by magic. I appreciate though that for most setups, you're probably right.
(I seriously don't understand it, but your server appearing in the local list doesn't necessarily mean it's not working. Ask someone far far away to connect for confirmation).
benmachine

HotSoup

  • Posts: 19
  • Turrets: +2/-0
Guide To Setting Up A Server On A MAC
« Reply #3 on: April 01, 2007, 10:53:57 pm »
yea I've had a number of people try to connect to the server when it comes up as LAN, didn't work for them though, oh well.
^1Hot^7Soup~

n00b pl0x

  • Posts: 2412
  • Turrets: +55/-168
Guide To Setting Up A Server On A MAC
« Reply #4 on: April 01, 2007, 11:02:05 pm »
holy crap. that guide makes me really really glad i have windows.
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Guide To Setting Up A Server On A MAC
« Reply #5 on: April 01, 2007, 11:39:49 pm »
Windows isn't much different, except that your trem server will suck.
Code: [Select]
Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\
NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg

n00b pl0x

  • Posts: 2412
  • Turrets: +55/-168
Guide To Setting Up A Server On A MAC
« Reply #6 on: April 02, 2007, 12:46:06 am »
actually, no.

windows you install tremded.exe to where trem is, the game.qvm into base/vm, and a sample server.cfg. edit the server.cfg the way you want it, then type cmd into run and type cd c:\program files\tremulous then tremded.exe +set dedicated 2 +exec server.cfg

and you have a server...
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

HotSoup

  • Posts: 19
  • Turrets: +2/-0
Guide To Setting Up A Server On A MAC
« Reply #7 on: April 02, 2007, 02:19:32 am »
...which is exactly what my guide does. It just goes into detail.
^1Hot^7Soup~

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Wow, this is frustrating!
« Reply #8 on: April 21, 2007, 02:53:09 am »
A few nights ago, my server was up and on running on the INTERNET list.  The next day, after I had to quit Terminal overnight, my server wouldn't show up on the INTERNET list, only the LAN list.  The only changes I had made were adding some commands to admin.dat, and trying to figure out a maprotation file.  I tried deleting ever server file I had (except autogen.cfg and server.cfg).  Then I followed the instructions from tjw.org/tremulous/SETUP.txt (which are also on the first post of this thread).  It still won't show up on the INTERNET list.  HELP!
Computers are like air conditioners...they work until you open Windows!

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Re: Wow, this is frustrating!
« Reply #9 on: April 21, 2007, 09:51:13 am »
Quote from: "GrooveMachine"
A few nights ago, my server was up and on running on the INTERNET list.  The next day, after I had to quit Terminal overnight, my server wouldn't show up on the INTERNET list, only the LAN list.  The only changes I had made were adding some commands to admin.dat, and trying to figure out a maprotation file.  I tried deleting ever server file I had (except autogen.cfg and server.cfg).  Then I followed the instructions from tjw.org/tremulous/SETUP.txt (which are also on the first post of this thread).  It still won't show up on the INTERNET list.  HELP!


Sorry dude, my crystal ball is broken.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Wow, this is frustrating!
« Reply #10 on: April 21, 2007, 01:23:17 pm »
Quote from: "GrooveMachine"
A few nights ago, my server was up and on running on the INTERNET list.  The next day, after I had to quit Terminal overnight, my server wouldn't show up on the INTERNET list, only the LAN list.  The only changes I had made were adding some commands to admin.dat, and trying to figure out a maprotation file.  I tried deleting ever server file I had (except autogen.cfg and server.cfg).  Then I followed the instructions from tjw.org/tremulous/SETUP.txt (which are also on the first post of this thread).  It still won't show up on the INTERNET list.  HELP!

My guess is, something other than the things you mentioned changed overnight. For example, if you had port forwarding set up to that computer before, it's possible that the local IP of your machine changed and so the ports are no longer being forwarded to the server.
benmachine

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Guide To Setting Up A Server On A MAC
« Reply #11 on: April 22, 2007, 11:32:03 pm »
Yeah, I hink you're probably right.  How could I fix those?
Computers are like air conditioners...they work until you open Windows!

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Guide To Setting Up A Server On A MAC
« Reply #12 on: April 23, 2007, 01:19:00 am »
We don't know what the problem is, so cant help you.
Like next_ghost said, we don't have a crystal ball.

If you post logs and the server IP and all the other needed info, then people might be able to help.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

stalefries

  • Posts: 169
  • Turrets: +2/-0
    • http://stalefries.googlepages.com
Guide To Setting Up A Server On A MAC
« Reply #13 on: April 27, 2007, 06:41:33 pm »
Thanks for the guide, worked fine as soon as I realized I had to put the files in my home folder's Aplication Support folder, not the system-wide one.
color=green]:[/color]nac:stalefries
My boring website that you hate | GRAAAAGHH!

fredfredburger

  • Posts: 4
  • Turrets: +0/-0
What ports do the server use?
« Reply #14 on: May 04, 2007, 04:08:34 pm »
What ports the server use?

AKAnotu

  • Posts: 616
  • Turrets: +7/-9
Guide To Setting Up A Server On A MAC
« Reply #15 on: May 10, 2007, 02:21:51 am »
i'm having some problems, my server's not showing up. heres a copy+paste of my terminal
Code: [Select]
Last login: Wed May  9 20:05:00 on ttyp1
Welcome to Darwin!
[172:~] graham% mkdir -p ~/Library/Application\ Support/Tremulous/base/vm
[172:~] graham% cd ~/Library/Application\ Support/Tremulous/base/vm
[172:Tremulous/base/vm] graham% curl -O http://tjw.org/tremulous/game.qvm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  503k  100  503k    0     0  73252      0  0:00:07  0:00:07 --:--:-- 83864
[172:Tremulous/base/vm] graham% curl -O http://tjw.org/tremulous/mac/tremded.ub
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  3 7559k    3  228k    0     0  61371      0  0:02:06  0:00:03  0:02:03 67695ch  4 7559k    4  314k    0     0  66873      0  0:01:55  0:00:04  0:01:51 72226
100 7559k  100 7559k    0     0  79282      0  0:01:37  0:01:37 --:--:-- 83218
[172:Tremulous/base/vm] graham% chmod a+x tremded.ub
[172:Tremulous/base/vm] graham% cp tremded.ub /Users/graham/Desktop/games/Tremulous 20060704
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory
[172:Tremulous/base/vm] graham% cd /Users/graham/Desktop/games/Tremulous 20060704
tcsh: cd: Too many arguments.
[172:Tremulous/base/vm] graham% cp Tremulous.app/Contents/MacOS/libSDL-1.2.0.dylib .
cp: Tremulous.app/Contents/MacOS/libSDL-1.2.0.dylib: No such file or directory
[172:Tremulous/base/vm] graham% ./tremded.ub +set dedicated 2 +exec server.cfg
dyld: Library not loaded: @executable_path/libSDL-1.2.0.dylib
  Referenced from: /Users/graham/Library/Application Support/Tremulous/base/vm/./tremded.ub
  Reason: image not found
Trace/BPT trap
[172:Tremulous/base/vm] graham% cd /the/place/tremulous/is/installed
tcsh: /the/place/tremulous/is/installed: No such file or directory.
[172:Tremulous/base/vm] graham% cd /Users/graham/Desktop/games/Tremulous 20060704
tcsh: cd: Too many arguments.
[172:Tremulous/base/vm] graham% ./tremded.ub +set dedicated 2 +exec server.cfg
dyld: Library not loaded: @executable_path/libSDL-1.2.0.dylib
  Referenced from: /Users/graham/Library/Application Support/Tremulous/base/vm/./tremded.ub
  Reason: image not found
Trace/BPT trap
[172:Tremulous/base/vm] graham%


my server.cfg:
Code: [Select]

set sv_pure 0

//passwords
set g_needpass 0
//set g_password password   //server password
set rconPassword nice try :)

//loading screen
set sv_hostname "Test-do not join"
set g_motd "don't join"

//disallow downloads from the server
set sv_allowdownload 0

//maximum number of clients
//greater than 24 is not recommended from a gameplay point of view
set sv_maxclients 16

//after 35 minutes, all build points are removed
set g_suddenDeathTime 35
//after 55 minutes, the game will end as a draw
set timelimit 55

//forces each team to have a similar number of players
set g_teamForceBalance 1

//following the first map, start this rotation
set g_initialMapRotation rotation1

//misc settings
set pmove_fixed     0
set sv_minRate      5000
set sv_maxRate      15000
set sv_minSnaps     10

//start this map first
map atcs
[/code]

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Guide To Setting Up A Server On A MAC
« Reply #16 on: May 10, 2007, 04:58:33 pm »
Quote from: "AKAnotu"
Code: [Select]
... lots of commands with wrong arguments ...


Can you read or do I have to mark you the error messages so you can find them? :roll:
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Guide To Setting Up A Server On A MAC
« Reply #17 on: May 10, 2007, 07:49:07 pm »
In order to cd to a path containing a space you need to either enclose the path in "these" or escape the space with a\ backslash.
So
Code: [Select]
cd /Users/graham/Desktop/games/Tremulous 20060704
becomes
Code: [Select]
cd /Users/graham/Desktop/games/Tremulous\ 20060704
cd "/Users/graham/Desktop/games/Tremulous 20060704"

either will do.

next_ghost: this post did not give me cancer. Being nice isn't so hard, really. Being quiet is even easier. Try one.
benmachine

AKAnotu

  • Posts: 616
  • Turrets: +7/-9
Guide To Setting Up A Server On A MAC
« Reply #18 on: May 10, 2007, 09:55:40 pm »
thanks. i use a mac. i normally don't have to crawl through code. just because i have no idea why theres an argument with tremded not being a picture or whatever, doesn't mean you have to flame. :advmarauder:

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Guide To Setting Up A Server On A MAC
« Reply #19 on: May 10, 2007, 10:20:28 pm »
Quote from: "AKAnotu"
thanks. i use a mac. i normally don't have to crawl through code. just because i have no idea why theres an argument with tremded not being a picture or whatever, doesn't mean you have to flame. :advmarauder:


3 hints for you:
1) Tab is a very useful key, try using it in command line
2) UNIX programs ussually say something only when they have a problem, if they do, then read it! It's not code but simple error message.
3) New Macs are UNIX-based
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Samurai.mac

  • Posts: 317
  • Turrets: +18/-17
Guide To Setting Up A Server On A MAC
« Reply #20 on: August 13, 2007, 05:08:38 pm »
I'm fairly certain you could use Apple script to do all this for you, not quite sure how though, I've never actually used it to write something before.

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Guide To Setting Up A Server On A MAC
« Reply #21 on: August 13, 2007, 11:58:15 pm »
Hey, if you guys want to set up your server without typing a bit of code, check out my Mac Tremulous Server Setup  shell script, the aptly named "MacTremServ".  It comes with an install script, uninstall script, server start script, and server file cleanup script (for server file errors).  Check it out here:

http://www.divshare.com/download/1573978-90c

It's a 5.3MB download, and you'll want to run it from your Desktop (meaning if if download to your desktop, don't move any files/folders).  Give it a try--it should be perfectly stable (it's in its seventh version).  Also, I have a Tremulous.net board discussing it here:

http://tremulous.net/phpBB2/viewtopic.php?t=5751

Let me know what you would want added to it, and I'll try to include it in the next version.

-GrooveMachine
Computers are like air conditioners...they work until you open Windows!

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Re: Guide To Setting Up A Server On A MAC
« Reply #22 on: December 04, 2007, 12:42:03 am »
Hey, for those of you who are having trouble with MacTremServ, here's the fixed up version that shouldn't say permission denied (but if it DOES, READ THE README FILE).  Enjoy!

http://www.divshare.com/download/2990592-71b

-Groove
Computers are like air conditioners...they work until you open Windows!

rankok

  • Posts: 30
  • Turrets: +2/-6
Re: Guide To Setting Up A Server On A MAC
« Reply #23 on: December 10, 2007, 05:02:50 am »
my server dosnt show up in lan internet or favourites and tremulous wont turn on the screen goes black then it quits

rankok

  • Posts: 30
  • Turrets: +2/-6
Re: Guide To Setting Up A Server On A MAC
« Reply #24 on: December 10, 2007, 05:15:29 am »
how do u set it up so it appears in the lan list

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Re: Guide To Setting Up A Server On A MAC
« Reply #25 on: December 24, 2007, 08:42:03 pm »
Hey guys, after days of testing and fixing, MacTremServ is fully functional.  It truly works now.  I've used it on all of my computers with no problem.  It's the easiest way to get your server up and running.  Download here:

http://www.divshare.com/download/3161522-61d

Coming soon, MacTremServ will include options for modded servers and alternate QVMs.  It may be a while though, because that will require extensive testing and long hours of working.  Thanks for your patience!

-GrooveMachine
Computers are like air conditioners...they work until you open Windows!

Death On Ice

  • Posts: 1287
  • Turrets: +126/-141
Re: Guide To Setting Up A Server On A MAC
« Reply #26 on: December 26, 2007, 11:24:02 pm »
Quote from: GrooveMachine
...advertising...
::)

GrooveMachine

  • Posts: 66
  • Turrets: +1/-0
    • Mac Freeware site
Re: Guide To Setting Up A Server On A MAC
« Reply #27 on: December 27, 2007, 09:04:59 am »
Well, it is advertising in a sense, but I figured I might as well help them out by informing them of it :)
Computers are like air conditioners...they work until you open Windows!

hov

  • Posts: 1
  • Turrets: +0/-0
Help!!!
« Reply #28 on: March 06, 2008, 09:49:36 pm »
??? I followed the code and all in the guide but sometimes when i put the code into the terminal
the terminal says "error:there is no such file"(this usualy happens when there is a code that has "cd" in it).
And then when I try to find my server on the master list it doesnt show up.

can somebody please help me with this??
HOV!!!

Shturts

  • Posts: 13
  • Turrets: +1/-1
Re: Guide To Setting Up A Server On A MAC
« Reply #29 on: April 25, 2008, 12:15:31 am »
Kay, like rankok said, tremulous doesn't wanna open anymore, the screen goes black like it's loading, but then the black fades and it's back to desktop, help pl0x? =/
« Last Edit: April 25, 2008, 12:18:25 am by Shturts »