Linux LAMP on Ubuntu

Discussion in 'Software' started by GAVI, 12 Sep 2011.

  1. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    Been trying to use Linux more recently so I got Ubuntu running in VirtualBox. Now I'd like to install Apache, MySQL and PHP.

    I think the hard part will be configuring it all and getting it to run well but for now, installing each component just come down to using apt-get install, right?

    EDIT: I found a nice little tutorial explaining most of the process however there's one part after installing MySQL where it says to edit the bind-address in the my.cnf file so that "other computers on my network to view the server I have created". Do I need to do that if I'm just going to be playing around with it and don't really want other computers to view the actual website?
     
    Last edited: 12 Sep 2011
  2. Blazza181

    Blazza181 SVM PLACENTA CASEI

    Joined:
    19 Apr 2011
    Posts:
    3,429
    Likes Received:
    329
  3. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    I've already started followingthe instructions here http://www.howtoforge.com/ubuntu_lamp_for_newbies

    As I mentioned in my edited post above I've installed MySQL and now there's a step saying to edit the bind-address in the my.cnf file so that "other computers on my network to view the server I have created". It say's to replace the 127.0.0.1 with my IP address.

    Do I need to do that if I'm just going to be playing around with it and don't really want other computers to view the actual website? If so how do I get my IP address?
     
  4. PhoenixTank

    PhoenixTank From The Ashes

    Joined:
    5 May 2010
    Posts:
    465
    Likes Received:
    28
    Leave it as is. It should be fine for what you want - give it a try. If you do want to view the website on your Host OS and not just the Guest OS (The Host OS being the OS you installed Virtualbox on and Ubuntu being the Guest OS) I think you'd need to change it to the internal Network IP. There is highly likely a command to run in terminal that can give you that, but I cannot remember off the top of my head.
     
  5. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    Ok I left the bind-address as is but now the next step isn't working.
    When I run "mysql -u root" I get "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"
     
  6. FuzzyOne

    FuzzyOne

    Joined:
    19 Sep 2002
    Posts:
    1,823
    Likes Received:
    32
    did you set a root password when you installed mysql?
     
  7. Nedsbeds

    Nedsbeds Badger, Slime, Weasel!!

    Joined:
    16 May 2002
    Posts:
    1,972
    Likes Received:
    9
    sudo tasksel install lamp-server

    if you are in a hurry...
     
  8. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    Fuzzy: Yes I set a password. Do I have to enter it in that command as well; I thought it would just ask me after entering "mysql -u root"
     
  9. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,943
    Likes Received:
    268
    With password you want to run it with this command :
    Code:
    mysql -u root -p
     
  10. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    Still isn't working. This is what I get:
    $ mysql -u root -p password
    Enter password: password
    ERROR 1049 (4200): Unknown database 'password'
     
  11. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,943
    Likes Received:
    268
    No :). Only :
    Code:
    mysql -u root -p
    Or
    Code:
    mysql -u root -p databasename
    You don't enter the password on command line.
     
  12. GAVI

    GAVI What's a Dremel?

    Joined:
    5 Mar 2011
    Posts:
    63
    Likes Received:
    0
    OK thanks I've everything installed and configured except phpMyAdmin which I've installed but havn't configured yet. I'm following another guide I found for this and it says:

    "...instead of manually editing the config.inc.php I can use the Setup Script.

    First I must manually create a folder config in the phpMyAdmin directory. This is a security measure."

    Problem is it doesn't say where this folder is. Did a search and there are quite a few phpMyAdmin directories (etc/phpmyadmin, usr/share/phpmyadmin, ...) and at least 2 of them have a config.inc.php file so I don't know which to use.
     

Share This Page