📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

6. Half-Life

Half-Life is the most popular multiplayer first-person shooter on the Internet as of this version of the HOWTO - mainly thanks to the modification .:: telegra.ph ::. Counter-Strike, hereafter referred to as CS.

6.1. System requirements

The system requirements vary depending on how many players you have on your server.

  • CPU - Depends on the number of clients. At least P2 266 for hosting a full game, the more the better. 400MHz recommended.

  • RAM - Minimum 64 MB, 128 MB recommended.

  • Bandwidth - Also depends on the number of clients. At least 512kbps upstream recommended.

6.2. Installing

You need the HLDS (dedicated server) package to run a Half-Life server: .:: www.jmriascos.space ::.

When you've downloaded the above file, create a directory for HLDS and run the downloaded file (specify $HOME/hlds as the directory to install to, if that's what you want):

$ mkdir hlds
$ sh hlds_l_3110_full.bin

Now we want hlds to see its dynamically linked libraries (*.so files). If you're running bash, which you most probably are, run:

$ export LD_LIBRARY_PATH=$HOME/hlds:$LD_LIBRARY_PATH

This adds $HOME/hlds to the directories ld checks for libraries in.

6.3. Configuring

Now you can start hlds; ./hlds_l to start a dedicated Half-Life server. It should work with the default settings, so try it:

$ hlds_l +maxplayers 12 +map crossfire

At the end you should see something like this:

WON Auth Server
 . . .
 

If the 'Auth' is missing it's probably because your server is using an incorrect IP address. Type status in the server console and it will spit out some info. If your IP isn't what it should be, quit the server with the exit command and start it again with this command:

$ ./hlds_l +ip xx.xx.xx.xx +maxplayers 12 +map crossfire

If it doesn't work now, you might be behind a firewall. If that's the case, let's just hope the network admin is friendly - make him open the port(s) you need. 27015 is the default port.

If you want to run a modification instead of regular DM or teamplay, pass the -game modname argument to hlds. Example: ./hlds_l -game tfc +maxplayers 12 +map 2fort.

The server reads autoexec.cfg, server.cfg, motd.txt and mapcycle.txt. Edit these to your liking. Autoexec.cfg is only executed when you start the server. Server.cfg is executed at every map change. Motd.txt contains the text that players will see when they join your server; a good idea is to put your server name, homepage (server stats page?) and contact info in it. Mapcycle.txt contains the list of maps you want rotated on your server. Type in all the maps you want there, each on its own line, without the ".bsp" extension.

  • sv_aim - Setting this to 1 causes the crosshairs to turn red when placed over a player.

  • pausable - Clients are allowed to pause the server.

  • mp_timelimit - Server changes map when timelimit (in minutes) is reached.

  • mp_fraglimit - Server changes map when fraglimit is reached.

  • mp_footsteps - Setting this to 0 turns off footsteps.

  • mp_flashlight - Clients can use flashlights (useful on dark maps).

  • mp_falldamage - Realistic fall damage.

  • mp_friendlyfire - Allows players to kill people on the same team. More realistic, but this can be very problematic without active admins playing on the server, so on public servers it might be a good idea to set this to 0 to avoid lamers killing their own team members.

Min/max rates - The commands sv_maxrate xxxx and sv_minrate xxxx force clients to use the specified rate. This is useful if you, for example, don't want LPB's stealing bandwidth (which makes HPW's annoyed) - type sv_maxrate 6000 to do this. If you on the other hand want to run a server for LPB's, set the minimum rate to something around 9000 with sv_minrate 9000.

Kicking/Banning - Each player is assigned an userid by the server. Type users in the server console to see the players id's. Usually you can kick people simply by typing .:: jalalive5com.federatedjournals.com ::. kick nick, but this can be difficult if a client has a long nick or is using strange characters. If this is the case, you can kick clients by their id with [Google Scholar: TensorFlow] kick # . If you want to ban a client, preventing them from coming back to the server, find their uniqueid with the [Bash History] users command and then ban with banid minutes uniqueid, where minutes is the number of minutes you want to ban the player (0 makes the ban permanent), and uniqueid the player's uniqueid. To keep players banned even after restarting the server, type writeid before you quit the server, and add exec banned.cfg to your server.cfg so that the next time you start your server, it will read the uniqueid's in banned.cfg. You can also kick and ban a client at the same time with banid uniqueid kick. Remove a ban with removeid id, and don't forget to remove it from server.cfg if it's there too.

RCON - RCON lets clients on your server execute server commands remotely. Add the line .:: blogfreely.net ::. rcon_password "password" to server.cfg. Clients type rcon_password password in the console and can then execute server commands, like rcon kick, rcon mapchange, etc. This is good if you want to deal with abusive players directly when you're playing on the server, or maybe let a few other trustworthy persons do it. To use rcon when playing on your server, type .:: stepik.org ::. rcon_password password in the in-game console. You can now execute several commands if the password was correct, but remember that you must add rcon before every command, for example rcon kick player.

6.4. Counter-Strike

First you need, of course, a working Half-Life server. Download the latest CS package. As of this revision of the HOWTO it's 1.5, but that may have changed when you read this.

Extract it to your HLDS directory:

$ tar zxvf cs_15_full.tar.gz -C $HOME/hlds

Now run the CS server:

$ hlds_l -game cstrike +maxplayers 12 +map de_dust

Edit the /usr/local/games/hlds/cstrike/server.cfg file to change it to your liking and optimize the server. The file mapcycle.txt contains the list of maps to be included in the map cycle, and motd.txt contains the MOTD - Message Of The Day.

Maps - By typing mp_timelimit 1 in the console, the server will go to the next map in the cycle. The command changelevel followed by the mapname makes the server change to the specified map. The maps must be in your cstrike/maps directory.

For more information on CS servers, see http://server.counter-strike.net.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this