Install Apache, MySQL, PHP, and PHPMyAdmin

Aptitude (Apache2, php5, MySQL & phpmyadmin)

We’ll start with the easiest “in your face” method.  Aptitude.  You’ll be up and running in just a couple of minutes flat.

  1. Install our goodies
  2. $ sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
  3. Enter your password
  4. [sudo] password for <username>:
  5. You should see the following output. Enter “Y” to continue if you approve of the package list.  (If you don’t, you might want to consider the Build from source option to pick exactly what you want.)
  6. Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reading extended state information
    Initializing package states... Done
    The following NEW packages will be installed:
     apache2 apache2-mpm-prefork{a} apache2-utils{a} apache2.2-bin{a} apache2.2-common{a}
     libapache2-mod-php5 libapr1{a} libaprutil1{a} libaprutil1-dbd-sqlite3{a} libaprutil1-ldap{a}
     libdbd-mysql-perl{a} libdbi-perl{a} libexpat1{a} libhtml-template-perl{a} libmysqlclient16{a}
     libnet-daemon-perl{a} libplrpc-perl{a} mysql-client-5.1{a} mysql-common{a} mysql-server
     mysql-server-5.1{a} mysql-server-core-5.1{a} php5-common{a} php5-mysql ssl-cert{a}
    0 packages upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
    Need to get 28.8MB of archives. After unpacking 74.3MB will be used.
    Do you want to continue? [Y/n/?]
  7. Next it’ll go through with downloading and beginning the install of the packages listed above like apache2, mysql the libraries required etc etc etc.  Part way through that process a Package Configuration window will come up asking you to set your root mysql password.  This password is isolated from your system root password, so set it to what ever you want it to be.
  8. mysql 5.1 root password

    mysql 5.1 root password 2

  9. When it completes you are left back at the console and it’s installed!  Easy huh?  Point your browser to http://localhost (if your installing this on your machine) If you are installing this on a server, point your browser to http://SERVERIP (ie. http://192.168.1.100)
  10. apache it works ubuntu

  11. Now lets do the last step and install “phpmyadmin” to make the MySQL administration a snap via a browser based page.
  12. $ sudo aptitude install phpmyadmin
  13. Enter your password and confirm the packages about to be installed by pressing “Y” just like we did earlier.
  14. Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reading extended state information
    Initializing package states... Done
    The following NEW packages will be installed:
     dbconfig-common{a} defoma{a} fontconfig-config{a} javascript-common{a} libfontconfig1{a} libgd2-xpm{a}
     libjpeg62{a} libjs-mootools{a} libltdl7{a} libmcrypt4{a} libpng12-0{a} libt1-5{a} libxpm4{a} php5-gd{a}
     php5-mcrypt{a} phpmyadmin ttf-dejavu{a} ttf-dejavu-core{a} ttf-dejavu-extra{a} wwwconfig-common{a}
    0 packages upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
    Need to get 10.3MB of archives. After unpacking 29.2MB will be used.
    Do you want to continue? [Y/n/?]
  15. Choose “apache2″ and hit ENTER
  16. phpmyadmin ubuntu configuration

  17. Before phpmyadmin can be installed a database for itself must be installed to the MySQL server we installed earlier.  Allow it to configure with “dbconfig-common”.
  18. configure phpmyadmin with dbconfig-common

  19. Enter the root password you used earlier when the MySQL 5.1 install asked for a password.
  20. phpmyadmin administrative user password

  21. Enter a unique password specifically for phpmyadmin.  (If you leave it blank it’ll tell you what password it generated.  Do not forget it!)
  22. Configure phpmyadmin database user

    Configure phpmyadmin user

  23. Aptitude will now continue on it’s rampage installing phpmyadmin.
  24. Creating config file /etc/phpmyadmin/config-db.php with new version
    granting access to database phpmyadmin for phpmyadmin@localhost: success.
    verifying access for phpmyadmin@localhost: success.
    creating database phpmyadmin: success.
    verifying database phpmyadmin exists: success.
    populating database via sql...  done.
    dbconfig-common: flushing administrative password
     * Reloading web server config apache2                      [ OK ]
     
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reading extended state information
    Initializing package states... Done
    Writing extended state information... Done
  25. All done, point your webrowser to http://localhost/phpmyadmin (or again, if you are installing to a server http://192.168.1.100/phpmyadmin).
  26. phpmyadmin authenticate login screen

  27. Username: root Password: <whatever you made the MySQL administrative password>
  28. phpmyadmin logged in to Admin Panel

All done!  Now get to Work!

Pages: 1 2

Tags:

 

About the author

More posts by | Visit the site of Scott

 

2 Comments

  1. Scott says:

    Do you have the Universe repo enabled? I believe it’s in these

  2. Frenchie says:

    what repositary are you using. I’m trying to install Ubuntu V10 and It says that cannot find “phpmyadmin”. Thank you for your assistance.

Leave a Comment

 




 

 
Extra Tags