Last active
May 1, 2018 13:44
-
-
Save Gelmo/a8902441f438f8d7f114ff9c8295d0b2 to your computer and use it in GitHub Desktop.
How to setup a GOKZ server on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### https://bitbucket.org/kztimerglobalteam/gokz/ | |
### Please read the readme section in the above link and the wiki there before proceeding. You should probably read this entire tutorial before doing anything. | |
### I know the extension is .sh, but please do not try to execute this as a script - I added the extension to make it easier to read on GitHub. | |
### This tutorial does NOT cover security. You need to do your own research. At the ufw section, you should consider whether or not you need to restrict these to specific IPs. | |
### All of these steps are done via SSH (most likely). First section assumes you're logged in as root - When you do "su gokz" (later in the tutorial) you then are working as the user "gokz". | |
### Make sure you check for the latest versions of the urls below before blindly copy/pasting. | |
### I started with Ubuntu Server 14.04 x64 and used these steps to get to 18.04 | |
### apt update && apt upgrade | |
### do-release-upgrade | |
### reboot | |
### ### Repeat all that until "do-release-upgrade" stops working. If the last "apt upgrade" didn't do anything, you don't need to reboot again. You absolutely will need to reboot after the first. | |
### ### Now you're at Ubuntu 18.04 | |
dpkg --add-architecture i386; apt update; apt install mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc tmux lib32gcc1 libstdc++6 libstdc++6:i386 lib32ncurses5 mysql-server zlib1g:i386 libc6-i386 lib32stdc++6 | |
### mailutils and postfix are only necessary if you intend on using mail features and status alerts | |
ufw allow 27015/tcp && ufw allow 27015/udp && ufw allow 27020/udp && ufw allow from 127.0.0.1/32 to any port 3306 && ufw reload | |
### This assumes you're running ufw | |
reboot | |
adduser gokz | |
### Consider whether or not you want to add it to the sudo group | |
su gokz | |
cd && mkdir gokz && cd gokz/ | |
wget https://linuxgsm.com/dl/linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver | |
./csgoserver install | |
./csgoserver ul | |
./csgoserver u | |
./csgoserver uf | |
./csgoserver mi | |
metamod | |
./csgoserver mi | |
sourcemod | |
./csgoserver mu | |
### https://bitbucket.org/kztimerglobalteam/gokz/downloads/ | |
cd && mkdir downloads && cd downloads/ | |
wget https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-v1.0.4.zip | |
unzip GOKZ* && rm -rf GOKZ* | |
rsync -Pva /home/gokz/downloads/ /home/gokz/gokz/serverfiles/csgo/ | |
rm -rf ~/downloads/* | |
### https://github.com/danzayau/MovementAPI/ | |
wget https://github.com/danzayau/MovementAPI/releases/download/1.0.0/MovementAPI-v1.0.0.zip | |
unzip Movement* | |
rsync -Pva /home/gokz/downloads/addons/ /home/gokz/gokz/serverfiles/csgo/addons/ | |
rm -rf ~/downloads/* | |
### https://users.alliedmods.net/~drifter/builds/dhooks/ | |
wget https://users.alliedmods.net/~drifter/builds/dhooks/2.2/dhooks-2.2.0-hg126-linux.tar.gz | |
tar -xzvf dhooks* | |
rsync -Pva /home/gokz/downloads/addons/ /home/gokz/gokz/serverfiles/csgo/addons/ | |
rm -rf ~/downloads/* | |
### https://bitbucket.org/kztimerglobalteam/globalrecordssmplugin/ | |
wget https://bitbucket.org/kztimerglobalteam/globalrecordssmplugin/downloads/GlobalAPI-Core-v.1.2.0.zip | |
unzip Global* | |
rm -rf ./*.zip | |
rsync -Pva /home/gokz/downloads/GlobalAPI-Core-v.1.2.0/ /home/gokz/gokz/serverfiles/csgo/ | |
rm -rf ~/downloads/* | |
cd /home/gokz/gokz/serverfiles/csgo/addons/sourcemod/extensions/ | |
### I installed cleaner before realizing it's included with gokz | |
wget https://github.com/Accelerator74/Cleaner/raw/master/Release/cleaner.ext.2.csgo.so | |
wget https://github.com/Accelerator74/Cleaner/raw/master/Release/cleaner.autoload | |
wget https://github.com/thraaawn/SMJansson/raw/master/bin/smjansson.ext.so | |
cd /home/gokz/gokz/serverfiles/csgo/addons/sourcemod/gamedata/ | |
wget https://github.com/Accelerator74/Cleaner/raw/master/cleaner.txt | |
chmod 600 cleaner.txt | |
### https://forums.alliedmods.net/showthread.php?t=229556 | |
### https://users.alliedmods.net/~kyles/builds/SteamWorks/?C=M;O=D | |
cd ~/downloads/ | |
wget https://users.alliedmods.net/~kyles/builds/SteamWorks/SteamWorks-git126-linux.tar.gz | |
tar -xzvf Steam* | |
rsync -Pva /home/gokz/downloads/addons/ /home/gokz/gokz/serverfiles/csgo/addons/ | |
rm -rf ~/downloads/* | |
### https://forums.alliedmods.net/showthread.php?t=169095 | |
cd /home/gokz/gokz/serverfiles/csgo/addons/sourcemod/plugins/ | |
wget https://bitbucket.org/GoD_Tony/updater/downloads/updater.smx | |
chmod 600 ./*.smx | |
cd /home/gokz/gokz/serverfiles/csgo/addons/sourcemod/extensions/ | |
chmod 700 ./*.so && chmod 700 ./*.dll && chmod 700 ./*.autoload | |
mysql -p | |
CREATE USER 'gokz'@'localhost' IDENTIFIED BY 'PutPasswordHere'; | |
CREATE DATABASE sourcemod; | |
CREATE DATABASE gokz; | |
CREATE DATABASE sourcemodlocal; | |
CREATE DATABASE clientprefs; | |
GRANT ALL PRIVILEGES ON sourcemod.* TO 'gokz'@'localhost'; | |
GRANT ALL PRIVILEGES ON gokz.* TO 'gokz'@'localhost'; | |
GRANT ALL PRIVILEGES ON sourcemodlocal.* TO 'gokz'@'localhost'; | |
GRANT ALL PRIVILEGES ON clientprefs.* TO 'gokz'@'localhost'; | |
FLUSH PRIVILEGES; | |
exit; | |
vim /home/gokz/gokz/serverfiles/csgo/addons/sourcemod/configs/databases.cfg | |
### Do what you gotta do. I used mysql and the gokz user for everything since I'm lazy and my server is for development | |
### If you did the mysql section verbatim it should look something like this: | |
### "Databases" | |
### { | |
### "driver_default" "mysql" | |
### | |
### "default" | |
### { | |
### "driver" "mysql" | |
### "host" "localhost" | |
### "database" "sourcemod" | |
### "user" "gokz" | |
### "pass" "PutPasswordHere" | |
### } | |
### | |
### "gokz" | |
### { | |
### "driver" "mysql" | |
### "host" "localhost" | |
### "database" "gokz" | |
### "user" "gokz" | |
### "pass" "PutPasswordHere" | |
### } | |
### | |
### "storage-local" | |
### { | |
### "driver" "mysql" | |
### "host" "localhost" | |
### "database" "sourcemodlocal" | |
### "user" "gokz" | |
### "pass" "PutPasswordHere" | |
### } | |
### | |
### "clientprefs" | |
### { | |
### "driver" "mysql" | |
### "host" "localhost" | |
### "database" "clientprefs" | |
### "user" "gokz" | |
### "pass" "PutPasswordHere" | |
### } | |
### } | |
cd /home/gokz/gokz/serverfiles/csgo/cfg/sourcemod/gokz/ | |
### Do your stuff | |
### "Use !updatemappool to populate the ranked map pool with those in csgo/cfg/sourcemod/gokz/mappool.cfg" | |
### Configure the server to your liking. You'll need to read the lgsm wiki to learn how to configure it: | |
### https://github.com/GameServerManagers/LinuxGSM/wiki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment