NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick

[WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 8 months ago #1

  • meilon
  • meilon's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hi there,

I just added a full blown webserver with Apache 2, MySQL 5.5 and PHP5. Why I did it: I need a system that runs all the time without consuming much energy and has a typo3 compatible webserver. I already had a Zotac AD10 with OpenELEC, why buy something new?

So, this is how I did it:

== Modify OpenELEC SYSTEM Firmware ==
DISCLAIMER: This is the first and most dangerous step, so backup everything! Don't blame me for bricking your system, having to reinstall from scratch! And please notice that XAMPP is only available for 32bit OS.

Get the squashfs-tools from Andrei Csaba Erdei for your system, install via zip and reboot OpenELEC
i386: sites.google.com/site/andreierdei/openelec-addons/shell.squashfs-tools.squashfs.i386-1.0.0.zip?attredirects=0&d=1
x86_64: sites.google.com/site/andreierdei/openelec-addons/shell.squashfs-tools.squashfs.x86_64-1.0.0.zip?attredirects=0&d=1

Next, mount the SYSTEM firmware and copy it contents. After that unmount it and go into the copied system folder
mkdir /storage/source
mkdir /storage/system.new
mount -t squashfs -o loop /flash/SYSTEM /storage/source
cd /storage/source
cp -a * /storage/system.new
cd ..
umount /storage/source
cd /storage/system.new

Now we do some changes: Adding a new group, grade a new directory and a new symlink for it:
echo 'nogroup:x:1001:' >> /storage/system.new/etc/group
mkdir /storage/opt
ln -s /storage/opt /storage/system.new/opt

Now pack up the new SYSTEM firmware and prepare the system update procedure
cd /storage
mksquashfs /storage/system.new /storage/.update/SYSTEM
cp /flash/KERNEL /storage/.update/

Now reboot. OpenELEC should detect the update and reboot again with the new changes applied.

== Install XAMPP for Linux ==
Download the current version of XAMPP for Linux from www.apachefriends.org/xampp-linux.html#52 and extract it to /opt
wget http://www.apachefriends.org/download.php?xampp-linux-x.x.x.tar.gz
tar -xfz xampp-linux-x.x.x.tar.gz -C /opt
(x.x.x is the xampp version number)
Now it's time to make some changes to the start scripts because they relay on bash which is not available on OpenELEC. You can get the changed files from me.
tar -xzf lamp_changes_x.x.x.tar.gz -C /
(x.x.x is the xampp version number)
The last thing you have to do is change the webserver port. In /opt/lampp/etc/httpd.conf change the value of Listen to something different than port 80 (81 for instance). If you choose 81, you don't have to change the lampp start script, otherwise change the port there too (line 197, the value behind "testport")
Now you can start everything via /opt/lampp/lampp start

== Add ImageMagick ==
Download my ImageMagick build and extract it
tar -xzf ImageMagick-6.7.4-7.tar.gz -C /

== Thanks ==
Thanks Andrei Csaba Erdei, your squashfs addon made it pretty easy modifying OpenELEC for my needs!
Thanks Apache Friends, XAMPP is a great project, saved me from configuring and compiling for hours!
Thanks OpenELEC Team and Community, you are the reason I built a HTPC in the first place, and you made it pretty easy!

Please tell me what you think and any suggestions you might have.
Zotac AD-10 (4GB RAM, 32GB Patrio Torqx 2 SSD)
Epson EH-TW6000 on 72" CinemaFrame
Denon AVR-2113
Teufel Concept E Magnum 5.1
Last Edit: 5 years 6 months ago by meilon.
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 7 months ago #2

  • mennoo
  • mennoo's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
  • Karma: 0
Thanks for this very useful guide. Only 2 remarks

-Xampp is only available for 32bit OS's, So this guide will not work on the 64bitt version of OE.
-makesquashfs /storage/system.new /storage/.update/SYSTEM

should be

mksquashfs /storage/system.new /storage/.update/SYSTEM
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 7 months ago #3

  • chewitt
  • chewitt's Avatar
the pedant in me would like to point out that SYSTEM and KERNEL files are software, not firmware :whistle:
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 6 months ago #4

  • meilon
  • meilon's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
mennoo wrote:
Thanks for this very useful guide. Only 2 remarks

-Xampp is only available for 32bit OS's, So this guide will not work on the 64bitt version of OE.
-makesquashfs /storage/system.new /storage/.update/SYSTEM

should be

mksquashfs /storage/system.new /storage/.update/SYSTEM

There are currently only 32bit stable releases for my Fusion box. When the 64bit Eden build are stable I'll think of something new and update this guide accordingly.

And I changed the typo.
chewitt wrote:
the pedant in me would like to point out that SYSTEM and KERNEL files are software, not firmware :whistle:
I think of it like firmware files for routers, NAS boxes etc: One file containing everything that makes the system with a specific purpose work on a specific hardware platform, containing an OS, services and apps and the like. Only that OpenELEC uses two files for that.
Zotac AD-10 (4GB RAM, 32GB Patrio Torqx 2 SSD)
Epson EH-TW6000 on 72" CinemaFrame
Denon AVR-2113
Teufel Concept E Magnum 5.1
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 2 months ago #5

  • mahogl
  • mahogl's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Thank you for this guide, it did work like a charm. But how to do i make it start automatic? When i try to add a file to /etc/init.d get a message that the file system is read only...

So what do i need to do to start automatic?

Thanks in advance for you help...
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 2 months ago #6

  • meilon
  • meilon's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Just add the start script to your autorun.sh
Zotac AD-10 (4GB RAM, 32GB Patrio Torqx 2 SSD)
Epson EH-TW6000 on 72" CinemaFrame
Denon AVR-2113
Teufel Concept E Magnum 5.1
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 2 weeks ago #7

  • mennoo
  • mennoo's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
  • Karma: 0
A nice alternative to XAMPP is the LAMPStack from BitNami (bitnami.org/stack/lampstack).

It supports 32 and 64bit and let you choose your installation dir. With other words, it's not necessary to 'hack' OE. Just intsall it somewhere in /storage/..

for me, it's works very well, the only thing you'll need to edit are the user settings of apache and mysql.
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 5 years 2 weeks ago #8

  • meilon
  • meilon's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Thanks for the link, will give it a try!
Zotac AD-10 (4GB RAM, 32GB Patrio Torqx 2 SSD)
Epson EH-TW6000 on 72" CinemaFrame
Denon AVR-2113
Teufel Concept E Magnum 5.1
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 11 months ago #9

  • besieger
  • besieger's Avatar
  • Offline
  • Junior Boarder
  • Posts: 96
  • Karma: 0
mennoo wrote:
With other words, it's not necessary to 'hack' OE. Just intsall it somewhere in /storage/..

what does this mean? how can i install lampstack? i'm using openelec x64 and can't install xampp.
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 11 months ago #10

  • ultraman
  • ultraman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 4647
  • Thank you received: 889
  • Karma: 324
besieger, download appropriate bitnami-lampstack installation file and run it from oe.
wget http://bitnami.org/files/stacks/lampstack/5.3.17-0/bitnami-lampstack-5.3.17-0-linux-x64-installer.run
chmod +x bitnami-lampstack-5.3.17-0-linux-x64-installer.run
./bitnami-lampstack-5.3.17-0-linux-x64-installer.run --prefix /storage/bitnami-lampstack --mode text
ultraman == vpeter
LAMP addon - Linux, Apache, MySQL PHP bundle
Sundtek and HDHomeRun DVB driver addons
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 11 months ago #11

  • besieger
  • besieger's Avatar
  • Offline
  • Junior Boarder
  • Posts: 96
  • Karma: 0
i thought its not possible to install programs on openelec.
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 11 months ago #12

  • ultraman
  • ultraman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 4647
  • Thank you received: 889
  • Karma: 324
besieger wrote:
i thought its not possible to install programs on openelec.
It depends what you understand under "install". In this case you just unpack something to writable storage.
ultraman == vpeter
LAMP addon - Linux, Apache, MySQL PHP bundle
Sundtek and HDHomeRun DVB driver addons
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 11 months ago #13

  • besieger
  • besieger's Avatar
  • Offline
  • Junior Boarder
  • Posts: 96
  • Karma: 0
at the moment i'm testing 2.0 final. but now i'm using 32 bit. i want to install the webserver. but i can't find the mksquashfs. i found some zip files, but they are not installable on 2.0 final.
The administrator has disabled public write access.

Re: [WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 10 months ago #14

  • onufr
  • onufr's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
i have install lampstack by your instruction but i get error "Error: Error while creating user mysql
" any suggest what i do wrong?
The administrator has disabled public write access.

[WEBSERVER] Fullblown Webserver with Apache+MySQL+PHP+ImageMagick 4 years 5 months ago #15

  • maximumi
  • maximumi's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hello,

I tested Lampstack on linux Openelec 2.0 - Version 5.4.13-0 32bits and I get this error during installation (50%-60% approximately)

./bitnami-lampstack-5.4.13-0-linux-installer.run --prefix /storage/lampstack --mode text
...
Error: There has been an error. Error running stat --format=%a /storage/lampstack/perl/bin/c2ph : stat: unrecognized option '--format=%a' BusyBox v1.20.2 (2012-10-14 06:18:46 CEST) multi-call binary.

Usage: stat [OPTIONS] FILE...

Display file (default) or filesystem status

-f Display filesystem status
-L Follow links
-t Display info in terse form
Press [Enter] to continue :


answers.bitnami.org/questions/11815/lampstack-on-linux-openelec-20-version-5413-0-32bits
Last Edit: 4 years 5 months ago by maximumi.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2