1

I recently have started to work on ubuntu for web development.

Initially I installed Zend server on my Ubuntu 12.04.3 LTS. But later I decided to go with "lamp-server", so I un-installed the Zend server by running

/usr/local/zend/bin/uninstall.sh

as shown in http://files.zend.com/help/Zend-Server-6/content/deb_uninstalling_zend_server.htm

Now I want to install lamp server using tasksel by running following command

sudo tasksel install lamp-server

but I am having trouble installing it. I get error page when I go to localhost in a browser.

Any help will be appreciated.


EDITS FROM DISCUSSION IN COMMENTS

EDIT 1

After running sudo apt-get install lamp-server^ I get this message:

sudo apt-get install lamp-server^
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'apache2-utils' for task 'lamp-server'
Note, selecting 'libwrap0' for task 'lamp-server'
Note, selecting 'libnet-daemon-perl' for task 'lamp-server'
Note, selecting 'libclass-isa-perl' for task 'lamp-server'
Note, selecting 'libaprutil1-dbd-sqlite3' for task 'lamp-server'
Note, selecting 'libswitch-perl' for task 'lamp-server'
Note, selecting 'perl' for task 'lamp-server'
Note, selecting 'libcap2' for task 'lamp-server'
Note, selecting 'libhtml-template-perl' for task 'lamp-server'
Note, selecting 'libdbi-perl' for task 'lamp-server'
Note, selecting 'apache2.2-bin' for task 'lamp-server'
Note, selecting 'mysql-client-core-5.5' for task 'lamp-server'
Note, selecting 'libdbd-mysql-perl' for task 'lamp-server'
Note, selecting 'mysql-server-5.5' for task 'lamp-server'
Note, selecting 'libapr1' for task 'lamp-server'
Note, selecting 'mysql-common' for task 'lamp-server'
Note, selecting 'mysql-client-5.5' for task 'lamp-server'
Note, selecting 'libaprutil1-ldap' for task 'lamp-server'
Note, selecting 'apache2-mpm-prefork' for task 'lamp-server'
Note, selecting 'libplrpc-perl' for task 'lamp-server'
Note, selecting 'tcpd' for task 'lamp-server'
Note, selecting 'apache2' for task 'lamp-server'
Note, selecting 'mysql-server-core-5.5' for task 'lamp-server'
Note, selecting 'apache2.2-common' for task 'lamp-server'
Note, selecting 'mysql-server' for task 'lamp-server'
Note, selecting 'ssl-cert' for task 'lamp-server'
Note, selecting 'perl-modules' for task 'lamp-server'
Note, selecting 'libmysqlclient18' for task 'lamp-server'
Note, selecting 'php5-mysql' for task 'lamp-server'
Note, selecting 'php5-cli' for task 'lamp-server'
Note, selecting 'libapache2-mod-php5' for task 'lamp-server'
Note, selecting 'libaprutil1' for task 'lamp-server'
Note, selecting 'php5-common' for task 'lamp-server'
libapr1 is already the newest version.
libaprutil1 is already the newest version.
libaprutil1-dbd-sqlite3 is already the newest version.
libaprutil1-ldap is already the newest version.
libcap2 is already the newest version.
libclass-isa-perl is already the newest version.
libdbd-mysql-perl is already the newest version.
libdbi-perl is already the newest version.
libhtml-template-perl is already the newest version.
libnet-daemon-perl is already the newest version.
libplrpc-perl is already the newest version.
libswitch-perl is already the newest version.
libwrap0 is already the newest version.
tcpd is already the newest version.
apache2-mpm-prefork is already the newest version.
apache2-utils is already the newest version.
apache2.2-bin is already the newest version.
apache2.2-common is already the newest version.
libapache2-mod-php5 is already the newest version.
libmysqlclient18 is already the newest version.
mysql-client-5.5 is already the newest version.
mysql-client-core-5.5 is already the newest version.
mysql-common is already the newest version.
mysql-server-5.5 is already the newest version.
mysql-server-core-5.5 is already the newest version.
perl is already the newest version.
perl-modules is already the newest version.
php5-cli is already the newest version.
php5-common is already the newest version.
php5-mysql is already the newest version.
ssl-cert is already the newest version.
The following NEW packages will be installed:
  apache2 mysql-server
0 upgraded, 2 newly installed, 0 to remove and 348 not upgraded.
Need to get 0 B/13.0 kB of archives.
After this operation, 146 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously unselected package apache2.
(Reading database ... 182247 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.2.22-1ubuntu1.5_i386.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.37-0ubuntu0.12.04.1_all.deb) ...
Setting up apache2 (2.2.22-1ubuntu1.5) ...

EDIT 2 It seems lamp-server has been installed correctly but when I go to localhost I get this error ' Unable to connect Firefox can't establish a connection to the server at localhost.'

I tried to restart apache2 using sudo service apache2 restart only to face this error:

Syntax error on line 239 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache.conf: No such file or directory Action 'configtest' failed. The Apache error log may have more information. ...fail!

  • Try running sudo apt-get install lamp-server^ and paste any errors you may encounter here. – Parto Apr 26 '14 at 6:32
  • @Parto I did not get any error after running the suggested command. I get a very long message, last portion of the message is as follows – user11 Apr 26 '14 at 6:40
  • You can paste the message at paste.ubuntu.com and provide the link here or edit your question and include it directly. We need to see that message to know whats going on. – Parto Apr 26 '14 at 6:46
  • @Parto here is the link paste.ubuntu.com/7335326 – user11 Apr 26 '14 at 6:48
  • It seems lamp server has been installed correctly. What message do you get when you go to localhost – Parto Apr 26 '14 at 6:50
0

Uninstall apache2 and reinstall it again. It seems there is an issue with your apache2 config files. Run the commands below:

sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove

To confirm it has been removed, run: which apache2 it should return a blank line or run sudo service apache2 start it should return 'apache2: unrecognized service'

Now to reinstall it again run:

sudo apt-get install apache2

Localhost should now be working.

1

You have to run the install in this sequence:

  1. sudo apt-get update
  2. sudo apt-get install tasksel
  3. sudo tasksel install lamp-server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.