{"id":135,"date":"2017-03-25T09:45:14","date_gmt":"2017-03-25T09:45:14","guid":{"rendered":"https:\/\/test.warrensoft.co.uk\/wp-test\/home-hub\/?p=135"},"modified":"2018-12-08T07:32:18","modified_gmt":"2018-12-08T07:32:18","slug":"website-install-apache","status":"publish","type":"post","link":"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/03\/25\/website-install-apache\/","title":{"rendered":"Website &#8211; Install Apache"},"content":{"rendered":"<p>Use the following to install apache:<\/p>\n<pre>sudo apt-get install apache2<\/pre>\n<p>Add the following to your samba configuration, if you want to manage the website from your desktop, and restart samba:<\/p>\n[www]\ncomment = \/var\/www on Raspberry Pi<br \/>\npath = \/var\/www<br \/>\nwriteable = yes<br \/>\nguest ok = no<\/p>\n<pre>sudo \/etc\/init.d\/samba restart<\/pre>\n<p>Give the pi user access:<\/p>\n<pre>sudo chown -R pi:pi \/var\/www\/html<\/pre>\n<p>Confirm that you can browse to your website \u00a0 \u00a0<a href=\"http:\/\/home-hub\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/home-hub<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-148\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/WebserverTest-300x105.png\" alt=\"\" width=\"300\" height=\"105\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/WebserverTest-300x105.png 300w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/WebserverTest-768x270.png 768w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/WebserverTest.png 832w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>and create and edit files in the html document root.<\/p>\n<p>The next task is to install PHP, PEAR, MDB2 and MDB2 pgsql.<\/p>\n<pre>sudo apt-get install php5 libapache2-mod-php5 php-pear php5-pgsql<\/pre>\n<pre>sudo pear install MDB2<\/pre>\n<pre>sudo pear install pear\/MDB2#pgsql\r\n<\/pre>\n<p>The best way to check that PHP is correctly installed is to create a small script, info.php, that runs the phpinfo() function and place it in the var\/www\/html directory.<\/p>\n<pre>&lt;?php\r\n\r\n \/\/ Show all information\r\n phpinfo();\r\n\r\n?&gt;<\/pre>\n<p><a href=\"http:\/\/home-hub\/info.php\" target=\"_blank\" rel=\"noopener noreferrer\">Browse to this page<\/a> and if PHP is working you will see a long list of details about the installation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-151\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/PHPTest-300x124.png\" alt=\"\" width=\"300\" height=\"124\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/PHPTest-300x124.png 300w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/PHPTest-768x318.png 768w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/03\/PHPTest.png 829w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>If all that checks out we can move on to testing database access from our website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use the following to install apache: sudo apt-get install apache2 Add the following to your samba configuration, if you want to manage the website from your desktop, and restart samba: [www] comment = \/var\/www on Raspberry Pi path = \/var\/www writeable = yes guest ok = no sudo \/etc\/init.d\/samba restart Give the pi user access: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/03\/25\/website-install-apache\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Website &#8211; Install Apache&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-hub-software-website"],"_links":{"self":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":15,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":447,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/135\/revisions\/447"}],"wp:attachment":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}