Why Would I Want To Do This?
This is how I went about installing it on a box running Linux Mint 17.2
This needs to be done as an admin user.Add A New User
Note: You can choose not to do this step if you like but from a security and backup point of view I find it helps- Go to User and Groups (via the Linux Mint menu) and add a new user without admin permissions
Install Supporting Files
- Change directory with cd /usr/local
- Download the supporting zipped file sudo wget http://mcmyadmin.com/Downloads/etc.zip
- Unzip the downloaded file sudo unzip etc.zip
- Remove the zipped file sudo rm etc.zip
Install McMyAdmin Itself
This needs to be done as the user you created in the first step- First create a directory for McMyAdmin mkdir ~/McMyAdmin
- Change directory with cd ~/McMyAdmin
- Download the zipped file wget http://mcmyadmin.com/Downloads/MCMA2_glibc26_2.zip
- Unzip the downloaded file unzip MCMA2_glibc26_2.zip
- Remove the zipped file rm MCMA2_glibc26_2.zip
Configure McMyAdmin With An Admin Password
- Run the executable with the -setpass and -configonly options ./MCMA2_Linux_x86_64 -setpass [YOURPASSWORD] -configonly
Running McMyAdmin For The First Time
- Change to the McMyAdmin directory cd ~/McMyAdmin
- Run the executable ./MCMA2_Linux_x86_64
Adding McMyAdmin To Upstart
Having an McMyAdmin server running is a good start but you don't want to have to restart it manually every time you reboot your server. That is where Upstart helps out.
In order to configure Upstart to start up your server you must do the following...
Create Config File
Create a new config file called something like minecraft.conf or mcmyadmin.conf- cd /etc/init
- sudo touch minecraft.conf
Paste in the following code into your conf file making sure to change the path in the cd command to match the location of your McMyAdmin install
<---------------start cutting below this line--------------->
<---------------start cutting below this line--------------->
description "Minecraft server"
start on runlevel [2345]
stop on runlevel [^2345]
#change /home/minecraft/McMyAdmin if you put McMyAdmin somewhere else
exec su minecraft -s /bin/bash -c 'cd /home/minecraft/McMyAdmin;./MCMA2_Linux_x86_64'
<---------------stop cutting above this line---------------> - initctl reload-configuration
which will load your new config file.
Test the service status (which should not yet be running)
- sudo service minecraft status
Start the service
- sudo service minecraft start
Test the service status again (which should now be running)
- sudo service minecraft status
And then stop the service
- sudo service minecraft stop
Once you are happy that the service starts and stops at your command. Reboot the computer. Once it is back up and running recheck the service status and confirm it restarted automatically on reboot.
Port Forwarding for your server
The example is for the Huawei hg533 router but while the exact naming of the settings may differ on other routers the principles will be the same.
Go to the router page on your LAN. This is normally 192.168.1.1 but you may have changed it.
Login as the admin user using your password
- Go to the Advanced NAT, Port Forwarding section
- Click on new to create a new rule
- Set type to Customization
- Protocol to TCP
- External Start and End Ports to 25565 (or whatever port you want your users to access your Minecraft server on)
- Internal Host to the local IP address of your server
- Internal Port to 25565 (or whatever port you have set your McMyAdmin server Minecraft instance to)
- Mapping Name to a suitable name. Mine is set to "Minecraft"