| | 1 | = Introduction = |
| | 2 | |
| | 3 | [https://www.pocketmine.net/ PocketMine] is an open source server for playing [https://minecraft.net/ MineCraft Pocket Edition (MCPE)] is available on iOS and android. |
| | 4 | |
| | 5 | Important: This guide is for developers if you simply like to run PocketMine on Windows or Linux look at [https://www.pocketmine.net/#get their website]. |
| | 6 | |
| | 7 | This guide is intended to get PocketMine to work from Git for use with iOS client MineCraft PE v0.14.0. The server software being using is [http://freebsd.org FreeBSD]. I am running it inside a [wiki:FreeBSDJail] |
| | 8 | |
| | 9 | |
| | 10 | rzplay# svn co http://svn.freebsd.org/ports/head /usr/ports |
| | 11 | |
| | 12 | = Update few outdated ports = |
| | 13 | |
| | 14 | {{{ |
| | 15 | rvdzwet@rzplay:/home/rvdzwet % svn diff /usr/ports/textproc/pecl-yaml |
| | 16 | Index: /usr/ports/textproc/pecl-yaml/Makefile |
| | 17 | =================================================================== |
| | 18 | --- /usr/ports/textproc/pecl-yaml/Makefile (revision 409208) |
| | 19 | +++ /usr/ports/textproc/pecl-yaml/Makefile (working copy) |
| | 20 | @@ -2,7 +2,7 @@ |
| | 21 | # $FreeBSD$ |
| | 22 | |
| | 23 | PORTNAME= yaml |
| | 24 | -PORTVERSION= 1.2.0 |
| | 25 | +PORTVERSION= 2.0.0RC7 |
| | 26 | CATEGORIES= textproc pear |
| | 27 | MASTER_SITES= http://pecl.php.net/get/ |
| | 28 | PKGNAMEPREFIX= pecl- |
| | 29 | @@ -20,6 +20,5 @@ |
| | 30 | USE_PHP= yes |
| | 31 | USE_PHP_BUILD= yes |
| | 32 | USE_PHPEXT= yes |
| | 33 | -IGNORE_WITH_PHP= 70 |
| | 34 | |
| | 35 | .include <bsd.port.mk> |
| | 36 | Index: /usr/ports/textproc/pecl-yaml/distinfo |
| | 37 | =================================================================== |
| | 38 | --- /usr/ports/textproc/pecl-yaml/distinfo (revision 409208) |
| | 39 | +++ /usr/ports/textproc/pecl-yaml/distinfo (working copy) |
| | 40 | @@ -1,2 +1,2 @@ |
| | 41 | -SHA256 (PECL/yaml-1.2.0.tgz) = fdf0eec6bf16b0c45e58076a2048f96140a778463724fb82ab49ab5fb4c7e19a |
| | 42 | -SIZE (PECL/yaml-1.2.0.tgz) = 38606 |
| | 43 | +SHA256 (PECL/yaml-2.0.0RC7.tgz) = d49acf2b7843258957a16df0d7ced56c0e1fc3eaa54f54289e4012edc002814c |
| | 44 | +SIZE (PECL/yaml-2.0.0RC7.tgz) = 38233 |
| | 45 | }}} |
| | 46 | {{{ |
| | 47 | rvdzwet@rzplay:/home/rvdzwet % svn diff /usr/ports/devel/pecl-pthreads |
| | 48 | Index: /usr/ports/devel/pecl-pthreads/Makefile |
| | 49 | =================================================================== |
| | 50 | --- /usr/ports/devel/pecl-pthreads/Makefile (revision 409208) |
| | 51 | +++ /usr/ports/devel/pecl-pthreads/Makefile (working copy) |
| | 52 | @@ -2,7 +2,7 @@ |
| | 53 | # $FreeBSD$ |
| | 54 | |
| | 55 | PORTNAME= pthreads |
| | 56 | -PORTVERSION= 2.0.10 |
| | 57 | +PORTVERSION= 3.1.6 |
| | 58 | CATEGORIES= devel |
| | 59 | MASTER_SITES= http://pecl.php.net/get/ |
| | 60 | PKGNAMEPREFIX= pecl- |
| | 61 | Index: /usr/ports/devel/pecl-pthreads/distinfo |
| | 62 | =================================================================== |
| | 63 | --- /usr/ports/devel/pecl-pthreads/distinfo (revision 409208) |
| | 64 | +++ /usr/ports/devel/pecl-pthreads/distinfo (working copy) |
| | 65 | @@ -1,2 +1,2 @@ |
| | 66 | -SHA256 (PECL/pthreads-2.0.10.tgz) = 8bdf8d8918680421ca0ced1e62292eeb626f800a808d0a3b6812841756588cf6 |
| | 67 | -SIZE (PECL/pthreads-2.0.10.tgz) = 85247 |
| | 68 | +SHA256 (PECL/pthreads-3.1.6.tgz) = bb13da909a7a7ae1f9e499166103a2d24628993238ce03a8aae3eaa492c0b736 |
| | 69 | +SIZE (PECL/pthreads-3.1.6.tgz) = 80932 |
| | 70 | }}} |
| | 71 | |
| | 72 | |
| | 73 | = Compile PHP from ports as ZTS feature is needed for pthreads = |
| | 74 | |
| | 75 | rzplay# pkg delete 'php7*' |
| | 76 | rzplay# make -C /usr/ports/lang/php70 WITH=ZTS deinstall reinstall |
| | 77 | rzplay# make -C /usr/ports/devel/pecl-pthreads deinstall reinstall |
| | 78 | rzplay# make -C /usr/ports/archivers/php70-phar deinstall reinstall |
| | 79 | rzplay# make -C /usr/ports/archivers/php70-zlib deinstall reinstall |
| | 80 | rzplay# make -C /usr/ports/databases/php70-sqlite3 deinstall reinstall |
| | 81 | rzplay# make -C /usr/ports/textproc/pecl-yaml deinstall reinstall |
| | 82 | rzplay# make -C /usr/ports/ftp/php70-curl deinstall reinstall |
| | 83 | rzplay# make -C /usr/ports/lang/php70-extensions config |
| | 84 | rzplay# make -C /usr/ports/net/php70-sockets deinstall reinstall |
| | 85 | rzplay# make -C /usr/ports/math/php70-bcmath deinstall reinstall |
| | 86 | rzplay# make -C /usr/ports/devel/php70-json deinstall reinstall |
| | 87 | |
| | 88 | |
| | 89 | = Add some more standard packages = |
| | 90 | rzplay# pkg install git bash subversion |
| | 91 | |
| | 92 | = Checkout Source Code and dependencies = |
| | 93 | rzplay% git clone https://github.com/PocketMine/PocketMine-MP |
| | 94 | rzplay% ( cd PocketMine-MP/src/spl ; git submodule init; git submodule update ) |
| | 95 | |
| | 96 | = All done, let's start the server = |
| | 97 | rzplay% bash ./PocketMine-MP/start.sh -p /usr/local/bin/php |
| | 98 | |
| | 99 | = (Optional) automatic starting of application = |
| | 100 | |
| | 101 | Since it is interactive I like to start it in a screen session on boot by including it into crontab |
| | 102 | rzplay% crontab -e |
| | 103 | {{{ |
| | 104 | @reboot $HOME/start-pocketmine.sh |
| | 105 | }}} |
| | 106 | |
| | 107 | {{{ |
| | 108 | rzplay% cat <<EOF > $HOME/start-pocketmine.sh |
| | 109 | /usr/local/bin/screen -S PocketMine -d -m bash $HOME/PocketMine-MP/start.sh -p /usr/local/bin/php |
| | 110 | EOF |
| | 111 | }}} |
| | 112 | rzplay% chmod 755 $HOME/start-pocketmine.sh |
| | 113 | |
| | 114 | |
| | 115 | |
| | 116 | |
| | 117 | |
| | 118 | Questions and/or Comments? Please send them to [mailto:info@rickvanderzwet.nl me] |
| | 119 | |