Counter Strike 1.6 Install
From 2047Servers Support
(Created page with "Category:Linux Category:HLDS_Based_Servers == Counter Strike 1.6 ==") |
|||
| Line 2: | Line 2: | ||
[[Category:HLDS_Based_Servers]] | [[Category:HLDS_Based_Servers]] | ||
| − | == Counter Strike 1.6 == | + | [[File:cs16.png|thumb|350px]] |
| + | |||
| + | '''Copy the commands within the code boxes and paste/run them in Putty''' | ||
| + | |||
| + | First you will need to connect to your server using Putty (SSH) in order to do this install See - [[connecting_to_your_server|Connecting to your server]] | ||
| + | |||
| + | == Making a folder for the server == | ||
| + | |||
| + | You will need to make a folder somewhere that the server files will be installed (If you have done this, skip this part) | ||
| + | |||
| + | The most common or best place to put most of your files on a server is in the /home folder | ||
| + | |||
| + | Change Directory to /home | ||
| + | |||
| + | <pre>cd /home</pre> | ||
| + | |||
| + | Now make a folder e.g. CS_Server Note to change the "CS_Server" to the servers name or folder name | ||
| + | |||
| + | <pre>mkdir CS_Server</pre> | ||
| + | |||
| + | Now go into that folder | ||
| + | |||
| + | <pre>cd CS_Server</pre> | ||
| + | |||
| + | Now you have a new / clean folder you can being to download & install the files for the server. | ||
| + | |||
| + | |||
| + | == Installing SteamCMD + Steam == | ||
| + | |||
| + | First you will need to download HLDS (Half Life Dedicated Server) via SteamCMD (Replacement to hldsupdatetool) | ||
| + | |||
| + | <pre>wget http://media.steampowered.com/client/steamcmd_linux.tar.gz</pre> | ||
| + | |||
| + | After downloading you will need to extra the compressed folder | ||
| + | |||
| + | <pre>tar xvfz steamcmd_linux.tar.gz</pre> | ||
| + | |||
| + | Then run the installer | ||
| + | |||
| + | <pre>./steamcmd.sh</pre> | ||
| + | |||
| + | Now you must login either using the anonymous account or your own account | ||
| + | |||
| + | <pre>login anonymous</pre> | ||
| + | |||
| + | ((Logging in your with account - Replace "<username>" with your username, it should then ask for your password)) | ||
| + | |||
| + | <pre>login <username></pre> | ||
| + | |||
| + | |||
| + | |||
| + | == Downloading CS 1.6 == | ||
| + | |||
| + | After installing SteamCMD it should run, if not just run the above command again. | ||
| + | |||
| + | You will now need to set the install directory e.g. we will go with cs1.6 | ||
| + | |||
| + | <pre>force_install_dir ./cs1.6/</pre> | ||
| + | |||
| + | There are 2 options for installing a CS 1.6 Server (Normal & Beta, both commands are shown here) | ||
| + | |||
| + | Installing normal version (This just installs HLDS - Without Cstrike) | ||
| + | |||
| + | <pre>app_update 90 validate</pre> | ||
| + | |||
| + | Set the HLDS MOD (Cstrike is a Mod for Half Life) | ||
| + | |||
| + | <pre>app_set_config 90 mod cstrike</pre> | ||
| + | |||
| + | Then run the HLDS Mod installer (This time it knows you want a cstrike server so it will get the files for that) | ||
| + | |||
| + | <pre>app_update 90 validate</pre> | ||
| + | |||
| + | Installing the beta version | ||
| + | |||
| + | <pre>app_update "90 -beta beta" validate</pre> | ||
| + | |||
| + | This will check the current folder & download any / all missing files for a Counter Strike 1.6 Server (you can use this command to redownload files that you may have deleted | ||
| + | |||
| + | Counter Strike 1.6 Will now download (Should go very fast with our network speeds on our servers) | ||
| + | |||
| + | == Running CS1.6 via Screen == | ||
| + | |||
| + | When you go to run the game server you want it to run in the background even when you disconnect from Putty, you will find if you just leave it running & close Putty you will kill the server (kills any processes you left running) | ||
| + | |||
| + | The way you keep a process running while you disconnect, is by making a session (using screen) Note to change the "CS_Server" to the servers name or folder name | ||
| + | |||
| + | <pre>screen -S CS_Server</pre> | ||
| + | |||
| + | Now you will notice you are on a new session with a clean view of Putty | ||
| + | |||
| + | Now you can run your CS Server Note to change the values in this line e.g. max players, port etc... | ||
| + | |||
| + | Max Players - up to 32, Port (Best to use unused ones e.g. 25XXX-27XXX | ||
| + | |||
| + | <pre>./hlds_run -game cstrike -autoupdate +maxplayers 12 -port 25100 +map de_dust</pre> | ||
| + | |||
| + | If all done right your server should start up fine & the last thing it should say is "VAC Secure" or something very simular, If not try downloading the files again, just incase it missed a few (highly unlikly) | ||
| + | |||
| + | Now you can Disconnect from the session | ||
| + | |||
| + | Using Keys "Ctrl + A + D" at the same time | ||
| + | |||
| + | |||
| + | == Reconnecting to the process / session == | ||
| + | |||
| + | Once you have a session running you may want to recconnect to it as the server may crash, or you may want to turn it off or restart etc... | ||
| + | |||
| + | First you will need to find what sessions are running & their process id | ||
| + | |||
| + | <pre>screen -ls</pre> | ||
| + | |||
| + | [[File:puttyscreen.png|350px]] | ||
| + | |||
| + | As you see in my screenshot, i have 2 Screen Sessions running, if i want to connect to 2047Servers session i would use the numbers on the left | ||
| + | |||
| + | <pre>screen -r 7354</pre> | ||
| + | |||
| + | Note Change the ID numbers to what your ones are | ||