installinglamponubantu

Upload: chandangupta86

Post on 07-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 InstallingLampOnUbantu

    1/24

    Maze Solutions Web & Software Development Lebanon -

    KSA

    about

    blogservicesportfolio

    hostingsupport

    contacts

    Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP)

    on Monday, November 5th, 2007 at 1:33 am

    Lately Ive been using ubuntu 7.10 for all my projects/daily work.

    As a web developer i should have LAMP on my machine and now i would guide you through installing it on yours.

    This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

    Lets start with Apache:1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal

    2. Install apache2 using apt-get by typing the following

    sudo apt-get install apache2

    Note that you should know the root password.Now everything should be downloaded and installed automatically.

    To start/stop apache2 write:

    sudo /etc/init.d/apache2 start

    sudo /etc/init.d/apache2 stop

    Your www folder should be in: /var/www/

    If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

    Finished with Apache ? lets conquer PHP:

    1. Also in terminal write:

    sudo apt-get install php5 libapache2-mod-php5

    or any php version you like

    2. restart apache

    sudo /etc/init.d/apache2 restart

    This is it for PHP

    Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.Example:

    sudo gedit /var/www/test.php

    and write in it: < ?php echo Hello World; ?>

    Now run it by typing http://localhost/test.php in firefox You should see your Hello World

    66 % is over, lets continue to installing MySQL:

    1. Again and again in terminal execute:

    sudo apt-get install mysql-server

  • 8/3/2019 InstallingLampOnUbantu

    2/24

    2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf andreplacing its value (127.0.0.1) by your IP address

    3. set your root password (although mysql should ask you about that when installing)

    mysql> SET PASSWORD FOR root@'localhost = PASSWORD(xxxxxx);

    4. Try running it

    mysql -uroot -pxxx

    where xxx is your password.

    Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing

    sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

    5. restart apache for the last time

    sudo /etc/init.d/apache2 restart

    Congratulions your LAMP system is installed and runningHappy Coding

    //Jo

    UPDATE:Due to the large number of people emailing about installing/running phpmyadmin.

    Do the following:

    sudo apt-get install phpmyadmin

    The phpmyadmin configuration file will be installed in: /etc/phpmyadmin

    Now you will have to edit the apache config file by typing

    sudo vi /etc/apache2/apache2.conf

    and include the following line:

    Include /etc/phpmyadmin/apache.conf

    Restart Apache

    sudo /etc/init.d/apache2 restart

    Another issue was making mysql run with php5First install these packages:

    sudo apt-get install php5-mysql mysql-client

    then edit php.ini and add to it this line : extensions=mysql.so if it isnt already there

    sudo vi /etc/php5/apache2/php.ini

    Restart Apache

    sudo /etc/init.d/apache2 restart

    Hope this helps

    Apache | LAMP | Linux | MySQL | PHP | Ubuntu | Posted in Linux/Unix, PHP, Tutorials, Ubuntu | 158 Comments

    158 Comments

  • 8/3/2019 InstallingLampOnUbantu

    3/24

    Why dont you use the package provided from apachefriends.org? Its done with 3 easy steps:

    1. Download2. Untar/Unzip

    3. Start the script

    I am using it and I can say that for development machine its prefect saves a lot of effort and everything is in one folder.

    Comment by Nik Chankov | November 6, 2007 @ 10:05 am

    Using APT (apt-get) the Apache, MySQL and PHP software installations will be updated from the Ubuntu repositories when newcode is available. So that means bugfixes and security patches will get made available for download automatically. The OS handles

    this for you. Im not sure you get that same functionality using the apachefriends version.

    Coming from a Windows world it takes a little time to get used to the APT thinking of things, especially the fact that software isinstalled all over the file directory structure and not in one particular user defined directory I guess there are pros and cons with

    both.

    Comment by Lee Francis Wilhelmsen | November 6, 2007 @ 2:59 pm

    You are completely right Lee, actually thats the exact purpose of apt-get

    Comment by Jo | November 6, 2007 @ 3:10 pm

    [...] Installing LAMP on Ubuntu 7.10 (Linux,Apache,MySQL,PHP) at FARAWAY (tags: lamp linux ubuntu guide howto tutorialinstall installation apache php mysql) [...]

    Pingback by napyfab:blog Blog Archive links for 2007-11-06 | November 7, 2007 @ 1:36 am

    Please please please tell me how two things

    1) How do I stop and start apache?2) And do I open phpmyadmin?

    I am new to linux and could really use the help thanks.

    Comment by Bardic | November 7, 2007 @ 5:06 am

    Fantastic, straightforward at to the point. Just what I was looking for I also tried the LAMPP package, but I prefer to let apt take

    care of things. Besides, its actually easier to find things with a standard install as all other product install guides refer to locationsused by this type of setup.

    Comment by JimmyB | November 7, 2007 @ 8:59 am

    Bardic: to stop and start apache writesudo /etc/init.d/apache2 stop

    sudo /etc/init.d/apache2 start

    to do a restartsudo /etc/init.d/apache2 restart

    Comment by Jo | November 7, 2007 @ 11:30 am

    this is perfect guide for newbies to linux, its written perfectly easy and understandable. I used this to install so called LAMP server

    on my machine and it workes perfect

  • 8/3/2019 InstallingLampOnUbantu

    4/24

    Big thanks to Jo

    (im sorry for any mistakes in my english)

    Comment by qwerti | November 7, 2007 @ 11:27 pm

    Excellent guide!

    I have two additions:

    When apt-get shows the error message couldnt find package phpmyadmin you need to enable the universe repositories in

    /etc/apt/sources.list.

    And MySQL did not ask me for a password, it told me:

    * Root password is blank. To change it use:

    * /etc/init.d/mysql reset-password

    To change the password using your method you first needto start the mysql interface using the following command:

    $ mysql -uroot

    After that you can change your password with:

    mysql> SET PASSWORD FOR root@'localhost = PASSWORD(xxxxxx);

    After that you need to specify your password using -pxxxxxx

    Thanks for your guide!

    Comment by Des | November 8, 2007 @ 12:34 am

    Nice Des, Thank you for sharing

    Comment by Jo | November 8, 2007 @ 12:30 pm

    Hey Jo,

    Thanks for writing this guide, Is been very useful! I Tried the Apachefriends.org version It didnt work. Whereas this, hasworked a treat! *Bookmarks Website*

    Thanks again,

    Joe

    Comment by Joe Redfern | November 8, 2007 @ 9:27 pm

    Hi Jo,

    Great tutorial thanks! It works a charm! Another cool thing you can do when testing whether PHP is properly installed is to create aphpinfo.php file with the following line in it:

    It will then give you a whole raft of details on your PHP install when you go to http://localhost/phpinfo.php and its also a good file

    to drop somewhere on your web site to check what your ISP supports.

    Bardic, to get to phpmyadmin, type http://localhost/phpmyadmin in your browser: as simple as that!

    Comment by Bruno | November 11, 2007 @ 12:26 am

  • 8/3/2019 InstallingLampOnUbantu

    5/24

    I got caught by the filtering of angle brackets and stuff so the phpinfo.php file mentioned in my previous post should contain:

    Comment by Bruno | November 11, 2007 @ 12:31 am

    thanx for the mysql tip broi couldnt remember the name of the package for the love of god

    Comment by eXodus | November 12, 2007 @ 2:09 am

    Ive been an Ubuntu user for about 36 hours. Using your article, I was able to install and test a web server, PHP, MySQL andPHPmyAdmin in under 15 minutes. I have yet to do the same in a Windows server in under 3 hours, and that is if all goes well.Incredible article and incredible OS.

    Comment by BrianH | November 14, 2007 @ 6:09 am

    Everything works great until I try to install the PHP stuff. After running for 8 hours repeatedley trying to load the following:Get:135 http://sg.archive.ubuntu.com gutsy/main libapache2-mod-php5 5.2.3-1ubuntu6 [2542kB]

    Seems to be stuck trying to load from sg.archive.ubuntu.com ?I am in Singapore, is there a way I can force it to load from another repository, since Singapore seems unresponsive (I gather that isthe 135th attempt to download, since he same message has been repeated constantly with the only thing changing being the number

    at the front.

    Comment by Greg Parsons | November 14, 2007 @ 1:36 pm

    Fantastic, just what I needed, thanks Jo.

    One tiny thing I noticed. I was feeling lazy so I was just copying and pasting everything you put. When i tried testing PHP with theHello world example you gave, it didnt appear to be working. I soon realised it was because there is a space after the opening

    bracket and before the question mark (< ? instead of

  • 8/3/2019 InstallingLampOnUbantu

    6/24

    Comment by thinyai | November 19, 2007 @ 10:15 am

    I too got tripped up with the test.php space, I thought something was wrong with the install.

    I did mine with synaptic packet manager but great to see the command line version, next time I will do it that way.

    Thanks for the tutorial, was helpful.

    Ubuntu 7.10

    Comment by Raval | November 22, 2007 @ 3:19 am

    Hello guys,

    Ive the my apache2, php, and mysql using the above tutorial. It was successfully installed but what ive notice is the when i run thephpinfo theres no mysql enabled there. Ive tried to uncomment mysql.so in the /etc/php5/apache2/php.ini but still not showing in

    the phpinfo. Anyone has an idea?

    Thanks.

    Comment by Duddes | November 23, 2007 @ 4:41 am

    I installed phpmyadmin but do not see it anywhere, itsnot in my www folder, how do I get to it?

    Comment by Dave | December 1, 2007 @ 8:57 pm

    Dave, go to:

    http://localhost/phpmyadmin

    Comment by Jo | December 2, 2007 @ 12:54 pm

    Jo,

    that doesnt work either, 404 error. There is no phpmyadmin folder in my /var/www folder, the only folder I have is a/etc/phpmyadmin folder. Should I just copy it over? Thanks for taking the time to help me.

    Comment by Dave | December 2, 2007 @ 9:13 pm

    Nice.But I have problem..

    I am using ubuntu 7.10 server.My server name is ubuntu.I cant run php in my localhost

    when I run http://localhost/phpinfo.php, save dialog appear.But http://ubuntu/phpinfo.php, OK and run it.How to solve it ????

    Comment by saturngod | December 3, 2007 @ 5:11 pm

    saturngodopen your http.conf and go to the line: ServerName edit it so it becomes http://localhost/

    Comment by Jo | December 3, 2007 @ 5:17 pm

  • 8/3/2019 InstallingLampOnUbantu

    7/24

    Thank JoHow To Edit it ?

    My http.conf have

    ServerName localhost

    only 1 line.

    How to change it !!!!

    Comment by saturngod | December 3, 2007 @ 5:32 pm

    the line should be:

    ServerName localhost:80

    Also make sure the location of ur file is the same one specified in http.conf

    Comment by Jo | December 3, 2007 @ 5:38 pm

    Thank JoI testing it

    Comment by saturngod | December 3, 2007 @ 5:44 pm

    Hi! Joe

    Not WorkI also do that$ sudo a2enmod php5

    But Not Work.. http://locahost/phpinfo.php ( save dialog apperar )

    Only work http://ubuntu/phpinfo.php

    phpinfo.php at /var/www/

    Comment by saturngod | December 3, 2007 @ 6:45 pm

    Hi i cant start my phpmyadmin when i type in my explorer http://localhost/phpmyadminI see this :

    Not Found

    The requested URL /phpmyadmin was not found on this server.

    Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.2 Server at localhost Port 80Please tell me what to do My phpmyadmin is not in folder var/wwwit is in usr/share/phpmyadmin

    Please need help

    Comment by Killersoft | December 5, 2007 @ 9:39 pm

    Update not work please tell me what to do

    Comment by Killersoft | December 6, 2007 @ 10:44 pm

    Hi again i am sorry for my post before one hour. It working now http://localhost/phpmyadminWhen i restart my computer it working

  • 8/3/2019 InstallingLampOnUbantu

    8/24

    Thank tou Very Very much Jo!

    I am sorry for my bad english

    Comment by Killersoft | December 6, 2007 @ 11:42 pm

    I m glad it did

    I think you forgot to restart Apache the first time

    Comment by Jo | December 6, 2007 @ 11:50 pm

    Hi there, thank you very much for this tutorial, its very helpful and has allowed me to successfully get LAMP set-up on my Ubuntu

    7.10 desktop.

    The problem I have now is that Im unable to make any changes to the /var/www directory, i.e. Im unable to add/edit any files inthere. I think I know what the problem is, the directory has permissions set to it for root, but as Im logged in as my user, its not

    letting me do anything.

    Now Im sure that I can use the terminal command sudo gedit to create and edit files in that directory, but this isnt really solving my

    problem, firstly because I want to be able to access the files via the file manager, but also because Im sure its not designed so you

    have to log into the superuser every time you want to do something like this.

    This also would not solve the problem of remote access, i.e. either using FTP or windows explorer (via the network) to access the

    directory. Im more interested in allowing specific users (such as myself, and my user on my windows machine) to access thisfolder.

    As a result, I think a nice addition to this tutorial would be information on how to do this Thank you.

    Comment by Daniel | December 13, 2007 @ 6:15 pm

    Hi Daniel

    Try doing sudo chown OWNER DESTINATION this will change the owner of all files inside the DESTINATION folder.if you set OWNER = www . then everyone can access the file.

    check man chown for more details

    Jo

    Comment by Jo | December 14, 2007 @ 11:49 am

    Hi, thank you for your reply.. I tried running sudo chown www /var/www, but it just told me there was no user www.

    Ive got it working locally now by using sudo chown daniel /var/www, which is a step in the correct direction, but as I said before,Id be very keen on making that directory a shared directory so I can access it via the network from my windows machine.

    Thank you

    Comment by Daniel | December 14, 2007 @ 7:06 pm

    Great job!Id only change one thing.

    You could test for a valid installation with the following script:

    Not only does this test the installation, it shows all of PHPs configuration information.

    Since this message is so far down the page, I hope youll add this to your tutorial.

  • 8/3/2019 InstallingLampOnUbantu

    9/24

    Comment by clarkePeters | December 16, 2007 @ 6:17 pm

    that script is

    &lt ?php phpInfo(); &gt

    Comment by clarkePeters | December 16, 2007 @ 6:19 pm

    Well done, ive been looking for ages for a way to install LAMP and this is the first guide i have found that got strait to the point,Thanks

    Comment by RyanT | December 18, 2007 @ 2:09 am

    [...] 7-Installing LAMP on Ubuntu 7.10 (Linux,Apache,MySQL,PHP) [...]

    Pingback by Dr-Hamzas Space | December 25, 2007 @ 7:33 pm

    hello world

    i have installed Ubuntu 7.10 from a dvd which apparently doesnt have the next packages : apache,mysql ,php,phpmyadmin,javaand maybe other stuff which a developer might be interested in

    how the hell is that possible and what solution do you suggest,if any ?Thx.

    Comment by alin nemet | December 27, 2007 @ 4:06 pm

    An excellent tutorial many thanks for that.

    Two very minor points.

    1) Where you say edit php.ini and add to it this line : extensions=mysql.so if it isnt already there

    The word extension should be singular. The line should beextension=mysql.so

    2) The apt-get install of phpmyadmin created a link from /etc/apache2/conf.d/phpmyadmin.conf to /etc/phpmyadmin.apache.conf, so

    adding the line to /etc/apache2/apache.conf is unnecessary. Included twice the file triggered a warning from Apache. The alias washidden by an earlier alias or similar. You either need the link or the line in /etc/apache2/apache.conf, not both.

    Comment by Ian | January 2, 2008 @ 2:14 am

    [...] this took a while (20,000+ images, remember?), I set up LAMP, which was easy to do by following this blog post. See, Ineeded to update the MySQL database to match up the parts with the images. To work out the [...]

    Pingback by Ubuntu at work Me and U(buntu) | January 3, 2008 @ 5:58 pm

    Hi,

    Very nice tutorial!

    One minor issue though is that phpmyadmin installs to /usr/share/phpmyadmin (at least on my computer). That is probably whysome of you get a site not found error when trying localhost/phpmyadmin. And that is because the phpmyadmin files is simply notin the /var/www directory. I solved the problem by creating a link:

    cd /var/wwwln -s /usr/share/phpmyadmin phpmyadmin

    and now it works fine

    /Dan

  • 8/3/2019 InstallingLampOnUbantu

    10/24

    Comment by Dan | January 3, 2008 @ 9:59 pm

    [...] Installing LAMP on Ubuntu 7.10 (Linux,Apache,MySQL,PHP) at FARAWAY Published by admin on 11 14, 2007 in 02.Ubuntu,webn Installing LAMP on

    Ubuntu 7.10 (Linux,Apache,MySQL,PHP) at FARAWAY [...]

    Pingback by Installing LAMP on Ubuntu 7.10 (Linux,Apache,MySQL,PHP) at FARAWAY | George's space | January

    24, 2008 @ 10:29 am

    Hi how i can change the ip of the apache so i dont get tha message? apache2: Could not reliably determine the servers fullyqualified domain name, using 127.0.1.1 for ServerName

    Comment by Xhaar | January 28, 2008 @ 3:26 pm

    Just wondering.is MySQL necessary for LAMP?Thanks

    Comment by That Guy | February 2, 2008 @ 2:24 am

    Be sure if you just installed Ubuntu and just did all the new updates, you need to restart before the apt packs will install. You willget an error saying that the file cant be found. So

    1) install ubuntu2) do all updates3) restart

    4) install LAMP using above methods

    works

    Comment by Shudogg | February 6, 2008 @ 2:47 am

    well i installed ubuntu server LAMP, when i start it takes me to GRUB, how do i accualy get on ubuntu.

    Comment by Ostap | February 6, 2008 @ 3:50 am

    I can not access phpmyadmin from the localhost/phpmyadmin in my browser. I tried to reload phpmyadmin then placed thiscommand in the terminal prompt like suggested:

    sudo vi /etc/apache2/apache2.conf

    After that Im supposed to put this phrase:

    Include /etc/phpmyadmin/apache.conf

    How do I do this and will this fix the problem of accessing phpmyadmin.

    Thanks for your help

    Comment by drarncruz | February 8, 2008 @ 8:29 am

    Thanks,very nice tutorial!

    I just wanted to ask, what should I install or configure to run python scripts?

    Thanks again.

    Comment by miskas | February 9, 2008 @ 12:05 pm

  • 8/3/2019 InstallingLampOnUbantu

    11/24

    Thanks alot for this tutorial. If you run a home network, I dare you to check this out http://aflog.org/misc.php

    Comment by That Guy | February 10, 2008 @ 11:11 pm

    Nice tutorialgreat help while setting up a LAMP server for the first time!

    Comment by Bas Slagter | February 11, 2008 @ 9:31 pm

    thanks !! First time I can install LAMP on my Gutsy. thanks again. Its nice tutorial

    Comment by wahju | February 14, 2008 @ 2:44 pm

    First time trying to install LAMP.. worked previously with WAMP

    Great Tutorial!!!!!!

    Comment by Arun Srinivasan | March 9, 2008 @ 8:13 pm

    hi jo.,

    i have installed lamp successfuly as u said,,, and iv tried working out all siple php programs and they do work but the problem iswhen im working on a program that links php to mysql it shows an error which says undefined call to mysql_connect on linewatever it appeared

    i would be very thankful if u cud tell me something about this..Thanks..

    Comment by sweetgal | March 10, 2008 @ 8:19 pm

    GdayIve just installed Apache on my private web server (for testing sites) and when it runs non-scripted files (.html and the like) itlldisplay them.

    Though, when I try to run a PHP file it comes up with a dialog box asking me to download a .phtml file.

    What do I need to do to configure it properly?

    Cheers,

    Seb.

    Comment by seb|kaz | March 14, 2008 @ 10:14 am

    sudo tasksel install lamp-server

    Works perfectly

    Comment by Steven | March 14, 2008 @ 8:37 pm

    Also -

    ** Webmin is useful as is phpinfo()** You can also install the Ubuntu LAMP via

  • 8/3/2019 InstallingLampOnUbantu

    12/24

    SYS->ADMIN->SYNAPTIC->EDIT->MARK PACKAGES BY TASK->LAMP SERVER

    Comment by Robert | March 15, 2008 @ 2:39 pm

    [...] Follow the LAMP Installation Walkthrough (using Ubuntu, a popular distribution of Linux recommended for beginners) [...]

    Pingback by e-frank.com Archive Creating a School Library Catalog For Cheap | March 16, 2008 @ 10:16 pm

    wellthe php installation part

    it doesnt run the php itself instead it just displays the code ;/how to fix that?

    thx

    Comment by sam | March 21, 2008 @ 12:54 pm

    [...] 3 Install LAMP Thanks to Joe Raad for the wonderful walk-through. If you follow his instructions, youll [...]

    Pingback by Installing Ubuntu and Rails on Virtual PC 2007 | Grape Thinking | March 31, 2008 @ 7:27 am

    Thanks Joe, you really made the process a heck of a lot easier for me. I wish everyones tutorials were so straight to the point andeasy to follow.

    Comment by Ubuntu Novice | March 31, 2008 @ 9:31 am

    ..oh.. and if anyone is trying to get rails up..here a walk-through

    Comment by Ubuntu Novice | March 31, 2008 @ 9:33 am

    hey sam,

    Example:sudo gedit /var/www/test.php

    and write in it:

    dont give a space between

  • 8/3/2019 InstallingLampOnUbantu

    13/24

    Hey Joe,Thanks for the tutorial. I too am new to the linux world. I need help and wanted to know if you have installed and used PHPmailer?

    If so any help you can give would be greatly appreciated.

    Scott

    Comment by Scott | April 21, 2008 @ 10:35 pm

    [...] Installing LAMP on Ubuntu 7.10 (Linux,Apache,MySQL,PHP) [...]

    Pingback by Cmo instalar LAMP en Ubuntu 8.04 | Lobo tuerto | May 1, 2008 @ 5:20 am

    Hi there, thank you for your useful guide.

    I took the liberty to make a spanish translation of it and add a little extra bit to it, at:

    http://lobotuerto.com/blog/2008/04/30/como-instalar-lamp-en-ubuntu-804/

    Comment by Lobo tuerto | May 1, 2008 @ 5:28 am

    [...] references used to achieve (and write) this were LAMP Installation On Ubuntu, Installing LAMP on Ubuntu 7.10 and Installingand configuring LAMP on [...]

    Pingback by Order of the Bath Blog Archive Installing LAMP on Ubuntu 7.10 Desktop | May 2, 2008 @ 3:23 pm

    Useless guide. Lamp from ubuntu repositories has default configurations that are only usefull if you intend to play a litle, otherwiseyou better install from source so that it gets configured as you want.

    Comment by martins | May 9, 2008 @ 12:01 am

    Hi

    I am using ubuntu 8.04 and This lesson not work propertly for ubuntu 8.04

    Can you tell me how to setup my LAMP server on ubuntu 8.04I will be very happy becose i am a new in unix OSThanx & Sorry for the bad english

    Comment by Killersoft | May 10, 2008 @ 12:50 pm

    great tutorial, making setting up real monkey work

    Comment by yvan | May 15, 2008 @ 10:14 am

    Hi great tutorial.

    Just 1 Q, will this work for Ubuntu 8.04 aswell?

    Comment by the other guy | May 21, 2008 @ 2:03 pm

    Hey,

    yes it will work on ubuntu 8.10 as well

    // Jo

    Comment by Jo | May 21, 2008 @ 2:29 pm

    [...] first thing I did was instal LAMP, this newbie tutorial basically shows you how to install LAMP via the terminal. I also installed

  • 8/3/2019 InstallingLampOnUbantu

    14/24

    phpmyadmin [...]

    Pingback by Sumali Blog Archive Playing with Ubuntu | June 3, 2008 @ 8:29 am

    Worked Perfectly for Ubuntu Hardy,

    Awesome Guide,Thanks,

    Comment by Nishars | June 3, 2008 @ 9:51 pm

    Excellent tutor Jo!

    Thanks for the sharing. In several minutes i already have my local server environment, great!

    just one attempt and i can use it now.

    Comment by megat | June 23, 2008 @ 5:56 am

    hi every body i am new to linux i lamp in my ubuntu linux 8.04 .i successfully installed it the only problem is when i disconnect theinternet phpmyadmin and php is not working it showing an error page but apache is running i want to run phpmyadmin and php

    when i disconnect the internet could any one tell the solution for this problem

    Comment by A R Mohamed Ismail | June 28, 2008 @ 4:03 am

    About getting the 404 not found error, Dans suggestion on using the symbolic link worked for me. Thanks!

    Comment by Jeremy | July 1, 2008 @ 1:29 am

    Steve posted the command

    sudo tasksel install lamp-server

    a ways back. Have a look at these;

    https://help.ubuntu.com/community/ApacheMySQLPHPhttps://help.ubuntu.com/community/Tasksel

    Makes life even easier.

    Comment by JoeM | July 1, 2008 @ 1:37 pm

    Hi JO,

    Please can you help me.? Im begining my firsths steps with Ubuntu and the first time I installed lamp on Ubuntu 8.0 in a newHD I followed your instruction I didnt have problems.for reason that i dont know the O.S. begun to freeze. I reinstalled Ubuntu but when I want to install lamp, it show me a message it

    doesnt find the package.!What shuold i do..?

    thanks

    LY

    Comment by Luis | July 13, 2008 @ 4:19 pm

  • 8/3/2019 InstallingLampOnUbantu

    15/24

    A big THANK YOU.

    It all worked right the first time.

    RP

    Comment by Rick Pizzi | July 19, 2008 @ 3:54 am

    Thank you very much!

    Comment by jdk137 | July 29, 2008 @ 4:23 pm

    [...] Installing LAMP on Ubuntu 7.10/8.04 (Linux,Apache,MySQL,PHP) Published by Jo on November 5, 2007 in Linux/Unix,PHP, Tutorials and Ubuntu . Tags: Apache, LAMP, Linux, MySQL, PHP, Ubuntu. [...]

    Pingback by My Life :: Installing LAMP on ubuntu :: July :: 2008 | July 31, 2008 @ 6:07 am

    well first of all congratulations for this super tutorial

    i have some questions please if someone can help i will appreciate it >>

    my questions are where the passwords were stored from phpmyadmin and what i can do whit it (phpmyadmin) ?

    whats the difference b/ween phpmyadmin and php5 or why we install phpmyadmin?

    thanks

    Comment by kromos | August 1, 2008 @ 6:21 am

    Hi Kromo,

    phpmyadmin is used as a web interface for mysql and not a php language.So basically phpmyadmin and php5 are 2 different things

    // Jo

    Comment by Jo | August 1, 2008 @ 6:30 am

    Hi all,

    this is a very useful article, particularly for a person who is not familiar with Linux (Ubuntu), Im having a small problem setting the

    password for mySQL, Im getting the following when I set the password:set password for root@'localhost = password(xxxxxx);

    ERROR 1044 (42000): Access denied for user @localhost to database mysql

    What am I doing wrong.

    Comment by Daniel P | August 1, 2008 @ 8:41 am

    hi daniel p

    have you try this?

    mysql -uroot -pxxx

  • 8/3/2019 InstallingLampOnUbantu

    16/24

    where pxxx = your password

    Comment by kromo | August 2, 2008 @ 2:48 pm

    Thanks for the great tutorial. Everything worked perfectly

    Comment by KenV | August 20, 2008 @ 3:49 pm

    Great tutorial.

    Thanks for publishing this!

    Comment by loz | August 24, 2008 @ 9:32 pm

    [...] .5-Installing Lamp on ubuntu ( 2 parts )6-Newbies Quick LAMP howto Ubuntu ( Ubuntu Forums )7-Installing LAMP onUbuntu 7.10 (Linux,Apache,MySQL,PHP)Powered by [...]

    Pingback by Wordpress On Ubuntu , Lamp first ( Installing and understanding lamp on ubuntu For Newbies ) - Infection Control |

    September 12, 2008 @ 4:54 pm

    This is really good tutorial thought I would have used:

    sudo /etc/init.d/apache2 force-reload

    To complete the phpmyadmin installation.

    Comment by LIMI-IT | September 24, 2008 @ 10:07 pm

    Hi Jo, all works perfectly in my xubuntu 7.10.

    Thanks a lot.

    alexisrlm

    Comment by alexisrlm | October 9, 2008 @ 6:40 am

    Just found your great tutorial. Thanks so much for the original write-up and updates! I got everything running on Ubuntu Hardy inabout 20 minutes (about 10 times faster then my last MAMP install on a WinxP box).

    The only thing I think you overlooked that may solve some peoples issues is to tell php where you php pages will be loaded from.

    To do this find the line in the php.ini file that says: doc_root = and add: /usr/var/www/ (or whatever your path to web root is).

    i.e: doc_root = /usr/var/www/

    Comment by Kai | October 20, 2008 @ 12:20 am

    i just wanna thanks for this tuturial.

    Comment by Aurelio Pita | October 28, 2008 @ 11:03 pm

    Thanks for install guide it is working very fine.

    Comment by senthilmurugan | November 5, 2008 @ 7:45 am

  • 8/3/2019 InstallingLampOnUbantu

    17/24

    Hey Jo,Thanks a lot for giving this point to point Guide to install lamp. we are also looking for more tutorial and guide from expert guyslike you.

    We are heartily appreciate your efforts, Gr8, Rock on!

    Comment by Jatin Meshiya | November 5, 2008 @ 8:18 am

    really good as one new to linux

    thanks a lot !

    Comment by Adhan | November 11, 2008 @ 10:33 pm

    [...] just Linux, Apache, MySQL and PHP. All need to be installed separately but its easy in ubuntu. See

    (http://joeabiraad.com/linuxunix/installing-lamp-on-ubuntu-710-linuxapachemysqlphp/100 ) Make sure to do the phpmyadmininstall. Apache does not get proper access to mysql [...]

    Pingback by Akshay Dua Blog Archive Install ubuntu LAMP | December 9, 2008 @ 10:39 am

    great article you made it damn easy

    Comment by santosh | December 14, 2008 @ 1:31 am

    Thank you so much for this useful information. It was really helpful in setting up an environment for me to test my PHP codes in.

    Comment by Maki | December 31, 2008 @ 6:14 pm

    thank you for an excellent guide

    however i couldnt get firefox to display your hello world php5 file

    i needed to change the syntax to this:

    Comment by itai-michaelson | January 5, 2009 @ 9:01 am

    i successfully installed apache php and mysql on my ubuntu 8.10. But i have a problem saving my php file on var/www folder. I

    know that this is regarding user permission problem but how can i solve this?..Is there an easy way to save my php file so i can test it any time i want

    Comment by leo | January 5, 2009 @ 7:34 pm

    Thank you, very useful.

    Comment by Paul | January 9, 2009 @ 11:28 pm

    JO:

    New to Linux, just escaped from XP

    This tutorial is fantastic! Took me 10 mins with copy and paste and everything worked perfectly!

    Thanks!

    For newbies who have asked (and doesnt seem to be answered, although is a huge list of replies and I may have missed it)

  • 8/3/2019 InstallingLampOnUbantu

    18/24

    /var/wwwis where you copy and edit your files

    http://127.0.0.1is the default location in your browser to access the files in /var/www

    http://127.0.0.1/phpmyadmin in the browser

    loads a familiar sight that you are looking for

    LEO: You can change permissions on the folder, but a better option is to change the owner of the folder to yourselfsudo chown -R YOURUSERNAME:users /var/www

    Then copying, deleting and editing from a HTML editor will work fine as you own the folder

    Comment by Greg | January 19, 2009 @ 3:43 am

    hey thanks a lot.. actually i have already an idea about changing the permission and i search it already on the net, its just that all oftheir sugestion or their command on the terminal like so the chown command is not workingmany thanks for thatnow i can

    practise my programming abilities again because my boss told me to transfer from tech to programmer

    Comment by Leo | January 19, 2009 @ 3:38 pm

    hey thanks a lot.. actually i have already an idea about changing the permission and i search it already on the net, its just that all of

    their sugestion or their command on the terminal like so the chown command is not workingmany thanks for thatnow i canpractise my programming abilities again because my boss told me to transfer from tech to programmer

    Comment by Leo | January 19, 2009 @ 3:38 pm

    Excellent!

    Followed the instructions with Ubuntu 8.10 with 2.6.27-7 kernel.

    The mysql install now will prompt you for the password for root.

    Comment by Linda | January 29, 2009 @ 6:01 pm

    [...] ! Hope you make it! LAMP infoWordPress.Org InstallWordPress.Org themes

    : [...]

    Pingback by LAMP WordPress.Org - Eutopia | January 30, 2009 @ 3:16 am

    [...] Linux ( LAMP ) [ho utilizzato questa procedura per l'installazione sul mio portatile su cui ho Ubuntu 8.10] [...]

    Pingback by DaL LoRe Blog Archive [PHP] Start | February 20, 2009 @ 12:25 am

    [...] Here are the 2 blog posts which helped me : by wulfshayde and from here [...]

    Pingback by LAMP configuration in Ubuntu 8.10 Everyone should get a 2nd chance | February 23, 2009 @ 10:16 am

    Thanks for the nice guide mate. It really helps me.

    Im doing web dev at almost 3 years now in Win environment. I like to take things deeper (sometimes it not always good beingspoon fed if in Windows) by getting it at Linux.

    More power to open source!

    Comment by cxian | March 1, 2009 @ 4:07 pm

  • 8/3/2019 InstallingLampOnUbantu

    19/24

    Hi! I like this guide Its complete and comprensive. At this moment installing on LinuxMint without problems Thanks for theinformation! Bye.

    Comment by Jhon F. Ortiz O. | March 7, 2009 @ 5:12 pm

    Thanks it works.

    Comment by Ruben | March 9, 2009 @ 6:43 pm

    Hello,

    thanks for your tutorial, like this much better then using tasksel.

    Although I missed$ sudo apt-get install php5-cli

    (You will get this error message when you try to compile a php file without it)

    Comment by eddy | March 11, 2009 @ 3:37 pm

    Simply awesome write-up. I was looking for such a brief, straight tutorial for LAMP configuration. You did a great work Jo !!!

    Thanks a lot

    Comment by rakesh | March 22, 2009 @ 7:37 pm

    For starting and stopping the server there is also a command.As somebody earlyer started and stopped through /etc/init.d/

    look at:

    /usr/sbin/apache2ctl

    Comment by harry | March 22, 2009 @ 8:51 pm

    Thank you Jo. A simple, easy to follow guide that works!

    Comment by Paul | March 31, 2009 @ 5:42 pm

    you rule !! Thanks so much. worked perfectly. probably saved me hours of stumbling and fumbling around !!!

    Comment by lynn | April 7, 2009 @ 4:46 am

    THANKS!!! I have an issue. My test.php is not working. I type in http://localhost/test.php and it just give me the code. No HELLWORLD, just the code. Why is that? I followed your steps to a T. Any idea what the issue is?

    Comment by Valtor | April 11, 2009 @ 12:29 am

    Hello,

    Tried posting earlier. But it is gone for some reason. I cannot get my test.php to show the actual test. It just shows the code for PHP.

    Any ideas on why or how to fix it? I have tried so many things usggested online, and it just doesnt work. What makes me morefrustated, is that I have installed this before with the tutorial and it worked great. But now it doesnt work.

  • 8/3/2019 InstallingLampOnUbantu

    20/24

    Great tutorial by the way!

    Comment by xlien | April 11, 2009 @ 2:52 am

    Good ! Its help me what i tried to find last five days. Thanks

    Comment by Rajesh yadav | April 11, 2009 @ 10:12 am

    [...] 3 Install LAMP Thanks to Joe Raad for the wonderful walk-through. If you follow his instructions, youll [...]

    Pingback by Installing Ubuntu and Rails on Virtual PC 2007 | April 16, 2009 @ 3:54 am

    thanks about your info for install apache php mysql..this so useful for me..thank alot of friend

    Comment by rahina | April 27, 2009 @ 3:59 am

    [...] useful guide to Ubuntu 9.04 Essential Ubuntu 9.04 guides and manuals Instaling LAMP on ubuntu Ubuntu [...]

    Pingback by Pedro Rui Silva Blog Archive Ubuntu 9.04 | May 16, 2009 @ 5:31 pm

    I just installed the whole stuff, using the great tutorial you wrote, LAMP is now working on my side

    Thanks for sharing the skills.

    Comment by designcode | May 31, 2009 @ 12:57 pm

    Thanks for the write up! This still works today:) i just set up 2 Ubuntu 8.10 servers using this.

    Its people like you that will help us windows guys make the final move to linux! man its so easy with good help and good writeups!

    Comment by ThinkMud | July 2, 2009 @ 4:02 pm

    Hi

    This is Very usefu1 ,,, i rea11y thanfu1 t0 j00000000

    Comment by Nagaraja | July 3, 2009 @ 4:14 pm

    how will i edit the bind-address when it is read-only? please help me.

    Comment by jeux | August 10, 2009 @ 6:56 am

    [...] Ubuntu: Installing LAMP on Ubuntu 7.10/8.04/8.10/9.04 (Linux,Apache,MySQL,PHP) VN:F [1.6.3_896]please wait

    Rating: 0.0/10 (0 votes cast)VN:F [1.6.3_896]Rating: 0 (from 0 votes) [...]

    Pingback by TrustedBux Ubuntu linux | September 2, 2009 @ 11:31 am

    Now just for the guys who were getting 404 error. By default the phpmyadmin gets installed in /usr/share/phpmyadmin (atleast in

    case of ubuntu) Just copy the folder to /var/www/ and Voila. Phpmyadmin works.BTW thanks geeeks.

  • 8/3/2019 InstallingLampOnUbantu

    21/24

    Comment by Suryanshu | September 8, 2009 @ 12:56 pm

    Thanks, Joe. I really appreciate you adding specific notes for those of us who are trying not-quite-typical installs and for having thegood sense to let us know what the results of each step are as well as how to ensure they were successful. You are a brilliant

    example for technical writers everywhere.

    Comment by sohlside | November 4, 2009 @ 6:25 am

    anyone can help me ?i am getting error message while installing php ,apache

    the error message is:-E: Couldnt find package apache2i am also didnt insert in to root though i gave true root password

    Comment by get error message | November 28, 2009 @ 6:36 am

    yogesh@yogesh-desktop:~$ sudo apt-get install apache2Reading package lists D oneBuilding dependency tree

    Reading state information DoneE: Couldnt find package apache2

    yogesh@yogesh-desktop:~$ su rootPassword:su: Authentication failure

    yogesh@yogesh-desktop:~$

    pls help me in install php i am getting above error

    Comment by get error message | November 28, 2009 @ 6:57 am

    [...] sudo apt-get install apache2 php5 libapache2-mod-php5 There are several full guides as well:

    http://joeabiraad.com/linuxunix/installing-lamp-on-ubuntu-710-linuxapachemysqlphp/100

    http://www.lejnieks.com/2009/02/17/installing-lamp-on-a-clean-ubuntu-server/[...]

    Pingback by What's the best way to install Apache and PHP on Ubuntu? - QuestionBin - Intelligent Answers for Smart

    Questions::Answer | December 1, 2009 @ 7:22 pm

    thanks a lot!! was of great help!

    Comment by siri | December 2, 2009 @ 8:58 pm

    Excellent tutorial. I followed it and got everything up in less than 30 minutes. I do have one question. How do you start the admin

    function for Drupal? I keep getting the following when I try the following.

    http://localhost/admin

    shows a 404 not found.

    Is that the correct url to go to, and start drupal. Let me know. Thanks.

    Shark.

    Comment by Gary | December 18, 2009 @ 9:27 am

    [...] si another guide to installing a LAMP server on Ubuntu here, which also usefully lists the command to download phpmyadmin

    for mySQL databases var addthis_pub [...]

    Pingback by Another guide to Installing LAMP on Ubuntu Multimedia-Digest | December 23, 2009 @ 12:09 am

  • 8/3/2019 InstallingLampOnUbantu

    22/24

    In spanish > http://www.hasheado.com/instalar-apache-mysql-y-php-en-ubuntu.html

    Comment by Marcos | January 7, 2010 @ 4:19 am

    Thank you so much. its very useful for beginners like me .(Y)

    Comment by Mohamed Gamal El-Din | March 10, 2010 @ 5:04 pm

    Hello,Nice tutorial for beginners like me. Now my problem is different. apt-get finds latest version of php say its php5.3 and lots of open

    source framework like Drupal, magento has still not adopted it properly. so they recommend php5.2.x to use. can you post code forinstalling php5.2?instead of following what should be used ?

    sudo apt-get install php5 libapache2-mod-php5

    Hopefully this will help to lots of other person. And if you have any idea that how to downgrade from php5.3 to any version ofphp5.2 than please post that also.

    Thank youTejas Mehta

    Comment by Tejas Mehta | April 3, 2010 @ 8:16 am

    tank is very work 100% to my computer linux by ubuntu 9.10 god tuto

    Comment by tckalexon | April 19, 2010 @ 4:35 am

    i am new for linux environment this page is really superp and it was helpful for me

    Comment by Albert | August 27, 2010 @ 2:45 pm

    thanks.its work well.so i need all software installation commands in ubuntu.i am new for linux environment

    Comment by mathi | September 24, 2010 @ 9:29 am

    thanks really nice very helpful.

    Comment by niharika | October 21, 2010 @ 4:40 pm

    a good spanish translation service does not cost that much and is actually very affordable `

    Comment by Fish Oil : | October 31, 2010 @ 12:04 am

    i use google when i want to do some spanish translation, it is good for general spanish translation .-~

    Comment by Pat Kroner | November 18, 2010 @ 11:41 am

  • 8/3/2019 InstallingLampOnUbantu

    23/24

    Hello allI am a beginner in Linux.Please I want to know how I can install and configure Drupal on Linux (Ubuntu).

    Thanks

    Comment by Elie | January 9, 2011 @ 2:08 am

    Hello

    I am also a newbe in Ubuntu installed like you told me but I face problems connecting PHP to Mysql.I used SQL on an IBM-mainframe but under PHP life is different.When I tried to connect in a PHP5 coding i got he result:

    Warning: mysql_connect(): Cant connect to local MySQL server through socket /var/run/mysqld/mysqld.sock (2) in/var/www/inw.php on line 15

    Whats is wrong?I have Ubuntu 10.04Thanks and greetings from Rene Geul

    Comment by RENE | January 12, 2011 @ 2:44 pm

    Problem solved.I did bind-address in /etc/mysql/my.cnf back to 127.0.0.1 and it works again.

    Setting an ip-adress is difficult because on this computer there are a few Ip-adresses and I do not know what is what, so be carefull.

    Comment by RENE | January 13, 2011 @ 2:35 pm

    [...] configuration to do relating to users and permissions. Ive modified the instructions from another blog post so that you can

    install Drupal, starting from a vanilla Ubuntu 10.04 [...]

    Pingback by How to install Drupal on Ubuntu 10.04 | Going Diagonal | March 5, 2011 @ 5:27 am

    How to unistall that all? i want to install XAMPP but before that i need to remove the existing settings.

    Dont say that i neednt remove it. May be i not but i want to remove that by ANY wayThanks!

    Comment by Chand | March 18, 2011 @ 12:37 pm

    Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP

    [...]Lately Ive been using ubuntu 7.10 for all my projects/daily work. As a web developer i should have LAMP on my machine and

    now i would guide you through installing it on [...]

    Trackback by Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP ... | June 22, 2011 @ 6:36 pm

    sleeve tattoo gallery,

    Comment by Zxkpsdaa | July 4, 2011 @ 11:41 am

    RSS feed for comments on this post. TrackBack URL

    Leave a comment

    Name (required)

    Mail (will not be published) (required)

  • 8/3/2019 InstallingLampOnUbantu

    24/24

    Website

    Submit Comment

    Mohamed Needal Narun Chitgasame Bhavin Love Michel Pach Soha Ankur River Amit Sabine Josivan

    Maze Solutions - Web & Software development on Facebook

    399 people like Maze Solutions - Web & Software development .

    Like

    Copyright MAZE SOLUTIONS | 2011 | All rights reserved

    Webmaster Offline.Online AgentsWebmaster Offline.