Editing Setting up a server
From AAGRINDER wiki
Jump to navigationJump to searchWarning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
You'll need these things installed: | You'll need these things installed: | ||
* git | * git | ||
− | * g++ | + | * g++ (or another c++ compiler) |
* [https://nodejs.org/en/ Node.js] | * [https://nodejs.org/en/ Node.js] | ||
* [https://www.npmjs.com/get-npm npm] | * [https://www.npmjs.com/get-npm npm] | ||
+ | * [https://www.mysql.com/ MySQL] (not mandatory) | ||
− | + | If you're going to use MySQL, | |
+ | [https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-14-04 set up] | ||
+ | your database. | ||
+ | It is needed for storing account data. | ||
+ | Helpful commands: | ||
+ | <pre> | ||
+ | $ mysql -u root -p | ||
+ | > create database aagrinder; | ||
+ | > create user 'maze'@'localhost' identified by 'some_password'; | ||
+ | > grant all privileges on aagrinder.* to 'maze'@'localhost'; | ||
+ | > flush privileges; | ||
+ | > quit | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | Then run the following commands: | ||
<pre> | <pre> | ||
$ git clone https://gitlab.com/MRAAGH/aagrinder.git | $ git clone https://gitlab.com/MRAAGH/aagrinder.git | ||
$ cd aagrinder | $ cd aagrinder | ||
$ npm install | $ npm install | ||
− | |||
− | |||
− | |||
− | |||
$ git clone https://gitlab.com/MRAAGH/aagrinder-terrain.git | $ git clone https://gitlab.com/MRAAGH/aagrinder-terrain.git | ||
$ cd aagrinder-terrain | $ cd aagrinder-terrain | ||
$ make | $ make | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$ cd .. | $ cd .. | ||
$ npm start | $ npm start | ||
</pre> | </pre> | ||
+ | A server.properties file will be created. | ||
+ | In that file, you set the database name, host, user and password. | ||
+ | Then restart the server. | ||
− | + | Now, anyone who can access your computer via internet can easily connect to your aagrinder server. | |
− | |||
− | |||
− | Now, anyone who can | ||
− | |||
− | |||
− | + | == Running server without MySQL == | |
− | + | WARNING: if you run a server without a database, players will not be able to protect their accounts with passwords. | |
− | + | If you are going to play alone or only on the local network, this could be totally fine. [[Running in insecure mode|More about insecure mode]] | |
− | server | ||
− | |||
− | + | Open your server.properties file. | |
− | + | Change "insecure_mode":false to "insecure_mode":true. | |
− | + | Then restart the server. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | server | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |