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

Thread: Setup local webserver

  1. #1
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,693
    Distro
    Ubuntu 12.04 Precise Pangolin

    Setup local webserver

    So basically I want to setup a local web server that only my machine can access for PHP, MySQL and PHPMyAdmin what's the best way to do that?

  2. #2
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,617
    Distro
    Ubuntu Development Release

    Re: Setup local webserver

    Hi

    Install a lamp stack

    Code:
    sudo apt-get install tasksel
    Code:
    sudo tasksel
    Install the lamp server from there.

    Some questions. On a server or desktop install ?

    Available over the internet eventually or always local on your lan ? This question has huge implications for hardening your server, as if you keep it behind a firewall, you need far less hardening

    Is this just a development stack ?

    EDIT:

    I don't use phpmyadmin. I do everything using an ssh connection and the CLI so i will not be of much help with that.

    Kind regards
    Last edited by matt_symes; March 17th, 2013 at 11:57 AM. Reason: typo
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  3. #3
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,693
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setup local webserver

    This is on my primary desktop purly for developing my website with.

  4. #4
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,617
    Distro
    Ubuntu Development Release

    Re: Setup local webserver

    Hi

    Just install the lamp stack then.

    There are loads of good tutorials on the net for how to configure it but it should basically work out of the box.

    Kind regards
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  5. #5
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,693
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setup local webserver

    Well i tried that and:
    liam@liam-ubuntu:~$ sudo tasksel
    tasksel: aptitude failed (100)

    When i told it to install LAMP :/

  6. #6
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,693
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setup local webserver

    I found this guide though http://davideriboli.net/void/?p=1133 which is from this year so it's up to date

  7. #7
    Join Date
    Apr 2012
    Beans
    5,340

    Re: Setup local webserver

    you can install the LAMP stack without tasksel

    Code:
    sudo apt-get install lamp-server^
    (the carat at the end ^ is important) - that's the way I did it on my 12.04 box, then install phpmyadmin after if you need that as well

    Code:
    sudo  apt-get  install  phpmyadmin

  8. #8
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,617
    Distro
    Ubuntu Development Release

    Re: Setup local webserver

    Hi

    It may require an update but i have sucessfully used tasksel to install lamp many times.

    Code:
    sudo apt-get update
    Code:
    sudo tasksel install lamp-server
    Kind regards
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  9. #9
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,693
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setup local webserver

    Quote Originally Posted by steeldriver View Post
    you can install the LAMP stack without tasksel

    Code:
    sudo apt-get install lamp-server^
    (the carat at the end ^ is important) - that's the way I did it on my 12.04 box, then install phpmyadmin after if you need that as well

    Code:
    sudo  apt-get  install  phpmyadmin

    That's what the article said to do

    I have a question though, how can i set the folder it's using to one in my documents area?

  10. #10
    Join Date
    Sep 2006
    Beans
    7,291
    Distro
    Lubuntu Development Release

    skip tasksel

    Quote Originally Posted by ELD View Post
    Well i tried that and:
    liam@liam-ubuntu:~$ sudo tasksel
    tasksel: aptitude failed (100)

    When i told it to install LAMP :/
    Skip tasksel. You can install the whole LAMP stack with one line, if you really need PHP and MySQL. Perl comes built-in on Linux and other systems.

    Code:
     sudo apt-get update && sudo apt-get install lamp-server^
    Note the caret (^) is needed.

    If you don't need a database and PHP, you can install Apache by itself, and then add the others later if you need them:

    Code:
     sudo apt-get update && sudo apt-get install apache2
    About getting it so it will only be readable from your own local machine, you can use the firewall and/or set permissions in /etc/apache2/sites-available/default to allow only localhost.

Page 1 of 2 12 LastLast

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
  •