LAMP

Asked by Wladston Viana

Hey guys,

I'm a recently swtiched from windows php developer, and I haven't still managed to install LAMP.

At windows, I could just download a nice "WAMP" installer, and it would install the applications, and ask me the relevant setup settings in order to have everything working (such as public_html folder location).

I wanted to know if Ubuntu has any equivalents ? I've seen this https://help.ubuntu.com/community/ApacheMySQLPHP but it involves lots of complicated-looking steps - editing-text-files steps ...

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Dean Sas
Solved:
Last query:
Last reply:
Revision history for this message
Dean Sas (dsas) said :
#1

All you really need to do is install these packages:
apache2 php5-mysql libapache2-mod-php5 mysql-server

Then to secure mysql do this in a console:
mysqladmin -u root -p password yourpassword

The package considers quite a mix of things and should probably be broken down into "installing", "securing" and "troubleshooting" or something similar.

Revision history for this message
Dean Sas (dsas) said :
#2

All you really need to do is install these packages:
apache2 php5-mysql libapache2-mod-php5 mysql-server

Then to secure mysql do this in a console:
mysqladmin -u root -p password yourpassword

The page considers quite a mix of things and should probably be broken down into "installing", "securing" and "troubleshooting" or something similar.

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#3

I like using tasksel for that:

$ sudo tasksel

Select LAMP Server, press Ok, and you're done.

Revision history for this message
Wladston Viana (wladston) said :
#4

Alexandre,

wladston@wlad:~$ sudo apt-get install taskel
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package taskel
wladston@wlad:~$

and

wladston@wlad:~$ sudo taskel
sudo: taskel: command not found

Dean,

I'm downloading the packages. Btw, they are not in the "Add/Remove...", I had to hit the advanced button to find them .... why ?

Also, why not create a LAMP icon on the "Add/Remove..." ? You think this would be a good idea for a feature request here in launchpad ?

I'm hoping the instalator will ask me where do I want to place the public_html folder.

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#5

You don't need to install tasksel. It's included in every Ubuntu installation.

You made a typo, it is not `taskel' but `tasksel', as task select.

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#6

For the custom public_html, you will have to edit Apache's configuration.

I suggest you stick with the default location (/var/www), or use a user directory.

To make user directory, just make a directory named `public_html' in your home:
$ mkdir $HOME/public_html

Then, you can access the content of it at:
http://localhost/~wladston

Revision history for this message
Wladston Viana (wladston) said :
#7

Thanks again, Alexandre!

The ~/public_html folder is very nice! It's working here. I really wonder why this folder wasn't created before, and why there is no example, why the instalation does not mention where is the home folder.... ?!

Tried again :
wladston@wlad:~$ sudo tasksel
sudo: tasksel: command not found

I had to install it using synaptic. Even after I installed it, there wasn't any "LAMP" option. There was a "web server" option, with I marked, but in the end it only instaled cupsys...

I've found that I can install phpmyadmin via apt-get! I've opened it via localhost/phpmyadmin, but it askes me for a password!! Why didn't the instalation process told me what would the password be, or asked me the password ???

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#8

Unless, you did set a password, as Dean Sas mentioned, there is no password.

user: root
passwd: (none)

Revision history for this message
Wladston Viana (wladston) said :
#9

wow - it worked !!

So, my suggestions are :

1. Create a LAMP icon on the "Add/Remove..." (It would install apache2, php5-mysql, libapache2-mod-php5, mysql-server and phpmyadmin )

2. After it's installed, make the ~/public_html folder, place a greeting example there, and launch this location (http://localhost/~username)!

3. During install, ask the user if this is a local development base (configure the posts)

3. On this greeting example, the user could be told that Tell the user that the default user/password is root/nothing (maybe allow user to change it), with a link to phpmyadmin.

4. Ask also on the greeting example for the user to edit the ports.conf file to listen only to his own machine, if this is a development machine.

If these have been inplemented, I would never open such support request :)

Anyone has any other ideas? I'll close this and create the feature request!

Revision history for this message
Wladston Viana (wladston) said :
#10

Guess what ? That spec had already been proposed!
https://features.launchpad.net/distros/ubuntu/+spec/lamp

Revision history for this message
eyequeue (eyequeue-gmail) said :
#11

This is solely because this may show up in a search engine, it has nothing to do with the original requester.

For those who do not already have Ubuntu installed, there is a "Server install CD" available, with a filename similar to ubuntu-6.06.1-server-i386.iso for each platform. See http://releases.ubuntu.com/dapper/ or your local mirror. This CD can be booted, the option to install a LAMP server selected, a beverage consumed, and you have a complete LAMP server installed.

Revision history for this message
Wladston Viana (wladston) said :
#12

If I knew .... I thought these ones were indeep for "servers", not also suitable for development stations ... At least now everything works here!

Revision history for this message
Wladston Viana (wladston) said :
#13

Is there a way to reopen it ?

When I was going to work today I got this error:

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/home/wladston/public_html/en/index.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

permission of index.php is 777, but it still don't work ....

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#14

I suggest you open a new request for that.

Revision history for this message
Wladston Viana (wladston) said :
#15

well - i've placed it all there : https://features.launchpad.net/distros/ubuntu/+spec/lamp

the problem now is the "Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0"

Revision history for this message
Alexandre Vassalotti (avassalotti) said :
#16

I mean you should open a new support request for the problem your having now:
https://launchpad.net/distros/ubuntu/+addticket

It's just because we tried to keep the requests organized, so peoples can search through them, and also because I don't know the answer.

Revision history for this message
Wladston Viana (wladston) said :
#17

ahn, ok, thanks!! and sorry for taking that long to understand you!