Jump to content

Setting up a LAMP Server [Ubuntu]

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
After every linux installation, the first thing I always do is setup apache, mysql, and php. Under Ubuntu, if you take advantage of the synaptic package manager, setting up your LAMP server has never before been more simple.

First thing you want to do is update your repositories:

Quote

sudo apt-get install update

Next install apache2 and php5

Quote

sudo apt-get install apache2 php5 libapache2-mod-php5

Finally install mysql and make it work with php

Quote

sudo apt-get install mysql-server mysql-client php5-mysql

And thats it!

#2
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
John I followed these instructions, and when I make test.php it asks me to download it, meaning the php isnt working correctly, does this work on ubuntu 8?
Checkout my new forum! http://adminreference.com/

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
You may have to enable the php load file:
mv /etc/apache2/mods-available/php.load /etc/apache2/mods-enabled/


#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Do you have an entry similar to this in your httpd.conf:

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
</Files>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

You should also have the extension included in the same configuration file:

LoadModule php5_module modules/libphp5.so


#5
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
my answer is the solution - I fied it for him yesterday. :)

#6
Guest_Jordan_*

Guest_Jordan_*
  • Guests
What is in php.load?

#7
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
When you use the method described above, all modules that are to be loaded are defined in their own file. The php.load file includes the stuff posted above. It's just rather than having it in the httpd.conf (apache2.conf) the apache configuration file has something like: LoadModule enabled-modules/*.load

#8
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Almost 1.5 years later and still valuable information, just used this tutorial today. I've also created some notes: Ubuntu 9.04 Notes. Remove Apache2 and other Startup Services: sudo apt-get install sysv-rc-conf sudo sysv-rc-conf Adding mod_userdir to Apache2: sudo a2enmod userdir sudo a2enmod userdir - ASCIIBin

The notes tell you how to disable Apache/MySQL from startup and how to enable mod_userdir so you can access your home directory public_html folder.

#9
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
I generally start out with this method, but I find it too rigid (perhaps I don't know how to use it fully). I end up compiling apache/php from source.

#10
Guest_Jordan_*

Guest_Jordan_*
  • Guests
When I searched for this tutorial I thought it was from source but I used it and it works fine for my intended purposes. I wanted to copy/paste your PHP options if it were from source. What happened to your LAMP shell script?

#11
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Every time I reinstall Ubuntu and run the script, I find I'm missing a dependency.