Difference between revisions of "McMyAdmin"

From Amahi Wiki
Jump to: navigation, search
(Switched sh to java)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Note: Below instructions are for Fedora. Ubuntu users replace all "yum"s with "apt-get"s. So:
+
'''NOTE:''' Instructions are customized for Ubuntu. Fedora (not tested with Amahi 7 or greater) users must replace all "apt-get"s with "yum"s. So:
  
{{Code|yum install mono-basic}}
+
apt-get install mono-basic
  
 
becomes
 
becomes
  
{{Code|apt-get install mono-basic}}
+
yum install mono-basic
  
 
=Installing McMyAdmin=
 
=Installing McMyAdmin=
Line 11: Line 11:
 
Minecraft server with web-based front end for server management.
 
Minecraft server with web-based front end for server management.
  
* Install dependencies
+
==Install dependencies==
{{Code|yum install mono-basic
+
*Instructions taken from [http://www.youtube.com/watch?feature=player_embedded&v=dtcDTb3XyTY this very helpful YouTube video].
yum install java-1.6.0-openjdk java-1.6.0-openjdk-plugin-1}}
+
Mono:
* Get and install McMyAdmin
+
apt-get install libmono-system-web2.0-cil libmono-i18n2.0-cil
{{Code|mkdir /var/hda/web-apps/mcmyadmin
+
 
 +
Java:
 +
Copy the link to the appropriate Java version from [http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html here]
 +
 
 +
<pre>wget [YOURLINKHERE.tar.gz]
 +
tar -xvf jdk-7-linux-xxx.tar.gz
 +
mkdir /usr/lib/jvm/
 +
mv ./jdk1.7.0 /usr/lib/jvm/jdk1.7.0
 +
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
 +
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
 +
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
 +
sudo update-alternatives --config java
 +
sudo update-alternatives --config javac
 +
sudo update-alternatives --config javaws</pre>
 +
 
 +
Check Java version, it should be something like:
 +
 
 +
java -version
 +
It should Reply
 +
java version "1.7.0"
 +
Java(TM) SE Runtime Environment (build 1.7.0-b147)
 +
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
 +
 
 +
==Get and install McMyAdmin==
 +
<pre>mkdir /var/hda/web-apps/mcmyadmin
 
wget -P /var/hda/web-apps/mcmyadmin http://www.phonicuk.com/Downloads/McMyAdmin-latest.zip
 
wget -P /var/hda/web-apps/mcmyadmin http://www.phonicuk.com/Downloads/McMyAdmin-latest.zip
 
unzip /var/hda/web-apps/mcmyadmin/McMyAdmin-latest.zip -d /var/hda/web-apps/mcmyadmin/
 
unzip /var/hda/web-apps/mcmyadmin/McMyAdmin-latest.zip -d /var/hda/web-apps/mcmyadmin/
 
chown -R apache:users /var/hda/web-apps/mcmyadmin
 
chown -R apache:users /var/hda/web-apps/mcmyadmin
chmod +x /var/hda/web-apps/mcmyadmin/start.sh}}
+
chmod +x /var/hda/web-apps/mcmyadmin/start.sh</pre>
 
* Start McMyAdmin and Minecraft server
 
* Start McMyAdmin and Minecraft server
{{Code|cd /var/hda/web-apps/mcmyadmin
+
cd /var/hda/web-apps/mcmyadmin
./start.sh}}
+
./start.sh
and wait for it to download the latest Minecraft server.  Once done stop it with '''<Ctrl-C>''' and run the following.
+
and wait for it to download the latest Minecraft server.  Once done stop it with '''<Ctrl-C>''' and run the following to start McMyAdmin. The nohup command will allow you quit the terminal without stopping McMyAdmin server.
{{Code|nohup ./start.sh &}}
+
nohup ./start.sh &
  
 
The web interface runs on port 8080 by default account admin/admin:
 
The web interface runs on port 8080 by default account admin/admin:
{{Link|http://localhost:8080}}
+
<nowiki>http://localhost:8080</nowiki>
  
  
By default the web interface can only be accessed from the machine it is running on. To make it available from another machine the entry passwordmd5 in McMyAdmin.conf.default must be changed. This can be done on the localhost:8080 link by changing the default password from "admin" to something else.
+
By default the web interface can only be accessed from the machine it is running on. To make it available from another machine the entry passwordmd5 in McMyAdmin.conf.default must be changed. This can be done on the localhost:8080 link by changing the default password from "admin" to something else. The McMyAdmin server needs to be rebooted after the password is changed.
  
 
==Installing the Minecraft Server==
 
==Installing the Minecraft Server==
Line 42: Line 66:
 
'''''To logon to a Tekkit server the user must use the [http://www.technicpack.net/launcher/ Technic Launcher] and not the default MineCraft app.'''''
 
'''''To logon to a Tekkit server the user must use the [http://www.technicpack.net/launcher/ Technic Launcher] and not the default MineCraft app.'''''
  
[http://www.technicpack.net/tekkit/ Tekkit] is a collection of Minecraft mods that allows for more advanced gameplay. The purpose of this tutorial is to illustrate the installation of Tekkit on your HDA. All commands below are for the terminal. The instructions are taken from [http://www.youtube.com/watch?v=u8-uGqSyaMo this] fine YouTube video.
+
[http://www.technicpack.net/tekkit/ Tekkit] is a collection of Minecraft mods that allows for more advanced gameplay. The purpose of this tutorial is to illustrate the installation of Tekkit on your HDA. All commands below are for the terminal. Parts of the instructions are taken from [http://www.youtube.com/watch?v=u8-uGqSyaMo this] fine YouTube video.
 +
*Do not start the Minecraft server upon installation of McMyAdmin.
 +
*Logon to McMyAdmin, go to Configuration, Server Settings, and select Tekkit as the Server Type.
 
*Navigate to the default hda web-apps folder
 
*Navigate to the default hda web-apps folder
{{Code|cd /var/hda/web-apps/mcmyadmin}}
+
cd /var/hda/web-apps/mcmyadmin/minecraft
*Create a folder for Tekkit and get in the folder:
 
{{Code|mkdir tekkit
 
cd tekkit}}
 
 
*Download the latest Tekkit server zip file from [http://www.technicpack.net/tekkit/ here]. Replace my link below with your own latest one.
 
*Download the latest Tekkit server zip file from [http://www.technicpack.net/tekkit/ here]. Replace my link below with your own latest one.
{{Code|wget http://mirror.technicpack.net/files/Tekkit_Server_3.0.4.zip}}
+
wget <nowiki>http://mirror.technicpack.net/files/Tekkit_Server_3.0.4.zip</nowiki>
 
*Extract the zip file with unzip. Replace name of file with your own latest one.
 
*Extract the zip file with unzip. Replace name of file with your own latest one.
{{Code|yum install unzip
+
apt-get install unzip
ls
+
ls
unzip Tekkit_Server_3.0.4.zip}}
+
unzip Tekkit_Server_3.0.4.zip
*Create startup script for Tekkit. Note that 1500M stands for the number of megabytes of ram you are letting Tekkit use potentially. The 512M stands for the number of megabytes of ram you let Java use at startup.
 
{{Code|nano start.sh}}
 
  
{{Text|Text=#!/bin/sh
+
Upon starting of the Minecraft server from the McMyAdmin portal, the Tekkit server will be started instead. Building the world and installing the mods and plugins will take a while (around 5-10 minutes), so make sure to give McMyAdmin sufficient time to finish.
java -Xmx1500M -Xms512M -jar Tekkit.jar}}
+
 
 +
The default port is 25565. This may be edited below.
 +
 
 +
===Creating a Tekkit Script===
 +
This is only required if you are striving to have a Vanilla and Tekkit server running side by side.
 +
 
 +
Note that 1500M stands for the number of megabytes of ram you are letting Tekkit use potentially. The 512M stands for the number of megabytes of ram you let Java use at startup.
 +
nano start.sh
 +
 
 +
#!/bin/sh
 +
java -Xmx1500M -Xms512M -jar Tekkit.jar
 
*Give permissions to the script.
 
*Give permissions to the script.
{{Code|chmod +x start.sh}}
+
chmod +x start.sh
 
*Start Tekkit
 
*Start Tekkit
{{Code|./start.sh}}
+
nohup ./start.sh
 
 
 
 
The default port is 25565. This will be edited below.
 
  
 
=Tekkit with McMyAdmin=
 
=Tekkit with McMyAdmin=
 +
------------------
 +
'''Please note that this section was written before McMyAdmin had an option for Tekkit. To make vanilla and TekkiT Minecraft versions run simultaneously, you should also create the Tekkit script from above.'''
 +
------------------
  
 
* Before continuing, you must start Tekkit and stop it after Tekkit has completely loaded. This will create essential files.
 
* Before continuing, you must start Tekkit and stop it after Tekkit has completely loaded. This will create essential files.
{{Code|cd /var/hda/web-apps/tekkit
+
cd /var/hda/web-apps/tekkit
./start.sh
+
./start.sh
stop}}
+
stop
 
* You must also do the same thing with McMyAdmin
 
* You must also do the same thing with McMyAdmin
{{Code|cd /var/hda/web-apps/mcmyadmin
+
cd /var/hda/web-apps/mcmyadmin
mono McMyAdmin.exe
+
mono McMyAdmin.exe
stop}}
+
stop
  
For the purposes of this tutorial, it is assumed that both McMyAdmin and Tekkit have been installed and started/stopped as outlined above. We need to copy the Tekkit files into McMyAdmin. I used the GUI here and am unfamiliar with the terminal commands.
+
For the purposes of this tutorial, it is assumed that both McMyAdmin and Tekkit have been installed and started/stopped as outlined above. We need to copy the Tekkit files into McMyAdmin.  
  
 
* Go into the Tekkit folder, rename Tekkit.jar to craftbukkit.jar
 
* Go into the Tekkit folder, rename Tekkit.jar to craftbukkit.jar
 +
cd /var/hda/web-apps/mcmyadmin/tekkit/
 +
mv Tekkit.jar craftbukkit.jar
  
 
==Tekkit and Minecraft Vanilla Coexisting in McMyAdmin==
 
==Tekkit and Minecraft Vanilla Coexisting in McMyAdmin==
Line 86: Line 119:
 
* Follow the McMyAdmin tutorial above, except name the McMyAdmin folder "McMA_Vanilla". Replace all "McMyAdmin" with "McMA_Vanilla" as needed.
 
* Follow the McMyAdmin tutorial above, except name the McMyAdmin folder "McMA_Vanilla". Replace all "McMyAdmin" with "McMA_Vanilla" as needed.
 
* Create a folder called MineCraft.
 
* Create a folder called MineCraft.
{{Code|mkdir /var/hda/web-apps/MineCraft}}
+
mkdir /var/hda/web-apps/MineCraft
 
* Copy (not move) McMA_Vanilla into the MineCraft folder.
 
* Copy (not move) McMA_Vanilla into the MineCraft folder.
{{Code|cp -fr /var/hda/web-apps/McMA_Vanilla /var/hda/web-apps/MineCraft}}
+
cp -fr /var/hda/web-apps/McMA_Vanilla /var/hda/web-apps/MineCraft
 
* Rename the original McMA_Vanilla to McMA_Tekkit.
 
* Rename the original McMA_Vanilla to McMA_Tekkit.
 
* Move McMA_Tekkit into MineCraft folder.
 
* Move McMA_Tekkit into MineCraft folder.
{{Code|mv /var/hda/web-apps/McMA_Tekkit /var/hda/web-apps/MineCraft}}
+
mv /var/hda/web-apps/McMA_Tekkit /var/hda/web-apps/MineCraft
 
* Follow the Tekkit tutorial above.
 
* Follow the Tekkit tutorial above.
 
* Rename the Tekkit.jar file to craftbukkit.jar, AFTER having started and stopped the Tekkit and MineCraft servers at least once as outlined above.
 
* Rename the Tekkit.jar file to craftbukkit.jar, AFTER having started and stopped the Tekkit and MineCraft servers at least once as outlined above.
{{Code|cd /var/hda/web-apps/tekkit
+
Code|cd /var/hda/web-apps/tekkit
RENAME command}}
+
mv Tekkit.jar craftbukkit.jar
 
* Copy the contents of the tekkit folder into the McMA_Tekkit/Minecraft folder, merge and replace all files as needed.
 
* Copy the contents of the tekkit folder into the McMA_Tekkit/Minecraft folder, merge and replace all files as needed.
 
* Delete the now empty tekkit directory
 
* Delete the now empty tekkit directory
{{Code|rm -fr /var/hda/web-apps/tekkit}}
+
rm -fr /var/hda/web-apps/tekkit
 
* Now we must edit the ports so that both McMyAdmin servers can run at the same time:
 
* Now we must edit the ports so that both McMyAdmin servers can run at the same time:
{{Code|cd /var/hda/web-apps/MineCraft/McMA_Tekkit
+
cd /var/hda/web-apps/MineCraft/McMA_Tekkit
nano /McMyAdmin.conf}}
+
nano /McMyAdmin.conf
 
Change webserver.port=8080 (line 71) to webserver.port=8081<br />
 
Change webserver.port=8080 (line 71) to webserver.port=8081<br />
 
Change server.address=localhost:25565 (line 152) to server.address=localhost:25665<br />
 
Change server.address=localhost:25565 (line 152) to server.address=localhost:25665<br />
 
To save do ctrl+x, y (to confirm save), and enter
 
To save do ctrl+x, y (to confirm save), and enter
 
* And the same must be done with the MineCraft servers
 
* And the same must be done with the MineCraft servers
{{Code|cd /var/hda/web-apps/MineCraft/McMA_Tekkit/Minecraft
+
cd /var/hda/web-apps/MineCraft/McMA_Tekkit/Minecraft
nano server.properties}}
+
nano server.properties
 
Change server-port 25565 (line 8) to server-port 25665<br />
 
Change server-port 25565 (line 8) to server-port 25665<br />
 
To save do ctrl+x, y (to confirm save)
 
To save do ctrl+x, y (to confirm save)
 
* Start the Tekkit server
 
* Start the Tekkit server
{{Code|cd /var/hda/web-apps/MineCraft/McMA_Tekkit
+
cd /var/hda/web-apps/MineCraft/McMA_Tekkit
mono McMyAdmin.exe}}
+
mono McMyAdmin.exe
 
* In a new terminal, start the Vanilla server
 
* In a new terminal, start the Vanilla server
{{Code|cd /var/hda/web-apps/MineCraft/McMA_Vanilla
+
cd /var/hda/web-apps/MineCraft/McMA_Vanilla
mono McMyAdmin.exe}}
+
mono McMyAdmin.exe
  
 
=Access McMyAdmin=
 
=Access McMyAdmin=
 
* For the Tekkit McMyAdmin:
 
* For the Tekkit McMyAdmin:
{{link|http://hda:8081}}
+
<nowiki>http://hda:8081</nowiki>
 
* For the Vanilla McMyAdmin:
 
* For the Vanilla McMyAdmin:
{{Link|http://hda:8080}}
+
<nowiki>http://hda:8080</nowiki>
  
 
=Join MineCraft Server with Client=
 
=Join MineCraft Server with Client=
 
* For the Tekkit server:
 
* For the Tekkit server:
{{Link|http://(hda IP):25665}}
+
<nowiki>http://(hda IP):25665</nowiki>
 
* For the Vanilla server:
 
* For the Vanilla server:
{{Link|http://(hda IP):25565}}
+
<nowiki>http://(hda IP):25565</nowiki>
  
 
[[Category:Apps]]
 
[[Category:Apps]]

Latest revision as of 01:01, 25 March 2016

NOTE: Instructions are customized for Ubuntu. Fedora (not tested with Amahi 7 or greater) users must replace all "apt-get"s with "yum"s. So:

apt-get install mono-basic

becomes

yum install mono-basic

Installing McMyAdmin

Minecraft server with web-based front end for server management.

Install dependencies

Mono:

apt-get install libmono-system-web2.0-cil libmono-i18n2.0-cil

Java: Copy the link to the appropriate Java version from here

wget [YOURLINKHERE.tar.gz]
tar -xvf jdk-7-linux-xxx.tar.gz
mkdir /usr/lib/jvm/
mv ./jdk1.7.0 /usr/lib/jvm/jdk1.7.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

Check Java version, it should be something like:

java -version
It should Reply
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)

Get and install McMyAdmin

mkdir /var/hda/web-apps/mcmyadmin
wget -P /var/hda/web-apps/mcmyadmin http://www.phonicuk.com/Downloads/McMyAdmin-latest.zip
unzip /var/hda/web-apps/mcmyadmin/McMyAdmin-latest.zip -d /var/hda/web-apps/mcmyadmin/
chown -R apache:users /var/hda/web-apps/mcmyadmin
chmod +x /var/hda/web-apps/mcmyadmin/start.sh
  • Start McMyAdmin and Minecraft server
cd /var/hda/web-apps/mcmyadmin
./start.sh

and wait for it to download the latest Minecraft server. Once done stop it with <Ctrl-C> and run the following to start McMyAdmin. The nohup command will allow you quit the terminal without stopping McMyAdmin server.

nohup ./start.sh &

The web interface runs on port 8080 by default account admin/admin:

http://localhost:8080


By default the web interface can only be accessed from the machine it is running on. To make it available from another machine the entry passwordmd5 in McMyAdmin.conf.default must be changed. This can be done on the localhost:8080 link by changing the default password from "admin" to something else. The McMyAdmin server needs to be rebooted after the password is changed.

Installing the Minecraft Server

The Minecraft server is included with McMyAdmin and runs on port 25565 by default. After users have properly forwarded ports to the Amahi server Minecraft players will be able to use the HDA URL to connect to the server.

Cronjob will need to be set for autostart on boot. Amahi may also be able to monitor this server to make sure it is running, similar to other services.

Installing the Tekkit Server

To logon to a Tekkit server the user must use the Technic Launcher and not the default MineCraft app.

Tekkit is a collection of Minecraft mods that allows for more advanced gameplay. The purpose of this tutorial is to illustrate the installation of Tekkit on your HDA. All commands below are for the terminal. Parts of the instructions are taken from this fine YouTube video.

  • Do not start the Minecraft server upon installation of McMyAdmin.
  • Logon to McMyAdmin, go to Configuration, Server Settings, and select Tekkit as the Server Type.
  • Navigate to the default hda web-apps folder
cd /var/hda/web-apps/mcmyadmin/minecraft
  • Download the latest Tekkit server zip file from here. Replace my link below with your own latest one.
wget http://mirror.technicpack.net/files/Tekkit_Server_3.0.4.zip
  • Extract the zip file with unzip. Replace name of file with your own latest one.
apt-get install unzip
ls
unzip Tekkit_Server_3.0.4.zip

Upon starting of the Minecraft server from the McMyAdmin portal, the Tekkit server will be started instead. Building the world and installing the mods and plugins will take a while (around 5-10 minutes), so make sure to give McMyAdmin sufficient time to finish.

The default port is 25565. This may be edited below.

Creating a Tekkit Script

This is only required if you are striving to have a Vanilla and Tekkit server running side by side.

Note that 1500M stands for the number of megabytes of ram you are letting Tekkit use potentially. The 512M stands for the number of megabytes of ram you let Java use at startup.

nano start.sh
#!/bin/sh
java -Xmx1500M -Xms512M -jar Tekkit.jar
  • Give permissions to the script.
chmod +x start.sh
  • Start Tekkit
nohup ./start.sh

Tekkit with McMyAdmin


Please note that this section was written before McMyAdmin had an option for Tekkit. To make vanilla and TekkiT Minecraft versions run simultaneously, you should also create the Tekkit script from above.


  • Before continuing, you must start Tekkit and stop it after Tekkit has completely loaded. This will create essential files.
cd /var/hda/web-apps/tekkit
./start.sh
stop
  • You must also do the same thing with McMyAdmin
cd /var/hda/web-apps/mcmyadmin
mono McMyAdmin.exe
stop

For the purposes of this tutorial, it is assumed that both McMyAdmin and Tekkit have been installed and started/stopped as outlined above. We need to copy the Tekkit files into McMyAdmin.

  • Go into the Tekkit folder, rename Tekkit.jar to craftbukkit.jar
cd /var/hda/web-apps/mcmyadmin/tekkit/
mv Tekkit.jar craftbukkit.jar

Tekkit and Minecraft Vanilla Coexisting in McMyAdmin

  • Follow the McMyAdmin tutorial above, except name the McMyAdmin folder "McMA_Vanilla". Replace all "McMyAdmin" with "McMA_Vanilla" as needed.
  • Create a folder called MineCraft.
mkdir /var/hda/web-apps/MineCraft
  • Copy (not move) McMA_Vanilla into the MineCraft folder.
cp -fr /var/hda/web-apps/McMA_Vanilla /var/hda/web-apps/MineCraft
  • Rename the original McMA_Vanilla to McMA_Tekkit.
  • Move McMA_Tekkit into MineCraft folder.
mv /var/hda/web-apps/McMA_Tekkit /var/hda/web-apps/MineCraft
  • Follow the Tekkit tutorial above.
  • Rename the Tekkit.jar file to craftbukkit.jar, AFTER having started and stopped the Tekkit and MineCraft servers at least once as outlined above.
Code|cd /var/hda/web-apps/tekkit
mv Tekkit.jar craftbukkit.jar
  • Copy the contents of the tekkit folder into the McMA_Tekkit/Minecraft folder, merge and replace all files as needed.
  • Delete the now empty tekkit directory
rm -fr /var/hda/web-apps/tekkit
  • Now we must edit the ports so that both McMyAdmin servers can run at the same time:
cd /var/hda/web-apps/MineCraft/McMA_Tekkit
nano /McMyAdmin.conf

Change webserver.port=8080 (line 71) to webserver.port=8081
Change server.address=localhost:25565 (line 152) to server.address=localhost:25665
To save do ctrl+x, y (to confirm save), and enter

  • And the same must be done with the MineCraft servers
cd /var/hda/web-apps/MineCraft/McMA_Tekkit/Minecraft
nano server.properties

Change server-port 25565 (line 8) to server-port 25665
To save do ctrl+x, y (to confirm save)

  • Start the Tekkit server
cd /var/hda/web-apps/MineCraft/McMA_Tekkit
mono McMyAdmin.exe
  • In a new terminal, start the Vanilla server
cd /var/hda/web-apps/MineCraft/McMA_Vanilla
mono McMyAdmin.exe

Access McMyAdmin

  • For the Tekkit McMyAdmin:
http://hda:8081
  • For the Vanilla McMyAdmin:
http://hda:8080

Join MineCraft Server with Client

  • For the Tekkit server:
http://(hda IP):25665
  • For the Vanilla server:
http://(hda IP):25565