{"id":329,"date":"2008-05-02T14:22:02","date_gmt":"2008-05-02T13:22:02","guid":{"rendered":"http:\/\/west-penwith.org.uk\/blog\/?p=329"},"modified":"2014-04-17T10:56:13","modified_gmt":"2014-04-17T09:56:13","slug":"installing-lamp-on-ubuntu-710-desktop","status":"publish","type":"post","link":"https:\/\/west-penwith.org.uk\/blog\/archives\/329","title":{"rendered":"Installing LAMP on Ubuntu 7.10 Desktop"},"content":{"rendered":"<p>Doing a search with those keywords reveals a number of guides but most are now either old, incomplete or refer to the Ubuntu Server Build which has most of it pre-installed. My requirement was to put <strong>L<\/strong>inux (Ubuntu), <strong>A<\/strong>pache (web server), <strong>M<\/strong>ySQL (database) and <strong>P<\/strong>HP (programming language) onto an existing desktop build (under VMware Fusion on a Mac) to serve as a WordPress development test-bed to save me having to keep uploading to a sandpit region on my web host.<\/p>\n<p>The references used to achieve (and write) this were <a href=\"http:\/\/www.supriyadisw.net\/2006\/12\/lamp-installation-on-ubuntu\">LAMP Installation On Ubuntu<\/a>, <a href=\"http:\/\/joeabiraad.com\/linuxunix\/installing-lamp-on-ubuntu-710-linuxapachemysqlphp\/100\">Installing LAMP on Ubuntu 7.10<\/a> and <a href=\"http:\/\/fosswire.com\/2007\/05\/29\/installing-and-configuring-lamp-on-ubuntu-part-1\/\">Installing and configuring LAMP on Ubuntu<\/a>.<\/p>\n<p>The process will will mostly be done in a terminal (shell) window and a browser. The latter can be on a separate system on your network, in which case subtitute the Ubuntu IP address for &#8220;localhost&#8221; in the instructions below.<\/p>\n<p><code>sudo apt-get install apache2<\/code><br \/>\nChange the ownership of the web area using<br \/>\n<code>sudo chown -R [your Ubuntu account] \/var\/www<\/code><br \/>\nand test it by pointing a browser at <code>http:\/\/localhost\/<\/code><\/p>\n<p><code>sudo apt-get install php5 libapache2-mod-php5<\/code><br \/>\nRestart Apache (<code>sudo \/etc\/init.d\/apache2 restart<\/code>), create a file <code>\/var\/www\/phpinfo.php<\/code> containing the line <code>&lt;?php phpinfo(); ?&gt;<\/code> and test from the browser (<code>http:\/\/localhost\/phpinfo.php<\/code>).<\/p>\n<p><code>sudo apt-get install mysql-server mysql-client<\/code><br \/>\n<code>sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin<\/code><br \/>\nDuring this process you should be asked to set the MySQL root password. It is very important.<\/p>\n<p>Edit <code>\/etc\/php5\/apache2\/php.ini<\/code> and insert the line <code>extension=mysql.so<\/code> (watch the spelling, the comment in the file is wrong) so that PHP can see MySQL. Also Apache needs to be told where myphpadmin is so edit <code>\/etc\/apache2\/apache2.conf<\/code> and add the line<br \/>\n<code>Include \/etc\/phpmyadmin\/apache.conf<\/code><br \/>\nRestart apache again and test by going to phpmyadmin (<code>http:\/\/localhost\/phpmyadmin\/<\/code>). The login is <code>root<\/code> and the MySQL root password (I think).<\/p>\n<p>My immediate requirement was to use it for WordPress. Although you can download a WordPress package using apt-get, I found that this was rather out of date so I did it manually. You will need a database so login to phpmyadmin, create a database by entering the name (e.g. WordPressDB) in the box and click the create button. Now click the SQL button and execute the following command where WordPressDB, WPDBaccount and WPDBaccountPW are your choices.<br \/>\n<code>GRANT ALL ON WordPressDB.* to WPDBaccount@localhost IDENTIFIED BY \u2018WPDBaccountPW\u2019;<\/code><\/p>\n<p>Now in the WordPress directory (say \/var\/www\/wordpress) copy the wp-config-sample.php file to wp-config.php and edit it thus<\/p>\n<p><code>\/\/ ** MySQL settings ** \/\/<br \/>\ndefine('DB_NAME', 'WordPressDB');<br \/>\ndefine('DB_USER', 'WPDBaccount');<br \/>\ndefine('DB_PASSWORD', 'WPDBaccountPW');<br \/>\n<\/code><\/p>\n<p>Now finish the install by surfing to <code>http:\/\/localhost\/wordpress\/wp-admin\/install.php<\/code><br \/>\nIt will give you a WordPress admin password on the way.<\/p>\n<p>That is it&mdash;the only problems I found were keeping track of which password was which and went where.<\/p>\n<p>By the way, it is only for use on your home network, there are other things you will need to do if you are planning to set it up as a real internet visible server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Doing a search with those keywords reveals a number of guides but most are now either old, incomplete or refer to the Ubuntu Server Build which has most of it pre-installed. My requirement was to put Linux (Ubuntu), Apache (web server), MySQL (database) and PHP (programming language) onto an existing desktop build (under VMware Fusion [&hellip;]<\/p>\n","protected":false},"author":239,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,10],"tags":[],"class_list":["post-329","post","type-post","status-publish","format-standard","hentry","category-technical","category-wordpress"],"_links":{"self":[{"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/users\/239"}],"replies":[{"embeddable":true,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":1,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":1886,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions\/1886"}],"wp:attachment":[{"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/west-penwith.org.uk\/blog\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}