{"id":117,"date":"2017-01-02T19:57:12","date_gmt":"2017-01-02T19:57:12","guid":{"rendered":"http:\/\/cellbiol.com\/test-bioinfo\/?page_id=117"},"modified":"2017-06-04T14:32:18","modified_gmt":"2017-06-04T14:32:18","slug":"installing-a-lamp-linux-apache-php-mysql-server","status":"publish","type":"page","link":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/chapter-2-the-linux-operating-system-setting-up-a-linux-web-server\/installing-a-lamp-linux-apache-php-mysql-server\/","title":{"rendered":"2-5: Installing a LAMP (Linux, Apache PHP, MySQL) Server"},"content":{"rendered":"<figure id=\"attachment_119\" aria-describedby=\"caption-attachment-119\" style=\"width: 750px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-119\" src=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_logo.png\" alt=\"The Apache Logo\" width=\"750\" height=\"212\" srcset=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_logo.png 750w, http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_logo-300x85.png 300w\" sizes=\"auto, (max-width: 750px) 85vw, 750px\" \/><\/a><figcaption id=\"caption-attachment-119\" class=\"wp-caption-text\">Figure 2-5-1: The Apache Logo \u2013 Source: <a href=\"http:\/\/incubator.apache.org\/\">The Apache Incubator<\/a><\/figcaption><\/figure>\n<p>Open a web browser on your linux machine, for example Firefox, and type:<\/p>\n<p>localhost<\/p>\n<p>in the address bar. You should get a connection failed message. If you try to visit the machine IP address from a remote computer, you will get the same. Our linux machine is still not a web server, as it misses any web server software.<\/p>\n<p>We will now install the <a href=\"http:\/\/httpd.apache.org\/\">apache2 web server software<\/a>. We will also install support for the <a href=\"http:\/\/php.net\/\">PHP programming language<\/a>\u00a0and for <a href=\"http:\/\/www.mysql.com\/products\/community\/\">MySQL databases<\/a>. The full bundle is known as LAMP (<strong>L<\/strong>inux-<strong>A<\/strong>pache-<strong>P<\/strong>HP-<strong>M<\/strong>ySQL) server.<\/p>\n<p>There is a longer way, and a very short and easy way to install LAMP. We will take the easy path. For information, thought, these are, in summary, the commands for the long way:<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get update<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get install apache2<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get install mysql-server<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql<\/p>\n<p>You can find a more exhaustive description of the process with additional configuration details in this nice <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04\" target=\"_blank\">DigitalOcean tutorial<\/a>.<\/p>\n<p>Let&#8217;s instead take advantage of the &#8220;<a href=\"https:\/\/help.ubuntu.com\/community\/Tasksel\" target=\"_blank\">tasksel<\/a>&#8221; shell command. Tasksel allows to install bundles of different programs grouped together to achieve a certain functionality such as for example a full desktop environment, a full mail server, a full web server etc.., without having to install individual software packets.<\/p>\n<p>Here&#8217;s the short procedure required to install LAMP:<\/p>\n<p>Let&#8217;s update the repositories:<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get update<\/p>\n<p>Installing tasksel:<\/p>\n<p>andrea@ubuntu:~$ sudo apt-get install tasksel<\/p>\n<p>Installing LAMP with a single command:<\/p>\n<p>andrea@ubuntu:~$ sudo tasksel install lamp-server<\/p>\n<p>While MySQL is installed you will be required to input a password for the root user. It is important that you enter a good password and then remember it or securely store it for eventual later usage.<\/p>\n<p>You can use a tool such as <a href=\"https:\/\/identitysafe.norton.com\/password-generator\/\">this one<\/a>\u00a0to generate a secure password. You may want to generate a 15 or more characters password for a good security.<\/p>\n<p>Once the installation is over, open again Firefox and visit<\/p>\n<p>localhost<\/p>\n<p>and\/or visit your Linux machine IP address from a remote computer.<\/p>\n<p>If everything went fine during installation you will now see the default apache web page:<\/p>\n<figure id=\"attachment_123\" aria-describedby=\"caption-attachment-123\" style=\"width: 636px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_default_web_page_at_localhost.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-123\" src=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_default_web_page_at_localhost.png\" alt=\"The default apache web page at localhost\" width=\"636\" height=\"339\" srcset=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_default_web_page_at_localhost.png 636w, http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-content\/uploads\/2017\/01\/apache_default_web_page_at_localhost-300x160.png 300w\" sizes=\"auto, (max-width: 636px) 85vw, 636px\" \/><\/a><figcaption id=\"caption-attachment-123\" class=\"wp-caption-text\">Figure 2-5-2: The default apache web page at localhost<\/figcaption><\/figure>\n<p>Congratulations, you were able to successfully set up a Linux web server!<\/p>\n<p>In order to use it, we need to understand a few things about how the web server is configured by default. In the next section we will look at a few important configuration details, that will allow us to use the server at best for this course and to use it as the course server, that will host a web development account for each student. To achieve this a few tweaks will be required to modify the behavior of the default apache installation. Keep reading about the <a href=\"\/bioinformatics_web_development\/chapter-2-the-linux-operating-system-setting-up-a-linux-web-server\/apache-web-server-configuration\/\">Apache web server configuration<\/a>\u00a0in the next section.<\/p>\n<div class=\"google-ad\">\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- bioinfo web dev 2 --><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-0159360445983090\"\n     data-ad-slot=\"3442176918\"><\/ins><br \/>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<\/div>\n<h2>Chapter Sections<\/h2>\n<p>[pagelist include=&#8221;63&#8243;]<\/p>\n<p>[siblings]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open a web browser on your linux machine, for example Firefox, and type: localhost in the address bar. You should get a connection failed message. If you try to visit the machine IP address from a remote computer, you will get the same. Our linux machine is still not a web server, as it misses &hellip; <a href=\"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/chapter-2-the-linux-operating-system-setting-up-a-linux-web-server\/installing-a-lamp-linux-apache-php-mysql-server\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;2-5: Installing a LAMP (Linux, Apache PHP, MySQL) Server&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":63,"menu_order":5,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-117","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/pages\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":15,"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/pages\/117\/revisions"}],"predecessor-version":[{"id":2642,"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/pages\/117\/revisions\/2642"}],"up":[{"embeddable":true,"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/pages\/63"}],"wp:attachment":[{"href":"http:\/\/www.cellbiol.com\/bioinformatics_web_development\/wp-json\/wp\/v2\/media?parent=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}