Guest User

Untitled

a guest
Jun 11th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.49 KB | None | 0 0
  1.  
  2. Index
  3. Introduction
  4. Initial setup
  5. Installing the PR serverfiles
  6. Battlerecorder
  7. Administration - RealityAdmin and PRISM
  8. Reserved Slots
  9. Applying patches
  10. Starting the server
  11. Mumble
  12. FAQ
  13. Other useful information
  14.  
  15. 1. Introduction
  16.  
  17. Hi guys,
  18.  
  19. 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.
  20.  
  21. 2. Initial setup
  22.  
  23. First we will add a user for the PR Server, never run a server as root.
  24. $ sudo useradd pr
  25. We created a new user called "pr". Now we will create him a new home directory and give him the rights he needs.
  26. $ mkdir /home/pr
  27. $ chown -R pr /home/pr
  28. Set a new password (don't forget that)
  29. $ passwd pr
  30. Login as the new user
  31. $ su pr
  32. And if your default shell isn't bash I would recommend to use it
  33. $ chsh -s /bin/bash pr
  34. Finally switch to your new homedir
  35. $ cd /home/pr
  36. 3. Installing the PR serverfiles
  37.  
  38. Beginning with PR v1.3, we no longer require the original BF2 server files, and so can start with the PR server files.
  39.  
  40. You can obtain these from the Server License Control Panel of your listed Server Administrator, so grab them onto your personal machine.
  41.  
  42. While they are downloading, we need some way to transfer them to your server, so:
  43. 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.
  44. Because Filezilla works on both operating system I will explain that.
  45. Download Filezilla there: FileZilla - Client Download and install that.
  46. The Filezilla interface should look like that:
  47. This image has been resized. Click this bar to view the full image. The original image is sized 900x750.
  48.  
  49. Now click on "File" -> "Site Manager".
  50. Set it up like shown below just type in your username (probably pr)/password (the one we set up in the beginning) and IP:
  51. This image has been resized. Click this bar to view the full image. The original image is sized 624x438.
  52.  
  53. Press connect.
  54. 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").
  55. Now you can start the upload with rightclick on the serverfiles on Local site and press "Upload".
  56. $ cd /home/pr/public
  57. $ unzip prbf2_1.3.0.0_server.zip
  58. After the files are copied we can start with the basic configuration.
  59. The first file with important settings is located at
  60. public/mods/pr/settings/serversettings.con
  61. and the maplist at
  62. public/mods/pr/settings/maplist.con
  63. We will start with serversettings.con.
  64.  
  65. Before you do ANY changes to that config file, please read the following thread:
  66. http://www.realitymod.com/forum/f109...ml#post1849836
  67. If you follow the rules your server will be perfectly set up for PRSpy.
  68. $ nano mods/pr/settings/serversettings.con
  69. Code:
  70. sv.serverName "[NEW] New Era Warfare [Mumble] GERMAN"
  71. sv.password ""
  72. sv.internet 1 // Don't forget to set that to 1
  73. sv.serverIP "217.114.210.182"
  74. sv.serverPort 16567
  75. 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
  76. sv.punkBuster 0 // We no longer recommend using PB
  77. sv.allowFreeCam 0 **
  78. sv.allowExternalViews 0 **
  79. sv.allowNoseCam 0 **
  80. sv.hitIndicator 0 **
  81. sv.maxPlayers 100 // The maximum player count
  82. sv.NumReservedSlots 0 // How many reserved slots you want (0 to deactivate it)
  83. sv.numPlayersNeededToStart 1 ** // You can't change this anyway
  84. sv.notEnoughPlayersRestartDelay 15 **
  85. sv.startDelay 15 **
  86. sv.endDelay 15 **
  87. sv.spawnTime 10 **
  88. sv.manDownTime 10 **
  89. sv.endOfRoundDelay 15 **
  90. sv.ticketRatio 100 **
  91. sv.roundsPerMap 1 **
  92. sv.timeLimit 0 **
  93. sv.scoreLimit 0 **
  94. sv.soldierFriendlyFire 100 **
  95. sv.vehicleFriendlyFire 100 **
  96. sv.soldierSplashFriendlyFire 100 **
  97. sv.vehicleSplashFriendlyFire 100 **
  98. sv.tkPunishEnabled 1 // Enable or disable the teamkill punish system
  99. sv.tkNumPunishToKick 3
  100. sv.tkPunishByDefault 0
  101. sv.votingEnabled 0 // Enable or disable voting
  102. sv.voteTime 90
  103. sv.minPlayersForVoting 1
  104. sv.gameSpyPort 29900
  105. sv.allowNATNegotiation 0
  106. sv.interfaceIP "0.0.0.0"
  107. sv.autoRecord 1 // See battlerecorder section below
  108. sv.demoIndexURL http://217.114.210.182/server/pr_public/demos/
  109. sv.demoDownloadURL http://217.114.210.182/server/pr_public/demos/
  110. sv.autoDemoHook "adminutils/demo/rotate_demo.exe" // See battlerecorder
  111. sv.demoQuality 10 // The quality of the battlerecorder
  112. sv.adminScript "prism" // Change this to prism, to enable PRISM on your server (Explained later)
  113. sv.timeBeforeRestartMap 30 **
  114. sv.autoBalanceTeam 0 // Turn it off since we use RealityAdmin
  115. sv.teamRatioPercent 100 **
  116. sv.coopBotRatio 50
  117. sv.coopBotCount 48
  118. sv.coopBotDifficulty 90
  119. sv.voipEnabled 0 // Disable voip, as we have mumble
  120. sv.voipQuality 3
  121. sv.voipServerRemote 0
  122. sv.voipServerRemoteIP "0.0.0.0"
  123. sv.voipServerPort 55125
  124. sv.voipBFClientPort 55123
  125. sv.voipBFServerPort 55124
  126. sv.voipSharedPassword ""
  127. sv.useGlobalRank 1 **
  128. sv.useGlobalUnlocks 1 **
  129. sv.sponsorText "[NEW] New Era Warfare PR 0.957 GERMAN|Next Maps:|pr_maplist"
  130. sv.sponsorLogoURL "http://saved.im/mtcxnzi3nzfh/newyg.png" // Link to your server banner
  131. sv.communityLogoURL "http://newcommunity.eu" // Link to your website
  132. sv.radioSpamInterval 6
  133. sv.radioMaxSpamFlagCount 6
  134. sv.radioBlockedDurationTime 30
  135. I explained some of the most important settings after the // (DO NOT copy them into the file).
  136. Lines marked with ** after them will get overwritten by PR settings, so changing them won't affect the server.
  137.  
  138. To save the file press CTRL+X and answer the question with yes.
  139.  
  140. 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.
  141.  
  142. 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.
  143.  
  144. 4. Battlerecorder
  145.  
  146. If you enabled battlerecorder in serversettings.con, check public/rotate_demo.cfg.
  147. Code:
  148. # Set the number of demo files to keep in the backlog
  149. file_limit = 30
  150.  
  151. # For local web server; edit this path and make it match the one in serversettings.con
  152. target_root = /var/www/pr/public // change this directory where you want the files to be located
  153.  
  154. # Set to 1 to enable ftp uploading
  155. use_ftp = 0
  156.  
  157. # Set to the target directory on the ftp server
  158. ftp_target_dir = /path/to/webroot/demos
  159.  
  160. # Login information for the ftp server goes here
  161. ftp_server = my.ftp.server
  162. ftp_user = my_user
  163. ftp_password = my_password
  164. If you have problems with the rights while downloading check this thread: http://www.realitymod.com/forum/f109...ver-linux.html
  165.  
  166. 5. Administration - RealityAdmin and PRISM
  167.  
  168. One of the most important things for an admin are the ingame commands.
  169. 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.
  170.  
  171. 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.
  172.  
  173. 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.
  174.  
  175. 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.
  176.  
  177. 6. Reserved slots
  178.  
  179. The BF2 server comes with a pretty handy system to handle reserved slots.
  180. 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.
  181. To activate the system edit your serversettings.con and add the following line:
  182. Code:
  183. sv.NumReservedSlots 2
  184. 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.
  185. We're not finished, we still need to define which players are allowed to join one of the slots.
  186.  
  187. Create and edit a config file called reservedslots.con in public/mods/pr/settings
  188.  
  189. 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.
  190. You do NOT have to include a separate clan tag.
  191. It should look like this:
  192. Code:
  193. reservedSlots.addNick [NEW]BloodyDeed
  194. reservedSlots.addNick [R-DEV]Amok@ndy
  195. reservedSlots.addNick MrSherenai
  196. reservedSlots.addNick zumorc
  197. You need a new line with "reservedSlots.addNick" in front of it for every single user.
  198.  
  199. 7. Apply any available patches
  200.  
  201. 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.
  202.  
  203. Create a new file here:
  204. public/mods/pr/license.key
  205. 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.
  206.  
  207. Open up your server list in the server license area. Ensure all servers have up to date IP addresses and ports.
  208.  
  209. Make sure your server, as well as Mumble and Mumo, is shut down.
  210.  
  211. Now, run the following application (you may have to $ chmod u+x the file first):
  212. public/mods/pr/bin/prserverupdater-linux32 (for Linux 32bit)
  213. public/mods/pr/bin/prserverupdater-linux64 (for Linux 64bit)
  214. 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).
  215.  
  216. See: The PR v1.0 admin briefing for more information.
  217.  
  218. 8. Starting the server
  219.  
  220. I recommend the following script. It contains an automatic restarter if the server crashes and logs everything to a textfile.
  221. Note: I am not the author of this file, I got it from c0ca
  222. $ nano /home/pr/public/start_pr.sh
  223. and paste the following code:
  224. Code:
  225. #! /bin/sh
  226. DAM=$(exec date +%H:%M:%S)
  227. DAY=$(exec date +%D)
  228. echo "[$DAY $DAM] Bf2 Server Starting" >> restarts.log
  229. echo To stop the restarting press Ctrl+C when the server is being restarted
  230. echo
  231. DAM=$(exec date +%H:%M:%S)
  232. DAY=$(exec date +%D)
  233. trap 'echo; echo [$DAY $DAM] $SRV Server Restarter has been STOPPED! >> restarts.log; exit 1' 2
  234. C1=0
  235. while true
  236. do
  237. C1=$((C1+=1))
  238. # Modify the line bellow to match your server execution command line
  239. ./start.sh +modPath mods/pr
  240. DAM=$(exec date +%H:%M:%S)
  241. DAY=$(exec date +%D)
  242. echo "[$DAY $DAM] PR server restarted $C1 time(s)!" >> restarts.log
  243. sleep 10
  244. done
  245. and make it executable:
  246. $ chmod u+x /public/start_pr.sh
  247. 9. Mumble:
  248.  
  249. See: PRMurmur (PRMumble) Setup Tutorial
  250.  
  251. 10. FAQ:
  252.  
  253. Q: I experience strange bugs on my server like grenades that do not explode, people who don't die.
  254. A: Disable ntp time synchronization on your server
  255.  
  256. Q: The time between mapchange is very long
  257. A: Update your kernel to 3.x.
Add Comment
Please, Sign In to add comment