Install/Multicraft and Minecraft Server: Difference between revisions

From Playful Exploration
Jump to navigation Jump to search
(Created page with "= Install Multicraft on Debian 8 = == Prepare == Open SSH shell. Elevate yourself to super user su - Update all existing software to latest apt-get -y update...")
 
Line 15: Line 15:


== Install the apache2 web server ==
== Install the apache2 web server ==
Note: Don't need this when installing Nginx as shown further below.


See also: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian-8
See also: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian-8
Line 22: Line 23:
     service apache2 restart
     service apache2 restart
At this point the web server is running.  Web browser should show a default page.
At this point the web server is running.  Web browser should show a default page.


== Install Java from Oracle ==
== Install Java from Oracle ==

Revision as of 06:32, 29 December 2015

Install Multicraft on Debian 8

Prepare

Open SSH shell. Elevate yourself to super user

   su -

Update all existing software to latest

   apt-get -y update
   apt-get -y upgrade


Install the apache2 web server

Note: Don't need this when installing Nginx as shown further below.

See also: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian-8

   apt-get -y install apache2 libapache2-mod-php5 php5-sqlite php5-gd
   apt-get -y install zip unzip
   service apache2 restart

At this point the web server is running. Web browser should show a default page.

Install Java from Oracle

   echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
   echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
   apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
   apt-get update
   apt-get -y install oracle-java8-installer


Install Multicraft

   wget http://www.multicraft.org/download/linux64 -O multicraft.tar.gz
   tar xvzf multicraft.tar.gz
   cd multicraft
   ./setup.sh               #follow the instructions, defaults are ok except for
                            #the web path use /var/www/html

Complete the browser based installation as instructed.

Hide the 'protected' folder, this download test shall fail: http://158.69.197.154/multicraft/protected/data/panel/schema.mysql.sql

   nano /etc/apache2/sites-enabled/000-default.conf

Add a section for /var/www/html

   <Directory /var/www/html>
       Options -Indexes +FollowSymLinks +MultiViews
       AllowOverride All
       Order allow,deny
       allow from all
   </Directory>

Restart apache:

   service apache2 restart
   # Navigate to http://yourserver/multicraft/setup.php and run the installer.

Start Multicraft:

   /home/minecraft/multicraft/bin/multicraft -v start

If all looks good then delete the setup.php file as instructed.

   rm /var/www/html/multicraft/setup.php


Fix the BukGet list by fixing some php files

   cd /var/www/html/multicraft/
   wget http://multicraft.org/files/bg_update_2014.02.zip
   unzip bg_update_2014.02.zip
   rm bg_update_2014.02.zip


Make Multicraft auto start after reboot

   nano /etc/rc.local

Add this to the end of the file before the exit(0) command:

   /home/minecraft/multicraft/bin/multicraft -v start


Create a server and add the craftbukkit plugins if choice

...


Add Group Manager

This manually adds the the group permissions plugin which doesn't come with the multicraft repository. See http://wiki.ess3.net/wiki/Group_Manager.

   cd /home/minecraft/multicraft/servers/server4/plugins/  # change server4 to actual server location
   wget https://github.com/essentials/Essentials/releases/download/gm-final/EssentialsGroupManager.jar
   chown mc4:mc4 EssentialsGroupManager.jar  # change mc4 to match the user of the other jar files
   chmod 770 EssentialsGroupManager.jar

Using multicraft restart the mc server. This will create a GroupMananger directory in the plugins folder.

   cd /home/minecraft/multicraft/servers/server4/plugins/  # change server4 to actual server location
   cd GroupManager/
   rm globalgroups.yml
   wget https://raw.githubusercontent.com/essentials/Essentials/release/EssentialsGroupManager/src/globalgroups.yml
   chown mc4:mc4 globalgroups.yml    # change mc4 to match the user of the other jar files
   cd worlds/world/
   rm groups.yml
   wget https://raw.githubusercontent.com/essentials/Essentials/release/EssentialsGroupManager/src/groups.yml
   
   chmod 770 *.jar
   chown mc4:mc4 *                   # change server4 to actual server location
   cd /home/minecraft/_
   # rm *
   wget http://dev.bukkit.org/media/files/780/922/Essentials.zip
   wget http://dev.bukkit.org/media/files/780/921/Essentials-extra.zip
   unzip Essentials.zip
   unzip Essentials-extra.zip
   rm EssentialsProtect.jar   # this one prevents deleting block, not sure why, so remove it for now
   chmod 770 *.jar
   chown mc4:mc4 *                   # change server4 to actual server location
   mv *.jar /home/minecraft/multicraft/servers/server4/plugins/


Install spigot essentials

See http://www.instructables.com/id/How-to-install-Essentials-18-for-BukkitSpigot/?ALLSTEPS

   cd /home/minecraft/multicraft/servers/server4/plugins/  # change server4 to actual server location
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/Essentials/target/Essentials-2.x-SNAPSHOT.jar -O Essentials-2.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsSpawn/target/EssentialsSpawn-2.x-SNAPSHOT.jar -O EssentialsSpawn.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsAntiBuild/target/EssentialsAntiBuild-2.x-SNAPSHOT.jar -O EssentialsAntiBuild.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsChat/target/EssentialsChat-2.x-SNAPSHOT.jar -O EssentialsChat.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsGeoIP/target/EssentialsGeoIP-2.x-SNAPSHOT.jar -O EssentialsGeoIP.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsProtect/target/EssentialsProtect-2.x-SNAPSHOT.jar -O EssentialsProtect.jar
   wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsXMPP/target/EssentialsXMPP-2.x-SNAPSHOT.jar -O EssentialsXMPP.jar
   # wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsGeoIP/target/original-EssentialsGeoIP-2.x-SNAPSHOT.jar -O original-EssentialsGeoIP.jar
   # wget https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/lastSuccessfulBuild/artifact/EssentialsXMPP/target/original-EssentialsXMPP-2.x-SNAPSHOT.jar -O original-EssentialsXMPP.jar


Add BuyCraft

See https://server.buycraft.net/setup.

   cd /home/minecraft/multicraft/servers/server4/plugins/  # change server4 to actual server location
   wget http://dev.bukkit.org/media/files/900/161/Buycraft.jar

past this into the mc console

   /buycraft secret 786d18a6060ac247667d9380f550202452e7e8f8
   

Install LEMP, linux nginx mysql php

See: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-debian-7 See: http://stackoverflow.com/questions/25591040/nginx-serves-php-files-as-downloads-instead-of-executing-them

   apt-get update
   apt-get install mysql-server    #leave passwords blank
   mysql_install_db
   /usr/bin/mysql_secure_installation
   apt-get install nginx-full
   service nginx start
   nano /etc/nginx/sites-available/default

look for:

   [...]
   server {
       listen   80;

add index.php to index

   index index.php index.html index.htm;

change the server name to server name or ip

   server_name m.chaospage.com;

Change the "location ~ \.php$ {" section, uncomment include snippets/fastcgi-php.conf

   location ~ \.php$ {
     try_files $uri =404;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;

also protect the multicraft protected folder

   location /multicraft/protected {
       deny all;
       return 404;
   }

Install and Configure PHP

   apt-get install php5-fpm php5-mysql
   nano /etc/php5/fpm/php.ini  # origin suggests to set cgi.fix_pathinfo=0
   echo '<?php phpinfo(); ?>' > /var/www/html/phpinfo21.php

Navigate to http://m.chaospage.com/phpinfo21.php to enure the php page runs correctly


Install MediaWiki, on a Nginx Server

See: http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/