[Solved] LAMP Server?

Post here if you are a new Porteus member and you're looking for some help.
Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

[Solved] LAMP Server?

Post#1 by Bogdan » 03 Jan 2013, 18:34

Hi i'm currently downloading Porteus, and I want to know is there instructions on how to install functional localhost server with apache, php, mysql and phpmyadmin. I tried searching forum but i can't find it... Thanks
Last edited by Bogdan on 04 Jan 2013, 21:49, edited 3 times in total.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: LAMP Server?

Post#2 by Hamza » 03 Jan 2013, 19:31

Clean slacky pkgs

Code: Select all

rm -Rf /var/slackyd/*.txz
Update local repository

Code: Select all

slackyd -u
Download httpd (apache)

Code: Select all

slackyd -fg httpd
Download mysql

Code: Select all

slackyd -fg mysql
Download php

Code: Select all

slackyd -fg php
Install everything (optional)

Code: Select all

installpkg /var/slackyd/*.txz
Make a final module xzm for future boot

Code: Select all

mkdir -p /tmp/lamp && installpkg -root /tmp/lamp /var/slackyd/*.txz && dir2xzm /tmp/lamp /tmp/lamp-server.xzm && rm -Rf /tmp/lamp /var/slackyd/*.txz
Your xzm module will be put into /tmp.

Must be do from root.
NjVFQzY2Rg==

Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

Re: LAMP Server?

Post#3 by Bogdan » 03 Jan 2013, 21:23

thanks for quick answer, i have one more problem i can't go to internet in porteus because i have a mobile broadband 3g modem and when i click on "Add new mobile broadband connection" i get an error something like "Cannot add mobile broadband" and "apn 32" error or something like that...

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: LAMP Server?

Post#4 by Hamza » 03 Jan 2013, 21:27

You're welcome :) This is about another subject. Please make a new topic about this. I would suggests you to follows this thread
NjVFQzY2Rg==

Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

Re: LAMP Server?

Post#5 by Bogdan » 03 Jan 2013, 21:44

Nevermind, i solved it. Thanks again!

Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

Re: LAMP Server?

Post#6 by Bogdan » 03 Jan 2013, 21:57

Just one more thing Hamza, i will need a phpmyadmin, is it included in packages you listed for LAMP Server

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: LAMP Server?

Post#7 by Hamza » 03 Jan 2013, 22:05

No but here's sample commands to get it from editors.

I'm assuming phpMyAdmin 3.5.5 is the last version and you want PMA to be reach-able from your-domain.net/phpmyadmin

Go to default web root directory. This could change depending on your configuration.

Code: Select all

cd /var/www
Download phpMyAdmin 3.5.5

Code: Select all

wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.5/phpMyAdmin-3.5.5-english.zip
Unzip the archive

Code: Select all

unzip phpMyAdmin-3.5.5-english.zip
Rename the folder to phpmyadmin

Code: Select all

mv phpMyAdmin-3.5.5-english phpmyadmin
Remove the downloaded archive to free the disk space (optional)

Code: Select all

rm -Rf phpMyAdmin-3.5.5-english.zip
NjVFQzY2Rg==

Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

Re: [Solved] LAMP Server?

Post#8 by Bogdan » 03 Jan 2013, 23:12

I have installed everything, but can't start httpd... i've tried various commands that i use on many other linux systems before and nothing

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [Solved] LAMP Server?

Post#9 by Hamza » 03 Jan 2013, 23:30

You'll not get it running because it seems dependencies are missing.

Clean slacky pkgs

Code: Select all

rm -Rf /var/slackyd/*.txz
Search dependencies for httpd (should apr)

Code: Select all

slackyd -fd httpd
Make a module from found deps

Code: Select all

mkdir /tmp/httpd-deps && installpkg -root /tmp/httpd-deps /var/slackyd/*.txz
Make the xzm module

Code: Select all

dir2xzm /tmp/httpd-deps /tmp/httpd-deps.xzm
Clean unnecessary files (optional)

Code: Select all

rm -Rf /tmp/httpd-deps /var/slackyd/*.txz
Final should be in /tmp as httpd-deps.xzm

About httpd, there's actually an error in the package coming from Slackware.
Please do these steps in order to fix the issue permanently.

Create temporary folder into /tmp

Code: Select all

mkdir /tmp/lamp-fix
Extracting lamp module

Code: Select all

xzm2dir /path/to/lamp.xzm /tmp/lamp-fix
Applying fixes

Code: Select all

chmod +x /tmp/lamp-fix/etc/rc.d/rc.*
Repacking lamp module

Code: Select all

dir2xzm /tmp/lamp-fix /tmp/lamp.xzm
Clean unnecessary files (optional)

Code: Select all

rm -Rf /tmp/lamp-fix
You'll get a new module. /tmp/lamp.xzm with fixes applied.

In order to boot up httpd. Please run this command:

Code: Select all

/etc/rc.d/rc.httpd start
NjVFQzY2Rg==

Bogdan
White ninja
White ninja
Posts: 16
Joined: 03 Jan 2013, 18:27
Distribution: Linux Mint 13 (Maya)
Location: Serbia

Re: LAMP Server?

Post#10 by Bogdan » 04 Jan 2013, 13:23

yes this fix httpd, i got the famous It works! message, and phpmyadmin should be in /var/www/htdocs insted of var/www, but now i have my php files rendered as a plain text :(

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: LAMP Server?

Post#11 by Hamza » 04 Jan 2013, 15:36

Please apply these steps in order to run PHP correctly from httpd.

Clean slacky pkgs

Code: Select all

rm -Rf /var/slackyd/*.txz
Download all php deps

Code: Select all

slackyd -fdg php
Make a temporary directory

Code: Select all

mkdir /tmp/php-deps
Install pkgs into a fake directory

Code: Select all

installpkg -root /tmp/php-deps /var/slackyd/*.txz
Apply some fixes
  1. Open the file /tmp/php-deps/etc/mod_php.conf
  2. Search the line

    Code: Select all

    SetHandler application/x-httpd-php
  3. You should have a "#" at begin of this line, remove it
  4. Save and exit
Make the final module

Code: Select all

dir2xzm /tmp/php-deps /tmp/php-deps.xzm
Activate the module

Code: Select all

activate /path/to/php-deps.xzm
Don't forget to move it on modules folder if you want to have it on the next boot.

Reload httpd

Code: Select all

/etc/rc.d/rc.httpd restart
Optionally, you can remove unnecessary files

Code: Select all

rm -Rf /tmp/php-deps

Code: Select all

rm -Rf /var/slackyd/*.txz
NjVFQzY2Rg==

tadatma
White ninja
White ninja
Posts: 16
Joined: 17 Oct 2012, 16:48
Location: India

Re: [Solved] LAMP Server?

Post#12 by tadatma » 18 Feb 2013, 06:00

when I execute this "/etc/rc.d/rc.httpd start" I get a "Permission Denied" reply. What should I do about it? I am in the root console.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [Solved] LAMP Server?

Post#13 by Hamza » 18 Feb 2013, 07:10

Executes this before your command.

Code: Select all

chmod +x /etc/rc.d/rc.httpd
NjVFQzY2Rg==

tadatma
White ninja
White ninja
Posts: 16
Joined: 17 Oct 2012, 16:48
Location: India

Re: [Solved] LAMP Server?

Post#14 by tadatma » 19 Feb 2013, 12:23

Interestingly, I am not able to find rc.httpd! I wonder if I have missed some step.
I would like to place a request though. If you can release a (L)AMPP module that activates on startup that would be really useful for me. I hear version 2.0 is likely to be released tomorrow. If that module can also be made compatible with the release version, that would be an icing on the cake!!
Thank you.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [Solved] LAMP Server?

Post#15 by Hamza » 19 Feb 2013, 12:36

Simply make a module request in the relevant sub forum. :)
NjVFQzY2Rg==

Post Reply