Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index
- Introduction
- Initial setup
- Installing the PR serverfiles
- Battlerecorder
- Administration - RealityAdmin and PRISM
- Reserved Slots
- Applying patches
- Starting the server
- Mumble
- FAQ
- Other useful information
- 1. Introduction
- Hi guys,
- Due to the massive changes introduced by PR v1.0, and now PR v1.3, we have decided to substantially rewrite the server installation guide, to ensure that getting a server up and running is the easiest it can be.
- 2. Initial setup
- First we will add a user for the PR Server, never run a server as root.
- $ sudo useradd pr
- We created a new user called "pr". Now we will create him a new home directory and give him the rights he needs.
- $ mkdir /home/pr
- $ chown -R pr /home/pr
- Set a new password (don't forget that)
- $ passwd pr
- Login as the new user
- $ su pr
- And if your default shell isn't bash I would recommend to use it
- $ chsh -s /bin/bash pr
- Finally switch to your new homedir
- $ cd /home/pr
- 3. Installing the PR serverfiles
- Beginning with PR v1.3, we no longer require the original BF2 server files, and so can start with the PR server files.
- You can obtain these from the Server License Control Panel of your listed Server Administrator, so grab them onto your personal machine.
- While they are downloading, we need some way to transfer them to your server, so:
- To transfer the files to the server we need to setup a file transfer connection. I am using WinSCP (on Windows) or Filezilla (on Linux) for that.
- Because Filezilla works on both operating system I will explain that.
- Download Filezilla there: FileZilla - Client Download and install that.
- The Filezilla interface should look like that:
- This image has been resized. Click this bar to view the full image. The original image is sized 900x750.
- Now click on "File" -> "Site Manager".
- Set it up like shown below just type in your username (probably pr)/password (the one we set up in the beginning) and IP:
- This image has been resized. Click this bar to view the full image. The original image is sized 624x438.
- Press connect.
- On the Local side of Filezilla navigate to the folder where you downloaded the PR server files (be sure the download is complete), on the remote side you should automatically be in /home/pr. Switch to your serverfolder (in my case "public").
- Now you can start the upload with rightclick on the serverfiles on Local site and press "Upload".
- $ cd /home/pr/public
- $ unzip prbf2_1.3.0.0_server.zip
- After the files are copied we can start with the basic configuration.
- The first file with important settings is located at
- public/mods/pr/settings/serversettings.con
- and the maplist at
- public/mods/pr/settings/maplist.con
- We will start with serversettings.con.
- Before you do ANY changes to that config file, please read the following thread:
- http://www.realitymod.com/forum/f109...ml#post1849836
- If you follow the rules your server will be perfectly set up for PRSpy.
- $ nano mods/pr/settings/serversettings.con
- Code:
- sv.serverName "[NEW] New Era Warfare [Mumble] GERMAN"
- sv.password ""
- sv.internet 1 // Don't forget to set that to 1
- sv.serverIP "217.114.210.182"
- sv.serverPort 16567
- sv.welcomeMessage "Welcome, join our PRMumble Channel!|Community TS3 (German): 87.118.93.60:9999|No Mainbaserape!|Assets: First come, first serve!|No Squads before 1:30!|visit us: http://www.newcommunity.eu/|contact via xfire: bloodydeed|use !r [playername] [reason] to report a player" // | is used for a line break
- sv.punkBuster 0 // We no longer recommend using PB
- sv.allowFreeCam 0 **
- sv.allowExternalViews 0 **
- sv.allowNoseCam 0 **
- sv.hitIndicator 0 **
- sv.maxPlayers 100 // The maximum player count
- sv.NumReservedSlots 0 // How many reserved slots you want (0 to deactivate it)
- sv.numPlayersNeededToStart 1 ** // You can't change this anyway
- sv.notEnoughPlayersRestartDelay 15 **
- sv.startDelay 15 **
- sv.endDelay 15 **
- sv.spawnTime 10 **
- sv.manDownTime 10 **
- sv.endOfRoundDelay 15 **
- sv.ticketRatio 100 **
- sv.roundsPerMap 1 **
- sv.timeLimit 0 **
- sv.scoreLimit 0 **
- sv.soldierFriendlyFire 100 **
- sv.vehicleFriendlyFire 100 **
- sv.soldierSplashFriendlyFire 100 **
- sv.vehicleSplashFriendlyFire 100 **
- sv.tkPunishEnabled 1 // Enable or disable the teamkill punish system
- sv.tkNumPunishToKick 3
- sv.tkPunishByDefault 0
- sv.votingEnabled 0 // Enable or disable voting
- sv.voteTime 90
- sv.minPlayersForVoting 1
- sv.gameSpyPort 29900
- sv.allowNATNegotiation 0
- sv.interfaceIP "0.0.0.0"
- sv.autoRecord 1 // See battlerecorder section below
- sv.demoIndexURL http://217.114.210.182/server/pr_public/demos/
- sv.demoDownloadURL http://217.114.210.182/server/pr_public/demos/
- sv.autoDemoHook "adminutils/demo/rotate_demo.exe" // See battlerecorder
- sv.demoQuality 10 // The quality of the battlerecorder
- sv.adminScript "prism" // Change this to prism, to enable PRISM on your server (Explained later)
- sv.timeBeforeRestartMap 30 **
- sv.autoBalanceTeam 0 // Turn it off since we use RealityAdmin
- sv.teamRatioPercent 100 **
- sv.coopBotRatio 50
- sv.coopBotCount 48
- sv.coopBotDifficulty 90
- sv.voipEnabled 0 // Disable voip, as we have mumble
- sv.voipQuality 3
- sv.voipServerRemote 0
- sv.voipServerRemoteIP "0.0.0.0"
- sv.voipServerPort 55125
- sv.voipBFClientPort 55123
- sv.voipBFServerPort 55124
- sv.voipSharedPassword ""
- sv.useGlobalRank 1 **
- sv.useGlobalUnlocks 1 **
- sv.sponsorText "[NEW] New Era Warfare PR 0.957 GERMAN|Next Maps:|pr_maplist"
- sv.sponsorLogoURL "http://saved.im/mtcxnzi3nzfh/newyg.png" // Link to your server banner
- sv.communityLogoURL "http://newcommunity.eu" // Link to your website
- sv.radioSpamInterval 6
- sv.radioMaxSpamFlagCount 6
- sv.radioBlockedDurationTime 30
- I explained some of the most important settings after the // (DO NOT copy them into the file).
- Lines marked with ** after them will get overwritten by PR settings, so changing them won't affect the server.
- To save the file press CTRL+X and answer the question with yes.
- I will leave it up to you to edit the maplist. Remember that you can't have standard game modes and co-op on the same maplist.
- You can enable squadless kick or a badwords filter in public/mods/pr/python/game/realityconfig_common.py. This file is self explaining, and you normally don't need to change anything there.
- 4. Battlerecorder
- If you enabled battlerecorder in serversettings.con, check public/rotate_demo.cfg.
- Code:
- # Set the number of demo files to keep in the backlog
- file_limit = 30
- # For local web server; edit this path and make it match the one in serversettings.con
- target_root = /var/www/pr/public // change this directory where you want the files to be located
- # Set to 1 to enable ftp uploading
- use_ftp = 0
- # Set to the target directory on the ftp server
- ftp_target_dir = /path/to/webroot/demos
- # Login information for the ftp server goes here
- ftp_server = my.ftp.server
- ftp_user = my_user
- ftp_password = my_password
- If you have problems with the rights while downloading check this thread: http://www.realitymod.com/forum/f109...ver-linux.html
- 5. Administration - RealityAdmin and PRISM
- One of the most important things for an admin are the ingame commands.
- RealityAdmin takes care of this, by giving you a host commands that are helpful while running a PR server, such as !k (Kick), !tb (Temp-Ban) and !b (Permanent Ban), as well as tools to control the game, such as !setnext (Set the next map), !mvote (Run a vote with two or three options), and many others.
- The configuration file for RealityAdmin can be found at public/mods/pr/python/game/realityconfig_admin.py, which I recommend you take a look at - it is well commented, to help you get up to speed.
- For more in depth coverage of what RealityAdmin can do, see the older documentation, which is slightly outdated, but contains a lot of helpful information.
- New in version 1.3 is PRISM. This is a remote administration tool, that is designed to plug into RealityAdmin, giving admins the ability to manage the game without ever joining a server. For more information and support, see it's thread here.
- 6. Reserved slots
- The BF2 server comes with a pretty handy system to handle reserved slots.
- These can be pretty useful if you run a well visited server and if you want that your member are able to join the server even if it's full.
- To activate the system edit your serversettings.con and add the following line:
- Code:
- sv.NumReservedSlots 2
- Note: the reserved slots will be subtracted from your max slots, so if you have 2 reserved ones the server is usually full with 62 players.
- We're not finished, we still need to define which players are allowed to join one of the slots.
- Create and edit a config file called reservedslots.con in public/mods/pr/settings
- You have to define every single user with their exact ingame name. Make sure to check if the clan tag is part of the name or not.
- You do NOT have to include a separate clan tag.
- It should look like this:
- Code:
- reservedSlots.addNick [NEW]BloodyDeed
- reservedSlots.addNick [R-DEV]Amok@ndy
- reservedSlots.addNick MrSherenai
- reservedSlots.addNick zumorc
- You need a new line with "reservedSlots.addNick" in front of it for every single user.
- 7. Apply any available patches
- Open up the server license page, and scroll down to your License Key, copy this key, making sure there's no leading or trailing whitespace.
- Create a new file here:
- public/mods/pr/license.key
- and paste your key here. Again, make sure there's no leading or trailing whitespace or empty lines. Also, make sure it's not called "license.key.txt" or something like that.
- Open up your server list in the server license area. Ensure all servers have up to date IP addresses and ports.
- Make sure your server, as well as Mumble and Mumo, is shut down.
- Now, run the following application (you may have to $ chmod u+x the file first):
- public/mods/pr/bin/prserverupdater-linux32 (for Linux 32bit)
- public/mods/pr/bin/prserverupdater-linux64 (for Linux 64bit)
- A console window should now display the update process. If an update is available, it will automatically be applied. If an important file is overwritten, i.e. realityconfig_admin.py (which you may have modified with ingame admin hashes), it will be backed up to realityconfig_admin.py.original. This allows you to merge in any made changes to the new file (don't just copy it back, otherwise you will lose the changes from the update).
- See: The PR v1.0 admin briefing for more information.
- 8. Starting the server
- I recommend the following script. It contains an automatic restarter if the server crashes and logs everything to a textfile.
- Note: I am not the author of this file, I got it from c0ca
- $ nano /home/pr/public/start_pr.sh
- and paste the following code:
- Code:
- #! /bin/sh
- DAM=$(exec date +%H:%M:%S)
- DAY=$(exec date +%D)
- echo "[$DAY $DAM] Bf2 Server Starting" >> restarts.log
- echo To stop the restarting press Ctrl+C when the server is being restarted
- echo
- DAM=$(exec date +%H:%M:%S)
- DAY=$(exec date +%D)
- trap 'echo; echo [$DAY $DAM] $SRV Server Restarter has been STOPPED! >> restarts.log; exit 1' 2
- C1=0
- while true
- do
- C1=$((C1+=1))
- # Modify the line bellow to match your server execution command line
- ./start.sh +modPath mods/pr
- DAM=$(exec date +%H:%M:%S)
- DAY=$(exec date +%D)
- echo "[$DAY $DAM] PR server restarted $C1 time(s)!" >> restarts.log
- sleep 10
- done
- and make it executable:
- $ chmod u+x /public/start_pr.sh
- 9. Mumble:
- See: PRMurmur (PRMumble) Setup Tutorial
- 10. FAQ:
- Q: I experience strange bugs on my server like grenades that do not explode, people who don't die.
- A: Disable ntp time synchronization on your server
- Q: The time between mapchange is very long
- A: Update your kernel to 3.x.
Add Comment
Please, Sign In to add comment