{"id":292,"date":"2017-08-21T11:38:24","date_gmt":"2017-08-21T11:38:24","guid":{"rendered":"http:\/\/www.esds.co.in\/data-centers\/kb\/?p=292"},"modified":"2019-06-11T05:19:11","modified_gmt":"2019-06-11T05:19:11","slug":"installing-a-lamp-server","status":"publish","type":"post","link":"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/","title":{"rendered":"Installing a LAMP server"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"size-full wp-image-3674 aligncenter\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10.png\" alt=\"Install-Apache-in-Ubuntu-15-10\" width=\"746\" height=\"473\" srcset=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10.png 746w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10-300x190.png 300w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10-60x38.png 60w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10-150x95.png 150w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/p>\n<p>This post is intended for programmers developing projects with PHP but have not been encouraged to install GNU \/ Linux.<\/p>\n<p>Not to lose focus on what we need, conserve resources and minimize the administration, we always recommend a minimal installation of Debian and then we&#8217;ll install the rest.<\/p>\n<p><strong>After installing the operating system to install APACHE proceed with MySQL and PHP:<\/strong><\/p>\n<p># Apt-get install apache2 php5 libapache2-mod-php5 mysql-server php5-mysql phpmyadmin<\/p>\n<p>The root-folder of the webserver is in \/ var \/ www \/ but you can change or set up links, a task that is a bit more advanced.<\/p>\n<p>The next step is to configure the firewall, if the computer is accessible from the Internet or a network with many computers. The same is not restrictive (all traffic is denied unless you explicitly allow) but permissive.<\/p>\n<p># \/ Bin \/ bash PATH = \/ usr \/ sbin: \/ sbin: \/ bin: \/ usr \/ bin # change eth0 for the local interface in the case of another LAN = &#8220;eth0&#8221; # &#8212;&#8212;&#8211; INITIALIZATION &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; iptables-F iptables-t nat-F iptables-t mangle-F iptables &#8211; X # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; LOOPBACK iptables -A INPUT-i lo-j ACCEPT # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; iptables FILTER PACKAGES &#8211; A INPUT-m state &#8211; state ESTABLISHED, RELATED-j ACCEPT iptables-A INPUT-m state &#8211; state NEW-i! eth1-j ACCEPT # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- ROUTING &#8212;&#8211; echo 1&gt; \/ proc\/sys\/net\/ipv4\/ip_forward # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8211; SSH &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- $ IPTABLES-A INPUT-i $ LAN-p tcp &#8211; dport 22-j ACCEPT # &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8211; HTTP $ IPTABLES-A INPUT-i $ LAN-p tcp &#8211; dport 80-j ACCEPT<\/p>\n<p><strong>A script should give an execute permissions:<\/strong><\/p>\n<p>chmod 744 firewall<\/p>\n<p>Now we can add it in two places: the system start or in the folder \/ etc \/ network \/ if-up (run whenever the system detects that a network interface up a link.)<\/p>\n<p>For this example we will assign within the system boot sequence. For that you must copy the script to the folder \/ etc \/ init.d \/ and create links to it in each init.<\/p>\n<p>cp firewall \/ etc \/ init.d<br \/>\nupdate-rc.d firewall defaults 80<\/p>\n<p><strong>Please Note:<\/strong> If you are looking for Rich <a href=\"https:\/\/www.esds.co.in\/blog\/data-center-services\/\"><strong>Data Center Web Hosting<\/strong><\/a>, Cloud Services, <strong>Dedicated Hosting<\/strong>, <strong>Colocation<\/strong> or Software Services in India at Affordable Costs, Visit our website at <strong><a href=\"http:\/\/www.esds.co.in\/\" target=\"_blank\">WWW.ESDS.CO.IN<\/a><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is intended for programmers developing projects with PHP but have not been encouraged to install GNU \/ Linux. Not to lose focus on what we need, conserve resources and minimize the administration, we always recommend a minimal installation of Debian and then we&#8217;ll install the rest. After installing the operating system to install&#8230; <\/p>\n<div class=\"clear\"><\/div>\n<p><a href=\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\" class=\"gdlr-button small excerpt-read-more\">Read More<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[69],"tags":[247,620,846,847,115,114,845,43,116,61,844],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.9.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing a LAMP server<\/title>\n<meta name=\"description\" content=\"This post of Installing a LAMP server is intended for programmers developing projects with PHP but have not been encouraged to install GNU \/ Linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing a LAMP server\" \/>\n<meta property=\"og:description\" content=\"This post of Installing a LAMP server is intended for programmers developing projects with PHP but have not been encouraged to install GNU \/ Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\" \/>\n<meta property=\"og:site_name\" content=\"ESDS Official Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ESDSdc\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-21T11:38:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-11T05:19:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:site\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"ESDS Official Knowledgebase\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.esds.co.in\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2010\/12\/Install-Apache-in-Ubuntu-15-10.png\",\"width\":746,\"height\":473},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/#webpage\",\"url\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\",\"name\":\"Installing a LAMP server\",\"isPartOf\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/#primaryimage\"},\"datePublished\":\"2017-08-21T11:38:24+00:00\",\"dateModified\":\"2019-06-11T05:19:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\"},\"description\":\"This post of Installing a LAMP server is intended for programmers developing projects with PHP but have not been encouraged to install GNU \/ Linux.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/installing-a-lamp-server\/\",\"name\":\"Installing a LAMP server\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\",\"name\":\"ESDS ADMIN\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5618393df3c15e5b6b3b9ef917e83827?s=96&d=mm&r=g\",\"caption\":\"ESDS ADMIN\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/292"}],"collection":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/comments?post=292"}],"version-history":[{"count":7,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/292\/revisions"}],"predecessor-version":[{"id":3676,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/292\/revisions\/3676"}],"wp:attachment":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/media?parent=292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/categories?post=292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/tags?post=292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}