Boezelman
Posts: 40
Joined: Sun Aug 05, 2012 3:25 pm

Host magento on a Pi

Fri Oct 19, 2012 6:18 am

I've been trying to setup the Pi to run Magento but I can't get it to work.
(I must add I'm fairly new to Linux, php, sql, etc, but I have some basic knowledge :))

I use "lighttpd" to run a webserver.

I've found allot of tutorials, but I think I do something wrong with the installation and configuration of the php/sql packages.

I installed:

Code: Select all

mysql-server
php5-mysql php5-curl php5-gd php5-mcrypt php5-common php5-cgi php5
I also created a Mysql database without problems.

Code: Select all

mysql -u root -p
CREATE DATABASE magento;
CREATE USER mage;
GRANT ALL ON magento.* TO 'mage' IDENTIFIED BY 'password';
I've tryd many ways to install Magento but almost every install fails on the ./pear command.

Code: Select all

./pear mage-setup .
./pear install magento-core/Mage_All_Latest-stable
Pear should be installed standard with php5 (according to google :)) but because it didn't run I've installed it manually.

So, does anyone know how to setup the Pi to run magento?
Does anyone already run Magento and would like to share a "step-by-step" guide?

Thanks :mrgreen:

benzeman
Posts: 108
Joined: Fri Apr 20, 2012 12:04 pm
Contact: Website

Re: Host magento on a Pi

Fri Oct 19, 2012 9:35 am

If I remember right, magento is very resource intensive... And the raspberry pi isn't exactly powerful (for a webserver), so you might have some trouble. Try using the web server distro (http://www.raspberrypi.org/phpBB3/viewt ... 36&t=19702) on a 512MB pi and see how you get on...

capt.tagon
Posts: 1
Joined: Mon Oct 22, 2012 5:21 am

Re: Host magento on a Pi

Mon Oct 22, 2012 5:27 am

Interesting project, but possibly an exercise in futility. Magento will require a minimum script memory_limit of 256MB, mysql will require enough resources. You've chosen an e-commerce platform that will easily stress an i7.

choukalos
Posts: 2
Joined: Fri May 03, 2013 1:43 pm

Re: Host magento on a Pi

Fri May 03, 2013 3:15 pm

Magento does run on a raspberry pi. There are a couple key things you have to do first:

. Setup on your chosen webserver ( if you google there are setups for lighttpd or nginx configs )
> suggest nginx and php-fpm
> suggest you install and enable pac
- add to apc.ini
apc.shm_size = 128M
apc.shm_segments = 1
apc.max_files_size = 5M
apc.stat = 0
apc.num_files_hint = 10000
apc.user_entries_hint = 10000
. edit your php.ini file
> set max_execution_time = 0
> set max_input_time = -1
> set memory_limit = 256M

. If you're on CE 1.7 ( latest EE 1.13, CE 1.8 alpha don't have this problem )
need to edit app/code/core/Mage/Install/etc/config.xml and find the pdo_mysql xml tag and
change to
<extensions>
<pdo_mysql>1</pdo_mysql>
<extensions>

Tweaks
- don't bother with changing Magento backend settings or memcache [ other than for session storage ] it actually slows things down due to the slow IO and limited memory on the PI.
- could tweak mysql settings - but I didn't notice much of a gain; not like you can load a big database here. I played with the sample data ...

I got CE 1.7 to run all on 1 PI about 4-5 seconds per page - was playing around trying to get Varnish working but then got busy at work before I could get Varnish/Turpentine extension working.

For testing... 20 concurrent reqs, 100 total:
homepage = 0.18 reqs / second

testing 5 concurrent reqs, 100 total
homepage = 0.25 reqs / second

Haven't had a chance to test the latest release.

-Chuck

choukalos
Posts: 2
Joined: Fri May 03, 2013 1:43 pm

Re: Host magento on a Pi

Thu Feb 19, 2015 2:58 am

Guess what - yup the Raspberry PI 2 will run Magento 2 Developer Beta! Heck a pair of old Raspberry PI B's ( 1 for MySQL / Redis , 1 for the web node ) will run Magento 2 Dev Beta - it's just pretty frustrating having to compile php 5.6 and mysql 5.6 from source.

Easiest path for the Raspberry PI 2 is to use the Debian Jessie image. In that case both DB, Redis/Varnish and php is all one 1 PI. You can just apt-get php5.5 and install Maria DB ( mysql 5.6 compatible ) and the usual php extensions. Then the normal install process for Magento 2.

Some highlights ( using redis page & session caching ) on a store with 2 products, 100 requests, 5 concurrent requests:
- (cached) home page - 7.8 request / sec ; 641 ms per request
- (cached) product page - 7.69 request / sec; 650 ms per request
- access the cart - 0.53 request / sec; 9444 ms per request

-Chuck

tlaci60
Posts: 1
Joined: Sun May 01, 2016 5:24 am

Re: Host magento on a Pi

Sun May 01, 2016 5:33 am

I succesfuly installed Magento2 with Demo Databse on Raspberry 3 ( rasbian jessie) for experimantal usage on my local network.
Apache 2.4.10, php 5.6.19, mariaDB ( mysql -V : 15.1). Front end and admin back end run well. Next week I will setup magento user rights and cron jobs.
There are some minor tricks to make Magento 2 to run on Raspberry. I guess it would run on RPI2 also, but Magento needs power.

stfn
Posts: 1
Joined: Sat Dec 01, 2012 2:59 pm

Re: Host magento on a Pi

Tue Aug 09, 2016 7:09 am

tlaci60 wrote:I succesfuly installed Magento2 with Demo Databse on Raspberry 3 ( rasbian jessie) for experimantal usage on my local network.
Apache 2.4.10, php 5.6.19, mariaDB ( mysql -V : 15.1). Front end and admin back end run well. Next week I will setup magento user rights and cron jobs.
There are some minor tricks to make Magento 2 to run on Raspberry. I guess it would run on RPI2 also, but Magento needs power.
any chance that you write a tutorial how you get it to work ?

goivvy
Posts: 2
Joined: Thu Dec 15, 2016 12:04 pm

Re: Host magento on a Pi

Thu Dec 15, 2016 12:18 pm

try to use PHP7 for Magento 2 - it is 25% faster http://raspberrypi.stackexchange.com/qu ... berry-pi-3

too bad we can't install hhvm on pi...

Return to “Networking and servers”