{"id":23976,"date":"2021-10-01T13:05:50","date_gmt":"2021-10-01T13:05:50","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=23976"},"modified":"2021-10-01T13:05:50","modified_gmt":"2021-10-01T13:05:50","slug":"preparing-steps-for-lamp-installation","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/preparing-steps-for-lamp-installation\/","title":{"rendered":"Preparing steps for LAMP Installation"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li><strong>Apache install on Centos 7<\/strong><\/li><li><strong>MYSQL(MariaDB) install on Centos 7<\/strong><\/li><li><strong>PHP install on Centos 7<\/strong><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Apache install on Centos 7<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Check OS version<\/li><\/ul>\n\n\n\n<p># <strong>cat \/etc\/*release<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Install apache<\/li><\/ul>\n\n\n\n<p><strong># yum install httpd httpd-devel<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Start Service<\/li><\/ul>\n\n\n\n<p><strong># systemctl start httpd<br># systemctl status httpd<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Test URL<\/li><\/ul>\n\n\n\n<p>Browse for <strong>http:\/\/ip-address<\/strong> from web client system and same system<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Add firewall rules<\/li><\/ul>\n\n\n\n<p><strong># Firewall-cmd \u2013add-port=80\/tcp \u2013permanent<br># Firewall-cmd \u2013add-port=80\/udp \u2013permanent<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MYSQL(MariaDB) install on Centos 7<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Install MYSQL(MariaDB)<\/li><\/ul>\n\n\n\n<p><strong># yum install mariadb-server mariadb<br># systemctl start mariadb<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Make you MYSQL secure<\/li><\/ul>\n\n\n\n<p><strong># mysql_secure_installation<br># systemctl restart mariadb<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connect to your MYSQL and set remote access to Remote IP<\/h2>\n\n\n\n<p><strong># mysql -u root -p<br>Enter password:<br>mysql&gt;GRANT ALL ON . to root@&#8217;ip-addr&#8217; IDENTIFIED BY &#8216;root\u2019;<br>mysql&gt;FLUSH PRIVILEGES; mysql&gt;exit<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP install on Centos 7<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Install PHP<\/li><\/ul>\n\n\n\n<p><strong># yum install php php-mysql<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create test PHP file and restart Apache<\/li><\/ul>\n\n\n\n<p><strong># vi \/var\/www\/html\/info.php<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"php\"><span class=\"hljs-meta\">&lt;?php<\/span>\r\nphpinfo();\r\n<span class=\"hljs-meta\">?&gt;<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong># systemctl restart httpd<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify config changes in Apache<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Change 1:<\/strong> New file &#8220;php.conf&#8221; in \/etc\/httpd\/conf.d\/<\/li><li><strong>Change 2:<\/strong> New file &#8220;10-php.conf&#8221; in \/etc\/httpd\/conf.modules.d\/<\/li><li><strong>Change 3:<\/strong> New file &#8220;libphp5.so&#8221; in \/etc\/httpd\/modules<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Apache install on Centos 7 MYSQL(MariaDB) install on Centos 7 PHP install on Centos 7 Apache install on Centos 7 Check OS version # cat \/etc\/*release Install apache # yum&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-23976","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/23976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=23976"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/23976\/revisions"}],"predecessor-version":[{"id":23977,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/23976\/revisions\/23977"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=23976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=23976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=23976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}