10 Server Install
randy edited this page 2025-01-29 06:18:18 -07:00

These instructions are for Debian Linux. If you want to run on another OS, you'll have to figure it out.

Install dependencies:

sudo apt-get install openjdk-11-jdk
apt install git
apt install git-lfs
sudo git lfs install
sudo git clone https://git.snowlab.cc/Snowscape/Server.git
sudo git lfs pull

Setting up the user database:

sudo apt install mariadb-server
cd Server/db_exports
sudo mysql
 source global.sql
 alter user 'root'@'localhost' identified via mysql_native_password using '';
 exit

global.sql sets up the database tables. For some reason, the default root creds cause permission issues. Th "alter user" command resets the password to null.

Edit Server/db_exports/global.sql, and comment out the first line that creates the database (If I tried removing the database before starting, it would not recognize the automatically created database).

sudo mysql -u root -p global < Server/db_exports/global.sql
sudo reboot

How to make an admin account

sudo mysql
 use global;
 select username,rights from members where username = 'admin';        check their current rights
 update members set rights = '2' where username = 'admin';            set their rights. 0 is normal player, 1 is moderator, 2 is admin. 3 or higher will cause error on login.

Starting the server

In the directory that you ran git clone, execute the Server/run file. Alternatively, you can set up a service:

/etc/systemd/system/snowscape.service

[Unit]
Description=The Snowscape Game Server
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=30
ExecStart=/runescape/snowscape/Server/run

[Install]
WantedBy=multi-user.target

Then run the following:

systemctl enable snowscape
systemctl start snowscape

IntelliJ download (requires desktop environment).

Not required to run the server, only required for dev. I haven't actually needed to use this yet, but here are the instructions regardless.

sudo apt install xfce4
wget https://download.jetbrains.com/idea/ideaIC-2023.3.3.tar.gz
tar -xzf ideaIC-2023.3.3.tar.gz
sudo chmod 777 /runescape -R

Log in to graphical interface and open idea-IC-233.14015.106//bin/idea.sh