Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Setting up an Apache2, MySQL, Perl & PHP localhost?

  1. #1
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Cool Setting up an Apache2, MySQL, Perl & PHP localhost?

    Hi there, I'm completely new to Ubuntu and would like some help getting started.
    I'm aware there a Mac forum but this issue really isn't just for Mac, is it?

    For the time being I'm running Ubuntu 10.10 on a Macbook 4,1 with all the most recent patches, so far everything appears to be working well. Being happy I thought I'd move things along and start setting up the web-server assuming it's possible with the desktop version. In an ideal world I like to run the web-server using the system based Apache2 also need access to Perl, CGI and PHP development environments instead of applications such as LAMP/MAMP.

    So after some searching I've found a tutorial but come across an unexpected problem, something way outta my depth. Have search for a solution but nothing cut throat. Have just opened up the terminal:

    Code:
    $ sudo apt-get install apache2
    after entering my PW it give me:
    [sudo] password for ultraneo:
    E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
    I'm baffled, what does it mean? Initially thought it's got something to do with the application I had opened, so I've since terminated them all and tried again.. with the CD in the drive for good measure. But no, it's still the same

    Anyone like to give me a working guide for setting this up?
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,630

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    It means you have more than one package manager open. Like Synaptic, Ubuntu Software Center. Make sure those are closed. Last case scenario, reboot.

  3. #3
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    Quote Originally Posted by wojox View Post
    It means you have more than one package manager open. Like Synaptic, Ubuntu Software Center. Make sure those are closed. Last case scenario, reboot.
    Ahh.. Many Thanks.

    Have rebooted, re-ran the command and it appears to have installed.
    For the record, is there a task manager so I can see what applications remain open? Could be useful.
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  4. #4
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    Now I'm installing PHP5..
    Code:
    $ sudo apt-get install libapache2-mod-php5
    Then create links to apache2
    Code:
    $ sudo a2enmod php5
    Restart Apache2:
    Code:
    $ sudo service apache2 restart
    Open browser, key in 127.0.0.1 hit return:

    It works!

    This is the default web page for this server.
    The web server software is running but no content has been added, yet.
    Install MYSQL with PHP 5
    Code:
    $ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql


    Wait..

    Why do I install PHP5 in twice?
    Was there a quicker shorter way of doing all of this?


    Last edited by UltraNEO*; July 11th, 2011 at 01:44 AM.
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  5. #5
    Join Date
    Jun 2011
    Location
    London, UK
    Beans
    70
    Distro
    Ubuntu

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    Quote Originally Posted by UltraNEO* View Post
    For the record, is there a task manager so I can see what applications remain open? Could be useful.
    So to System -> Administration -> System Monitor

    Quote Originally Posted by UltraNEO* View Post
    Was there a quicker shorter way of doing all of this?
    The php5-mysql package is required for php5 to interact with mysql. Most packages have dependencies - other packages they require to work properly. For example it would be pointless to have the bit of php that can interact with mysql, without the other libraries php needs to work. Apt-get worries about all of this for you, and will install any dependencies for a package if they are not installed already. Read more about php5-mysql and its dependencies here.

    For your mysql problem, try

    Code:
    mysql -u root -p
    and then type in you password. Oh wait, you've edited it.. but I'll leave it in for anyone else who finds this thread

  6. #6
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    For your mysql problem, try

    Code:
    mysql -u root -p
    and then type in you password. Oh wait, you've edited it.. but I'll leave it in for anyone else who finds this thread
    Sorry, I realized my error and corrected it with some password resetting
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  7. #7
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    Question...

    Where on the HD is the root webserver directory?
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  8. #8
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    Quote Originally Posted by UltraNEO* View Post
    Question...

    Where on the HD is the root webserver directory?
    Nevermind, I found it...
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  9. #9
    Join Date
    Nov 2010
    Location
    Gtr Mcr. UK
    Beans
    Hidden!
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    OK.. Weird.

    Sorry for being a noob..
    What's the best way to install phpMyAdmin? I tried the most ovbious one..

    Code:
    $ sudo apt-get install phpmyadmin
    but it's telling me this...

    [sudo] password for ultraneo:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package phpmyadmin
    Does that mean there's an error? or something else opened?
    Specs: Macbook(4,1), Dell 2408WFP, 2Gb Ram, Maverick & Natty

  10. #10
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,630

    Re: Setting up an Apache2, MySQL, Perl & PHP localhost?

    You need to turn on the universe repositories.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •