Minecraft McMyAdmin on CentOS 6

Home » Computer Articles » Linux » Minecraft McMyAdmin on CentOS 6
March 18, 2015 Linux No Comments

I have setup a McMyAdmin (for Minecraft) on CentOS 6. Now my VPS is 2G of ram, 4 CPU cores and 40G ssd hard drive.

 

Some software you will need to install.

# yum install screen nano java-1.7.0-openjdk

 

Setup Iptables to allow connection to McMyAdmin.

# vi /etc/sysconfig/iptables

iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

 

# service iptables restart

 

 

Download some needed files for McMyAdmin

# cd /usr/local

# wget http://mcmyadmin.com/Downloads/etc.zip 

# unzip etc.zip

# rm etc.zip

 

 

Create a user for McMyAdmin

# useradd minecraft 

# passwd minecraft (Set your password)

 

 

Change to your minecraft user and run commands below.

# su - minecraft

$ mkdir ~/McMyAdmin

$ cd ~/McMyAdmin

$ wget http://mcmyadmin.com/Downloads/MCMA2_glibc26_2.zip

$ unzip MCMA2_glibc26_2.zip

$ rm MCMA2_glibc26_2.zip

$ ./MCMA2_Linux_x86_64 -setpass [YOURPASSWORD] -configonly (Change to the password you would like to use and also you don't need the square brackets.)

 

 

Now you can run your server with this command.

$ cd ~/McMyAdmin; ./MCMA2_Linux_x86_64

 

 

You can connect to your new server with a web browser.

http://youripaddress:8080

 

 

How much memory do you have on your server? I have 2G of ram so I will setup McMyAdmin (Minecraft) to use 1536. Also when running the server it is better to use screen, as you can run some commands this way.

$ screen -dmS McMyAdmin ./MCMA2_Linux_x86_64 +Java.Memory 1536

 

 

Now we want to start server as our regular user

# su -  minecraft -c cd ~/McMyAdmin; screen ./MCMA2_Linux_x86_64 +Java.Memory 1536

 

 

If you want the service to restart after you restart your server. Then add this to your crontab minecraft user.

$ crontab -e

@reboot cd ~/McMyAdmin && screen -dmS McMyAdmin ./MCMA2_Linux_x86_64 +Java.Memory 1536

 

 

If you notice after running the commands above you will not see the console. If you need to see the console.

$ screen -x

If you receive Cannot open your terminal '/dev/pts/1' - please check. Then run command below before screen. I believe it has something to do with you being logged in as a different user. If you logged in as minecraft user you shouldn't have any problems.

$ script /dev/null

$ screen -x

/quit (This will shutdown the McMyAdmin server)

ctrl-a d (This will exit screen without shutting down the server)

 

 

Now you can login to the web interface and make the changes you like. For some reason I couldn't setup users to login to minecraft. So I disabled whitelist in McMyAdmin > Configuration > Features > No Whitelisting and setup whitelisting manually on the server.

$ cd Minecraft

$ vi white-list.txt  (Add users one line at a time and restart server. You can control who login to your server)

 

There could be other changes you would like to make. Check out the web interface and make the changes that are need.

 

 

References:

McMyAdmin 2 website.

http://forums.cubecoders.com/default.aspx?g=posts&t=263#post548

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.