Fix README.md
This commit is contained in:
parent
119a64d81c
commit
655f316cfa
73
README.md
73
README.md
@ -6,15 +6,15 @@ The files to install the Minetest NALC server.
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
Start the install.sh script and follow instructions.
|
Start the `install.sh` script and follow instructions.
|
||||||
|
|
||||||
Help: ./install.sh –help
|
Help: `./install.sh --help`
|
||||||
|
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
- Official Minetest server must already be installed on your GNU/Linux system. If it is not the case, please refers to the <https://minetest.net> website for the installation instructions.
|
- Official Minetest server must already be installed on your GNU/Linux system. If it is not the case, please refers to the <https://minetest.net> website for the installation instructions.
|
||||||
- You'll also need 'git', 'cmake' and 'make' programs installed.
|
- You'll also need 'git', and optionaly 'cmake' and 'make' programs installed.
|
||||||
|
|
||||||
|
|
||||||
# Examples of installation
|
# Examples of installation
|
||||||
@ -24,56 +24,59 @@ Help: ./install.sh –help
|
|||||||
|
|
||||||
We suppose that you have already installed Minetest server from your package manager.
|
We suppose that you have already installed Minetest server from your package manager.
|
||||||
|
|
||||||
The home of the 'minetest' user is located to /var/lib/minetest and you have the write access to it.
|
The home of the 'minetest' user is located to `/var/lib/minetest` and you have the write access to it.
|
||||||
|
|
||||||
1. Create the dir '\\/var/lib/minetest/.minetest' if not exist.
|
1. Create the dir `/var/lib/minetest/.minetest` if not exist.
|
||||||
2. cd /var/lib/minetest
|
2. `cd /var/lib/minetest`
|
||||||
3. git clone –depth 1 -b master <https://sys4.fr/gitea/nalc/nalc-server.git>
|
3. `git clone --depth 1 https://sys4.fr/gitea/nalc/nalc-server.git`
|
||||||
4. cd nalc-server
|
4. `cd nalc-server`
|
||||||
5. ./install.sh -d \\/var/lib/minetest/.minetest
|
5. `./install.sh -d /var/lib/minetest/.minetest`
|
||||||
6. Follow the instructions
|
6. Follow the instructions
|
||||||
|
|
||||||
|
|
||||||
## For a test server
|
## For a test server
|
||||||
|
|
||||||
We suppose you have already installed a production server that is actually in use and stable. But you want to install another one in palallel on the same system in order to test the development version of NALC.
|
We suppose you have already installed a production server that is actually in use and stable. But now you want to install another server in parallel on the same system in order to test the development version of NALC.
|
||||||
|
|
||||||
For the next steps we will be logged in as a normal user:
|
For the next steps we will be logged in as a normal user:
|
||||||
|
|
||||||
1. cd
|
1. `cd`
|
||||||
2. Create the dir '~/.minetest' if it not exist.
|
2. Create the dir `~/.minetest` if it not exist.
|
||||||
3. No need to download the server files again because they are already downloaded in the dir /var/lib/minetest/nalc-server. So you can just do a 'mkdir ~/nalc-dev'. But you can always do a 'git clone <https://sys4.fr/gitea/nalc/nalc-server.git> ~/nalc-dev' if you prefer. Whatever your choice and for the next steps we will refer to the install dir as '$INSTALL'.
|
3. No need to download the server files again because they are already downloaded in the dir `/var/lib/minetest/nalc-server`. So you can just do a `mkdir ~/nalc-dev`. But you can always do a `git clone https://sys4.fr/gitea/nalc/nalc-server.git ~/nalc-dev` if you prefer. Whatever your choice and for the next steps we will refer to the install dir as `$SCRIPT_DIR`.
|
||||||
4. $INSTALL/install.sh -d ~/.minetest -w test -P 30001 –branch dev ~/nalc-dev
|
4. `$SCRIPT_DIR/install.sh -d ~/.minetest -w test -P 30001 --branch dev ~/nalc-dev`
|
||||||
5. Follow the instructions
|
5. Follow the instructions
|
||||||
|
|
||||||
|
|
||||||
## Case of a custom Minetest installation
|
## Case of a custom Minetest installation
|
||||||
|
|
||||||
We suppose you have compiled Minetest from sources with the CMAKE option RUNINPLACE=TRUE. The location of your installation is ~/games/minetest.
|
We suppose you have compiled Minetest from sources with the CMAKE option `RUN_IN_PLACE=TRUE`. The location of your installation is `~/games/minetest`.
|
||||||
|
|
||||||
1. cd ~/games
|
1. `cd ~/games`
|
||||||
2. git clone <https://sys4.fr/gitea/nalc/nalc-server.git>
|
2. `git clone https://sys4.fr/gitea/nalc/nalc-server.git`
|
||||||
3. cd nalc-server
|
3. `cd nalc-server`
|
||||||
4. ./install.sh -b ~/games/minetest/bin/minetestserver -d ~/games/minetest
|
4. `./install.sh -b ~/games/minetest/bin/minetestserver -d ~/games/minetest`
|
||||||
5. Follow the instructions
|
5. Follow the instructions
|
||||||
|
|
||||||
|
|
||||||
## Other cases
|
## Other cases
|
||||||
|
|
||||||
Other combinaisons are possibles and I cannot describe all of them. Don't hesitate to read the help of the script with –help option and do your own tests :)
|
Other combinations are possible and I cannot describe all of them. Don't hesitate to read the help of the script with `--help` option and do your own tests :)
|
||||||
|
|
||||||
|
|
||||||
# Add or disable mods
|
# Add or disable mods
|
||||||
|
|
||||||
If you want to add mods you can do it easily. For that you can create the dir $DESTINATION/custom/mods where $DESTINATION is the dir where you have installed the server (the one containing the nalc.conf file).
|
- If you want to add mods you can do it easily.
|
||||||
Then copy your mods and modpacks in $DESTINATION/custom/mods and you need to execute $INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt for regenerating the world.mt file of your world.
|
|
||||||
Replace <world> by your world name.
|
|
||||||
Replace <version> by the branch name specified during the installation, either 'stable', 'dev' or 'exp'.
|
|
||||||
|
|
||||||
If you want to disable mods you need to edit the file $DESTINATION/modsdisabled.txt and add one mod name per line.
|
For that you can create the dir `$DESTINATION/custom/mods` where `$DESTINATION` is the dir where you have installed the server (the one containing the `nalc.conf` file).
|
||||||
Then execute again $INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt.
|
Then copy your mods and modpacks in `$DESTINATION/custom/mods` and you need to execute `$INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt` for regenerating the `world.mt` file of your world.
|
||||||
|
Replace `<world>` by your world name.
|
||||||
|
Replace `<version>` by the branch name specified during the installation, either 'stable', 'dev' or 'exp'.
|
||||||
|
|
||||||
Note: Depending on how you have installed NALC server, but $INSTALL and $DESTINATION can point to the same directory. If it's the case you can ommit the -s option.
|
- If you want to disable mods you need to edit the file `$DESTINATION/mods_disabled.txt` and add one mod name per line.
|
||||||
|
|
||||||
|
Then execute again `$INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt`.
|
||||||
|
|
||||||
|
Note: Depending on how you have installed NALC server, but `$INSTALL` and `$DESTINATION` can point to the same directory. If it's the case you can ommit the `-s` option.
|
||||||
|
|
||||||
|
|
||||||
# Start/Stop the server
|
# Start/Stop the server
|
||||||
@ -81,19 +84,19 @@ Note: Depending on how you have installed NALC server, but $INSTALL and $DESTINA
|
|||||||
|
|
||||||
## Use provided scripts
|
## Use provided scripts
|
||||||
|
|
||||||
You can rename the $INSTALL/start.sh.example file to start.sh and give it executable permissions.
|
You can rename the `$SCRIPT_DIR/start.sh.example` file to `start.sh` and give it exe permissions.
|
||||||
Then launch the server with the command $INSTALL/start.sh -s $DESTINATION.
|
Then launch the server with the command `$SCRIPT_DIR/start.sh -s $DESTINATION`.
|
||||||
|
|
||||||
Note: -s option can be ommited if you launch the script from the dir $DESTINATION.
|
Note: `-s` option can be ommited if you launch the script from the dir `$DESTINATION`.
|
||||||
|
|
||||||
For shutting down the server press CTRL-C.
|
For shutting down the server press `CTRL-C`.
|
||||||
|
|
||||||
You can edit the start.sh script for your needs.
|
You can edit the `start.sh` script for your needs.
|
||||||
|
|
||||||
|
|
||||||
## Use openrc to start/stop NALC as a daemon
|
## Use openrc to start/stop NALC as a daemon
|
||||||
|
|
||||||
We suppose minetest is installed from portage with the +server USE flag and NALC server is installed in the home of the minetest user `/var/lib/minetest/nalc-server`. If you would use your Gentoo/Calculate Linux system init to start/stop NALC server as a service then you can follow theses steps:
|
We suppose minetest is installed from portage with the `+server` USE flag and NALC server is installed in the home of the minetest user `/var/lib/minetest/nalc-server`. If you would use your Gentoo/Calculate Linux system run init to start/stop NALC server as a service then you can follow theses steps:
|
||||||
|
|
||||||
1. Edit your `/etc/conf.d/minetest-server` file like that:
|
1. Edit your `/etc/conf.d/minetest-server` file like that:
|
||||||
|
|
||||||
@ -149,7 +152,7 @@ We suppose minetest is installed from portage with the +server USE flag and NALC
|
|||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
3. Add the service to your default init level: `rc-update add minetest-server default`.
|
3. Add the service to your default init run level: `rc-update add minetest-server default`.
|
||||||
|
|
||||||
4. Start the service: `rc-service minetest-server start`.
|
4. Start the service: `rc-service minetest-server start`.
|
||||||
|
|
||||||
@ -161,6 +164,6 @@ We suppose minetest is installed from portage with the +server USE flag and NALC
|
|||||||
|
|
||||||
# Update the server
|
# Update the server
|
||||||
|
|
||||||
You can execute the install.sh script again. If a nalc.conf file is detected in the specified destination, it will load all the settings specified during the previous installation.
|
You can execute the `install.sh` script again. If a `nalc.conf` file is detected in the specified destination, all the settings specified during the previous installation will be loaded.
|
||||||
Then you have to follow the instructions of the script and you will be able to update your server.
|
Then you have to follow the instructions of the script and you will be able to update your server.
|
||||||
|
|
||||||
|
@ -2,76 +2,77 @@
|
|||||||
The files to install the Minetest NALC server.
|
The files to install the Minetest NALC server.
|
||||||
|
|
||||||
* Installation
|
* Installation
|
||||||
Start the install.sh script and follow instructions.
|
Start the ~install.sh~ script and follow instructions.
|
||||||
|
|
||||||
Help: ./install.sh --help
|
Help: ~./install.sh --help~
|
||||||
|
|
||||||
* Requirements
|
* Requirements
|
||||||
|
|
||||||
- Official Minetest server must already be installed on your GNU/Linux system. If it is not the case, please refers to the https://minetest.net website for the installation instructions.
|
- Official Minetest server must already be installed on your GNU/Linux system. If it is not the case, please refers to the https://minetest.net website for the installation instructions.
|
||||||
- You'll also need 'git', 'cmake' and 'make' programs installed.
|
- You'll also need 'git', and optionaly 'cmake' and 'make' programs installed.
|
||||||
|
|
||||||
* Examples of installation
|
* Examples of installation
|
||||||
|
|
||||||
** For a production server intended to be publicly available
|
** For a production server intended to be publicly available
|
||||||
We suppose that you have already installed Minetest server from your package manager.
|
We suppose that you have already installed Minetest server from your package manager.
|
||||||
|
|
||||||
The home of the 'minetest' user is located to /var/lib/minetest and you have the write access to it.
|
The home of the 'minetest' user is located to ~/var/lib/minetest~ and you have the write access to it.
|
||||||
|
|
||||||
1. Create the dir '\/var/lib/minetest/.minetest' if not exist.
|
1. Create the dir ~/var/lib/minetest/.minetest~ if not exist.
|
||||||
2. cd /var/lib/minetest
|
2. ~cd /var/lib/minetest~
|
||||||
3. git clone --depth 1 -b master https://sys4.fr/gitea/nalc/nalc-server.git
|
3. ~git clone --depth 1 https://sys4.fr/gitea/nalc/nalc-server.git~
|
||||||
4. cd nalc-server
|
4. ~cd nalc-server~
|
||||||
5. ./install.sh -d \/var/lib/minetest/.minetest
|
5. ~./install.sh -d /var/lib/minetest/.minetest~
|
||||||
6. Follow the instructions
|
6. Follow the instructions
|
||||||
|
|
||||||
** For a test server
|
** For a test server
|
||||||
We suppose you have already installed a production server that is actually in use and stable. But you want to install another one in palallel on the same system in order to test the development version of NALC.
|
We suppose you have already installed a production server that is actually in use and stable. But now you want to install another server in parallel on the same system in order to test the development version of NALC.
|
||||||
|
|
||||||
For the next steps we will be logged in as a normal user:
|
For the next steps we will be logged in as a normal user:
|
||||||
|
|
||||||
1. cd
|
1. ~cd~
|
||||||
2. Create the dir '~/.minetest' if it not exist.
|
2. Create the dir ~~/.minetest~ if it not exist.
|
||||||
3. No need to download the server files again because they are already downloaded in the dir /var/lib/minetest/nalc-server. So you can just do a 'mkdir ~/nalc-dev'. But you can always do a 'git clone https://sys4.fr/gitea/nalc/nalc-server.git ~/nalc-dev' if you prefer. Whatever your choice and for the next steps we will refer to the install dir as '$INSTALL'.
|
3. No need to download the server files again because they are already downloaded in the dir ~/var/lib/minetest/nalc-server~. So you can just do a ~mkdir ~/nalc-dev~. But you can always do a ~git clone https://sys4.fr/gitea/nalc/nalc-server.git ~/nalc-dev~ if you prefer. Whatever your choice and for the next steps we will refer to the install dir as ~$SCRIPT_DIR~.
|
||||||
4. $INSTALL/install.sh -d ~/.minetest -w test -P 30001 --branch dev ~/nalc-dev
|
4. ~$SCRIPT_DIR/install.sh -d ~/.minetest -w test -P 30001 --branch dev ~/nalc-dev~
|
||||||
5. Follow the instructions
|
5. Follow the instructions
|
||||||
|
|
||||||
** Case of a custom Minetest installation
|
** Case of a custom Minetest installation
|
||||||
We suppose you have compiled Minetest from sources with the CMAKE option RUN_IN_PLACE=TRUE. The location of your installation is ~/games/minetest.
|
We suppose you have compiled Minetest from sources with the CMAKE option ~RUN_IN_PLACE=TRUE~. The location of your installation is ~~/games/minetest~.
|
||||||
|
|
||||||
1. cd ~/games
|
1. ~cd ~/games~
|
||||||
2. git clone https://sys4.fr/gitea/nalc/nalc-server.git
|
2. ~git clone https://sys4.fr/gitea/nalc/nalc-server.git~
|
||||||
3. cd nalc-server
|
3. ~cd nalc-server~
|
||||||
4. ./install.sh -b ~/games/minetest/bin/minetestserver -d ~/games/minetest
|
4. ~./install.sh -b ~/games/minetest/bin/minetestserver -d ~/games/minetest~
|
||||||
5. Follow the instructions
|
5. Follow the instructions
|
||||||
|
|
||||||
** Other cases
|
** Other cases
|
||||||
Other combinaisons are possibles and I cannot describe all of them. Don't hesitate to read the help of the script with --help option and do your own tests :)
|
Other combinations are possible and I cannot describe all of them. Don't hesitate to read the help of the script with ~--help~ option and do your own tests :)
|
||||||
|
|
||||||
* Add or disable mods
|
* Add or disable mods
|
||||||
If you want to add mods you can do it easily. For that you can create the dir $DESTINATION/custom/mods where $DESTINATION is the dir where you have installed the server (the one containing the nalc.conf file).
|
- If you want to add mods you can do it easily.
|
||||||
Then copy your mods and modpacks in $DESTINATION/custom/mods and you need to execute $INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt for regenerating the world.mt file of your world.
|
For that you can create the dir ~$DESTINATION/custom/mods~ where ~$DESTINATION~ is the dir where you have installed the server (the one containing the ~nalc.conf~ file).
|
||||||
Replace <world> by your world name.
|
Then copy your mods and modpacks in ~$DESTINATION/custom/mods~ and you need to execute ~$INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt~ for regenerating the ~world.mt~ file of your world.
|
||||||
Replace <version> by the branch name specified during the installation, either 'stable', 'dev' or 'exp'.
|
Replace ~<world>~ by your world name.
|
||||||
|
Replace ~<version>~ by the branch name specified during the installation, either 'stable', 'dev' or 'exp'.
|
||||||
|
|
||||||
If you want to disable mods you need to edit the file $DESTINATION/mods_disabled.txt and add one mod name per line.
|
- If you want to disable mods you need to edit the file ~$DESTINATION/mods_disabled.txt~ and add one mod name per line.
|
||||||
Then execute again $INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt.
|
Then execute again ~$INSTALL/upgrade.sh -s $DESTINATION -w <world> -b <version> -f worldmt~.
|
||||||
|
|
||||||
Note: Depending on how you have installed NALC server, but $INSTALL and $DESTINATION can point to the same directory. If it's the case you can ommit the -s option.
|
Note: Depending on how you have installed NALC server, but ~$INSTALL~ and ~$DESTINATION~ can point to the same directory. If it's the case you can ommit the ~-s~ option.
|
||||||
|
|
||||||
* Start/Stop the server
|
* Start/Stop the server
|
||||||
** Use provided scripts
|
** Use provided scripts
|
||||||
You can rename the $INSTALL/start.sh.example file to start.sh and give it executable permissions.
|
You can rename the ~$SCRIPT_DIR/start.sh.example~ file to ~start.sh~ and give it exe permissions.
|
||||||
Then launch the server with the command $INSTALL/start.sh -s $DESTINATION.
|
Then launch the server with the command ~$SCRIPT_DIR/start.sh -s $DESTINATION~.
|
||||||
|
|
||||||
Note: -s option can be ommited if you launch the script from the dir $DESTINATION.
|
Note: ~-s~ option can be ommited if you launch the script from the dir ~$DESTINATION~.
|
||||||
|
|
||||||
For shutting down the server press CTRL-C.
|
For shutting down the server press ~CTRL-C~.
|
||||||
|
|
||||||
You can edit the start.sh script for your needs.
|
You can edit the ~start.sh~ script for your needs.
|
||||||
|
|
||||||
** Use openrc to start/stop NALC as a daemon
|
** Use openrc to start/stop NALC as a daemon
|
||||||
We suppose minetest is installed from portage with the +server USE flag and NALC server is installed in the home of the minetest user ~/var/lib/minetest/nalc-server~. If you would use your Gentoo/Calculate Linux system init to start/stop NALC server as a service then you can follow theses steps:
|
We suppose minetest is installed from portage with the ~+server~ USE flag and NALC server is installed in the home of the minetest user ~/var/lib/minetest/nalc-server~. If you would use your Gentoo/Calculate Linux system run init to start/stop NALC server as a service then you can follow theses steps:
|
||||||
|
|
||||||
1. Edit your ~/etc/conf.d/minetest-server~ file like that:
|
1. Edit your ~/etc/conf.d/minetest-server~ file like that:
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
@ -129,12 +130,12 @@
|
|||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
3. Add the service to your default init level: ~rc-update add minetest-server default~.
|
3. Add the service to your default init run level: ~rc-update add minetest-server default~.
|
||||||
|
|
||||||
4. Start the service: ~rc-service minetest-server start~.
|
4. Start the service: ~rc-service minetest-server start~.
|
||||||
|
|
||||||
5. Stop the service: ~rc-service minetest-server stop~.
|
5. Stop the service: ~rc-service minetest-server stop~.
|
||||||
** TODO Use systemd to start/stop NALC as a daemon
|
** TODO Use systemd to start/stop NALC as a daemon
|
||||||
* Update the server
|
* Update the server
|
||||||
You can execute the install.sh script again. If a nalc.conf file is detected in the specified destination, it will load all the settings specified during the previous installation.
|
You can execute the ~install.sh~ script again. If a ~nalc.conf~ file is detected in the specified destination, all the settings specified during the previous installation will be loaded.
|
||||||
Then you have to follow the instructions of the script and you will be able to update your server.
|
Then you have to follow the instructions of the script and you will be able to update your server.
|
||||||
|
Loading…
Reference in New Issue
Block a user