Raspberry PI 2 Linux Server

Post Reply
DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Raspberry PI 2 Linux Server

by DoyleChris » Post

I have tried in the past with no luck. I have a brand new Raspberry PI 2 with Jessie Linux on it.
Now i am trying to find the best tutorial on how to get everything installed. Whether i haft to compile it or just download it. And then get all my mods from my windows computer to the PI unit.

User avatar
Prot
Member
Posts: 36
Joined: Thu Apr 02, 2015 13:20
GitHub: EuPhobos
In-game: EuPhobos
Location: SaratOFF

Re: Raspberry PI 2 Linux Server

by Prot » Post

According to this https://packages.debian.org/search?suit ... s=minetest debian jessie already has minetest 0.4.13 for armel, no need to compile, just "apt-get -t=jessie-backports install minetest" and move your mods. But the server will be very slow..

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Rpi2 has a quad-core 900mhz (oc 1ghz) 1gb mem.

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: Raspberry PI 2 Linux Server

by Ivà » Post

DoyleChris wrote:I have tried in the past with no luck. I have a brand new Raspberry PI 2 with Jessie Linux on it.
Now i am trying to find the best tutorial on how to get everything installed. Whether i haft to compile it or just download it. And then get all my mods from my windows computer to the PI unit.
Do you want to use the RPi2 as a client or as a server?

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Server. So i can run it all the time, and i can connect with my laptop or phone or tablet.

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: Raspberry PI 2 Linux Server

by Ivà » Post

It's not difficult, really. It's a mater of copy&paste in a terminal:

http://dev.minetest.net/Compiling_Minet ... NU.2FLinux

When invoking CMake, use -DENABLE_CLIENT=0 too to save a bit of compiling time.

Cheers,

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

so i went through all that on the link it compiled the game but i dont have a minetestserver executable also i can run the minetest game itself from the minetest directory.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Raspberry PI 2 Linux Server

by ExeterDad » Post

I'm anxious to hear the outcome of this when you get it up and running. I have a Pi2 that I'm using as a media server and would like very much to put a Minetest server on it for LAN use if it will work reasonably well. I'm all about saving on the electric bill.
I'm about to get a couple days off. Maybe I'll goof around with it. And I'll make a installable server package to share with you if it is successful. Just keep in mind my Pi2 is headless so you will have to be comfortable with the shell.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Well i went through the steps of compiling minetest on it but i dont have a minetestserver file.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Raspberry PI 2 Linux Server

by ExeterDad » Post

I just built minetest-server without a hitch on my Pi2. I fired it up without any tweaks or settings.

Code: Select all

./minetestserver
I have to say it was pretty darn satisfying getting a Minetest server on that little bugger.

I'm not sure how your Pi2 is setup. As I said earlier mine is headless so it's all command line. I decided to do a quick dirty "Run In Place" build as I wanted to make sure I'd be happy with it and want to make a .deb for a system install. This is how "I" did it. Adjust to your needs:

1) I ssh'd into my pi and decided I was fine with building in the home directory.
2) Basically going by what's in the famous Minetest One Liner, I made sure all the dependencies were installed by running this command.

Code: Select all

sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libspatialindex-dev
The one liner is a bit outdated so I changed libjpeg8-dev to libjpeg-dev. I also added libspatialindex-dev as it's searched for in the configure, so it must be important right? I omitted libleveldb-dev as I've yet to use leveldb and I'm not sure what kind of ram it uses up so I'll be content with msql on the little Pi2.

3) Next we need to get the sources, so I fired off another portion of the one liner to get them:

Code: Select all

git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ../;
This downloads Minetest source code from git, then downloads the game files, and then changes back one directory to end up in the Minetest source directory created in the download.

4) The last part of the one liner is then fired off:

Code: Select all

cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=0 -DENABLE_REDIS=0 -DBUILD_SERVER=1 -DBUILD_CLIENT=0; make -j$(nproc)
I didn't want to build the client as I'm going to be headless
-DBUILD_CLIENT=0
I wanted to make sure it knew to build the server
-DBUILD_SERVER=1
I have no interest in the redis or leveldb databases at this time so...
-DENABLE_REDIS=0 -DENABLE_LEVELDB=0

5) Wait 12 minutes for the Pi2 to build the server.

6) Start a default server without any config or options this time to see if it works: The executable is located in the bin folder of the directory you just were building in, so launch it with this command:

Code: Select all

/home/pi/minetest/bin/minetestserver
7) Jump on a minetest computer somewhere in your network and test by connecting to your Pi2's IP address and the default port of 30000

Have fun!

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Ill try that tommorow. The run in place is what is getting me.
And i am trying to copy over the mods from my computer to run on the server the the map i have been working on.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Raspberry PI 2 Linux Server

by ExeterDad » Post

Playing with the Pi2 a bit more, I discovered performance is MUCH better if the Minetest server is ran from a external hard drive if you have one. I found at least the MicroSD card I have is a huge bottleneck. It was pretty annoying how often the player position was reset. Moving to the USB drive resolved this.
I haven't gotten a chance to see how well the Pi2 does on multiplayer yet. I have three kids home from school today as it's a snow day. Maybe they will be up for some testing with me :D

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

The instruction you gave. Isthat the version you are running.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Raspberry PI 2 Linux Server

by ExeterDad » Post

Not sure what you mean by version.
The instructions I gave are what I used to get a Raspberry Pi2 using a fully updated Raspbian Jessie.
The Minetest version it will install is the very latest Minetest code straight from the git repo.
Does that answer your question?

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Yes

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

I put a 32gb flash drive in my pi and was wondering how to change the directory to get it installed to the flash drive instead of the sd card.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

I have a mount for it, its in /media/32. Now to do all the install stuff do i need to be in the that directory to install all the library items.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Raspberry PI 2 Linux Server

by ExeterDad » Post

Hi DoyleChris,

When you do the first commands I listed above, the one that starts with "sudo apt-get", you do that command in the shell from anywhere. The libraries it installs are provided by debian (Raspbian actually) and are system files that will automatically be installed where they belong with the rest of the system.
After that you need to change directory into your storage you set up. When you do the second set of commands, it will create a folder called minetest, then it will download all the needed source code into that folder. It is important that your user (default is pi) has permission to create folders in the directory you are in when you do the command as the minetest directory will not be able to be created. How to do that, and how do it properly is way beyond the scope of this thread as it could be complicated, depending on your needs.

Once you've gotten the permissions straightened out, and have the second set of commands done, do the third set and the compiling of minetestserver will begin. The finished binary will be found in that folder in your storage, also your worlds, mods and most importantly, your database will be located on that external storage. This will keep the a huge amount calls and writes to the database off of that SD card which is slower by design. And also SD cards only have a limited amount of writes they are capable of before they wear out.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Ok i can figure out the permissions.
.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Raspberry PI 2 Linux Server

by DoyleChris » Post

Well i got it up and running. shut it down added mods from my computer.
Went to start it again had errors with the mods so i went into world.mt in the worlds folder.
changed all to false except unified_inventory.
restarted now it dosent start at all.
this is the error i get.

2016-03-25 13:06:38: WARNING[Main]: Couldn't find a locale directory!
2016-03-25 13:06:38: [Main]: Automatically selecting world at [/mnt/32/minetest/bin/../worlds/world]
2016-03-25 13:06:38: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2016-03-25 13:06:39: ERROR[Main]: An unhandled exception occurred: ServerEnvironment::loadMeta(): EnvArgsEnd not found!
2016-03-25 13:06:39: ERROR[Main]: In thread 76ff1380:
2016-03-25 13:06:39: ERROR[Main]: /mnt/32/minetest/src/main.cpp:f6: int main(int, char**): A fatal error occured: ServerEnvironment::loadMeta(): EnvArgsEnd not found!
2016-03-25 13:06:39: ERROR[Main]: Debug stacks:
2016-03-25 13:06:39: ERROR[Main]: DEBUG STACK FOR THREAD 76ff1380:
2016-03-25 13:06:39: ERROR[Main]: #0 int main(int, char**)
Aborted

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 42 guests