Deploying PocketMine on MineOS

Thanks for the detailed explanation and all the time and effort you put into this!

Will do my best to give this a go, the coming week.
My kids would be happy if I can get this up and running :slight_smile:

its really cool!
but without players online very bad, maybe edit several lines of code in distr…
At the same time and update vebmin to 1.730 and this bootstrap theme:http://theme.winfuture.it/

I got the error “install make”
This is a clean install of MineOS Turnkey.
How do I install “make”?

I have logged in as root and downloaded make from http://ftp.gnu.org/gnu/make/, but how do I make it install?

Did you run the first two commands–the ones with apt get and update/install?

I thought I did, and thought all went well.
Is it okay for me to re-do all the instructions? I wasn’t sure if I can repeat steps.
Sorry, novice with Unix.

I repeated this from the beginning and watched more carefully. There is an error at the first step of apt-get update

Failed to fetch http://cdn.debian.net/debian/dists/wheezy/main i386 Packages
404 Not Found [IP: 46.4.205.44 80]
Failed to fetch http://cdn.debian.net/debian/dists/wheezy/contrib i386 Packages
404 Not Found [IP: 46.4.205.44 80]
Failed to fetch http://cdn.debian.net/debian/dists/wheezy/main/binary-i386 Packages
404 Not Found [IP: 46.4.205.44 80]
Failed to fetch http://cdn.debian.net/debian/dists/wheezy/contrib/binary-i386 Packages
404 Not Found [IP: 46.4.205.44 80]

Hexparrot, im concerned with this line.
I have a server (metal) running my minecraft games now.
Are you saying that I shouldnt do this on my currently running server (metal not VM)?
Or are you saying to turn off the running minecraft servers before starting the install of the pocketmine stuff?

1 Like

To elaborate on step 6:

As root:
iptables -A INPUT -p tcp --dport 19132 -j ACCEPT
iptables -A INPUT -p udp --dport 19132 -j ACCEPT

1 Like

I advise not doing his on a production server because the make (compiling php) could potentially use up all the cpu cycles on your machine. If people are playing on your other, non-pocketmine servers, they may experience slowness, lag and other undesirable issues…but otherwise, there’s no danger: just potential game disruption.

Got ya.
I will just shut down the server overnight, as its just family that plays and see if I can take a wack at it over the weekend.

Brian L

Just got this up and running on my MineOS VM. Thanks for the write-up hex!

Mine seems to be bombing out during the php compile, not sure what the error means.

Here’s the console output.

mc@core ~/pmserver$ wget -q -O - http://get.pocketmine.net/ | bash
[*] Found PocketMine-MP Final_1.4.1 (build 980) using API 1.11.0
[*] This stable build was released on Wed Mar 18 03:00:47 AEST 2015
[+] The build was signed, will check signature
[*] Installing/updating PocketMine-MP on directory ./
[1/3] Cleaning...
[2/3] Downloading PocketMine-MP Final_1.4.1 phar... done!
[*] Checking signature of PocketMine-MP.phar
gpg: Signature made Wed Mar 18 03:16:17 2015 AEST using RSA key ID A7837F89
gpg: Good signature from "Shoghi Cervantes <shoghicp@gmail.com>"
gpg:                 aka "keybase.io/shoghicp <shoghicp@keybase.io>"
[+] Signature valid and checked!
[3/3] Obtaining PHP: detecting if build is available...
[3/3] Linux 32-bit PHP build available, downloading PHP_5.6.8_x86_Linux.tar.gz... checking... invalid build detected, please upgrade your OS
[3/3] no build found, compiling PHP automatically
[PocketMine] PHP compiler for Linux, MacOS and Android
[INFO] Checking dependecies
[INFO] Compiling for current machine using 32-bit
[PHP] downloading 5.6.9... done!
[zlib] downloading 1.2.8... checking... compiling...mc@core ~/pmserver$

It’s bombing out on the zlib compile.

Here’s the install.log

mc@core ~/pmserver$ cat install.log
Sat Jun  6 10:32:23 AEST 2015
Linux core 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u1 i686 GNU/Linux
make is /usr/bin/make
autoconf is /usr/bin/autoconf
automake is /usr/bin/automake
libtool is /usr/bin/libtool
m4 is /usr/bin/m4
wget is /usr/bin/wget
getconf is /usr/bin/getconf
gzip is /bin/gzip
bzip2 is /bin/bzip2
wget is /usr/bin/wget
gcc is /usr/bin/gcc
Checking for shared library support...
Building shared library libz.so.1.2.8 with gcc.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o adler32.o adler32.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o crc32.o crc32.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o deflate.o deflate.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o infback.o infback.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inffast.o inffast.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inflate.o inflate.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inftrees.o inftrees.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o trees.o trees.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o zutil.o zutil.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o compress.o compress.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o uncompr.o uncompr.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzclose.o gzclose.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzlib.o gzlib.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzread.o gzread.c
gcc -O2 -fPIC -march=native -mtune=native -fno-gcse -m32   -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzwrite.o gzwrite.c
gcc-ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
make: *** [libz.a] Error 56

I had no problems logging in as root, getting all the packages installed, and doing the git stuff.

Any ideas peeps?
Thanks.

The pocketmine script shows this. What OS are you using–has it been updated recently?

I’m running Turnkey.

mc@core ~/pmserver$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.7 (wheezy)
Release:        7.7
Codename:       wheezy

Alrighty, upgrading to jessie did the trick.

mc@core ~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.1 (jessie)
Release:        8.1
Codename:       jessie

mc@core ~$ uname -a
Linux core 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) i686 GNU/Linux

Here’s the successful pocketmine output.

mc@core ~$ wget -q -O - http://get.pocketmine.net/ | bash
[*] Found PocketMine-MP Final_1.4.1 (build 980) using API 1.11.0
[*] This stable build was released on Wed Mar 18 03:00:47 AEST 2015
[+] The build was signed, will check signature
[*] Installing/updating PocketMine-MP on directory ./
[1/3] Cleaning...
[2/3] Downloading PocketMine-MP Final_1.4.1 phar... done!
[*] Checking signature of PocketMine-MP.phar
gpg: Signature made Wed Mar 18 03:16:17 2015 AEST using RSA key ID A7837F89
gpg: Good signature from "Shoghi Cervantes <shoghicp@gmail.com>"
gpg:                 aka "keybase.io/shoghicp <shoghicp@keybase.io>"
[+] Signature valid and checked!
[3/3] Obtaining PHP: detecting if build is available...
[3/3] Linux 32-bit PHP build available, downloading PHP_5.6.8_x86_Linux.tar.gz... checking... regenerating php.ini... done
[*] Everything done! Run ./start.sh to start PocketMine-MP

I followed the instructions and everything seemed to go well, however I could not start the server from the webui. The console would say that the server had been started and would then immediately shutdown for some reason. I was able to start the server manually by using Putty and entering the command ./start.sh.

I then realised that a new version of Minecraft PE was released in the last week, so my client wouldn’t be able to connect to the server anyway. I downloaded the dev build of the 1.5 PM server, copied into the MineOS “pmserver” folder and renamed it “PocketMine-MP.phar”. I can start the server by entering the command ./start.sh and my client can connect to it too.

I am still not able to start/stop the server from the webui. Any ideas?

(I realise that using a dev build of the server is not ideal, but now that my iPhone has automatically upgraded the client to the latest version, I can’t go back, so I have no choice but to use the dev build of PocketMine).

Just to add to this you’ll need to save the new iptables rules so that the don’t dissapear after reboot, see http://minecraft.codeemo.com/mineoswiki/index.php?title=Iptables

For this part I had I had to type ./start.sh to get it running.

I’m also having problems starting pocketmine through the webui, the webui seems to think the commands been sent but the server never starts. I can start the server manually using ./start.sh and this updates the log in the webui.

As my phone is on MC:PE 0.11.1 unfortunately I can’t connect to 1.4 so will have to update to the development build.

Can’t wait to have a play on this at the weekend, didn’t even know there was a server for MC:PE!

Did you do these things as root (any any point) or as the appropriate user? At least the following things are required for it to work:

All files and directories must not be owned by root, or else they won’t have sufficient privileges

Also, you have to have that dummy profile set up for it, since it’ll try to copy over the file and run that

I know that it’s a bla workflow. I actually just got it working on mineos-node in half the steps. Hopefully soon people will start providing feedback on it in general and it can start replacing this Python mineos webui .

Thanks hexparrot, that was my problem. The .phar file in the profile folder was owned by root. I changed it to mc and now I can start/stop the server from the webui. Thanks!

Turns out that it’s even easier than I hoped. Looking through the install script shows that all the PHP builds are available on sourceforge: http://sourceforge.net/projects/pocketmine/files/builds/

For Python MineOS, this actually just means installing the pre-compiled version of PHP, creating a profile and then creating the server–the latter two steps all from the web-ui. All the business with start.sh and moving files, changing ownership–these become obsolete.

For MineOS-node this means there won’t be any need to go outside the web-ui. It can be downloaded and servers created all within the webui from the first time it starts.

1 Like