Arch Linux - How to Install NamelessMC
Quick guide on how to install NamelessMC a website software for Minecraft.
1) PHP Configuration
1.1) Upgrade your php
main package if not the latest supported.
I will use php-legacy
since 8.1 is the recommended by NamelessMC documentation
pacman -Syu php-legacy
php-legacy --version
PHP 8.1.22 (cli) (built: Aug 13 2023 06:26:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.22, Copyright (c) Zend Technologies
1.2) NamelessMC requires a few php extensions
installed.
php-curl
, php-mbstring
, php-pdo
, php-mysqlnd
and php-xml
are already part of the main package and there is no need to install them.
php-fpm
- is needed to run nginx. Arch Documentation
pacman -Syu php-legacy-gd
1.3) Create the file /etc/php-legacy/conf.d/extensions
and comment out all extensions in /etc/php-legacy/php.ini
.
Add the extensions below to /etc/php-legacy/conf.d/extensions
.
extension=curl
extension=zip
extension=gd
extension=pdo_mysql
extension=exif
Use the command below to confirm that the required extensions are running.
2) NGINX Configuration
I have used the DigitalOcean NGINX configuration generation tool to create my config.
The configuration files was added to version control.
2.1) Generate SSL certificates and copy them to the folder var/www/infoicraft.com.br/letsencrypt
┬─[root@minecraft:/v/w/i/letsencrypt]─[18:26:05]
╰─>$ ll
total 20K
-rwx------ 1 http http 3.7K Aug 19 18:22 chain.pem*
-rwx------ 1 http http 5.8K Aug 19 18:22 fullchain.pem*
-rwx------ 1 http http 3.2K Aug 19 18:22 privkey.pem*
2.2) Generate Stronger DH parameters for nginx SSL.
2.3) For friendly URLS to work the line below had to be changed.
3) NamelessMC Configuration
3.1) Download NamelessMC.
wget -O - "https://github.com/NamelessMC/Nameless/releases/latest/download/nameless-deps-dist.tar.xz" | tar --xz --extract --directory=/var/www/infoicraft.com.br/public/ --file -
3.2) Set the files permission.
┬─[root@minecraft:/v/w/i/public]─[21:22:46]
╰─>$ pwd
/var/www/infoicraft.com.br/public
find -type f -print0 | xargs -0 chmod 0600
find -type d -print0 | xargs -0 chmod 755
3.3) Create a new database for NamelessMC.
mysql -u root -p
# Remember to change 'yourPassword' below to be a unique > password
CREATE USER 'nameless'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE nameless;
GRANT ALL PRIVILEGES ON nameless.* TO 'nameless'@'127.0.0.1' WITH GRANT OPTION;
exit