{"id":13837,"date":"2019-04-06T10:25:12","date_gmt":"2019-04-06T10:25:12","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13837"},"modified":"2019-04-06T10:25:12","modified_gmt":"2019-04-06T10:25:12","slug":"installing-lamp-linux-apache-mariadb-php-phpmyadmin-in-rhel-centos-7-0","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/installing-lamp-linux-apache-mariadb-php-phpmyadmin-in-rhel-centos-7-0\/","title":{"rendered":"Installing LAMP (Linux, Apache, MariaDB, PHP\/PhpMyAdmin) in RHEL\/CentOS 7.0"},"content":{"rendered":"<p>Skipping the LAMP introduction, as I\u2019m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous\u00a0<b>LAMP<\/b>\u00a0stack \u2013 Linux Apache, MariaDB, PHP, PhpMyAdmin \u2013 on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded\u00a0<b>httpd<\/b>\u00a0daemon to\u00a0<b>Apache HTTP 2.4<\/b>.<\/p>\n<div id=\"attachment_7988\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-LAMP-in-CentOS-7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7988\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-LAMP-in-CentOS-7.jpg\" alt=\"Install LAMP in CentOS 7\" width=\"600\" height=\"400\" aria-describedby=\"caption-attachment-7988\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7988\" class=\"wp-caption-text\">Install LAMP in RHEL\/CentOS 7.0<\/p>\n<\/div>\n<h4>Requirements<\/h4>\n<p>Depending on the used distribution, RHEL or CentOS 7.0, use the following links to perform a minimal system installation, using a static IP Address for network configuration.<\/p>\n<h5>For RHEL 7.0<\/h5>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/redhat-enterprise-linux-7-installation\/\" target=\"_blank\" rel=\"noopener\">RHEL 7.0 Installation Procedure<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/enable-redhat-subscription-reposiories-and-updates-for-rhel-7\/%20target=\">Register and Enable Subscriptions\/Repositories on RHEL 7.0<\/a><\/li>\n<\/ol>\n<h5>For CentOS 7.0<\/h5>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/centos-7-installation\/\" target=\"_blank\" rel=\"noopener\">CentOS 7.0 Installation Procedure<\/a><\/li>\n<\/ol>\n<h3>Step 1: Install Apache Server with Basic Configurations<\/h3>\n<p><strong>1.<\/strong>\u00a0After performing a minimal system installation and configure your server network interface with a\u00a0<a href=\"https:\/\/www.tecmint.com\/configure-network-interface-in-rhel-centos-7-0\/\" target=\"_blank\" rel=\"noopener\">Static IP Address on RHEL\/CentOS 7.0<\/a>, go ahead and install Apache 2.4 httpd service binary package provided form official repositories using the following command.<\/p>\n<pre># yum install httpd<\/pre>\n<div id=\"attachment_7967\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-Apache-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7967\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-Apache-in-CentOS-7-620x372.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-Apache-in-CentOS-7-620x372.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-Apache-in-CentOS-7-1024x614.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-Apache-in-CentOS-7.png 1280w\" alt=\"Install Apache in CentOS 7\" width=\"620\" height=\"372\" aria-describedby=\"caption-attachment-7967\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7967\" class=\"wp-caption-text\">Install Apache Web Server<\/p>\n<\/div>\n<p><strong>2.<\/strong>\u00a0After\u00a0<b>yum<\/b>\u00a0manager finish installation, use the following commands to manage Apache daemon, since RHEL and CentOS 7.0 both migrated their\u00a0<b>init<\/b>\u00a0scripts from\u00a0<b>SysV<\/b>\u00a0to\u00a0<b>systemd<\/b>\u00a0\u2013 you can also use SysV and Apache scripts the same time to manage the service.<\/p>\n<pre># systemctl status|start|stop|restart|reload httpd\r\n\r\nOR \r\n\r\n# service httpd status|start|stop|restart|reload\r\n\r\nOR \r\n\r\n# apachectl configtest| graceful<\/pre>\n<div id=\"attachment_7969\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-Apache-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7969\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-Apache-in-CentOS-7-620x372.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-Apache-in-CentOS-7-620x372.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-Apache-in-CentOS-7-1024x614.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-Apache-in-CentOS-7.png 1280w\" alt=\"Start Apache in CentOS 7\" width=\"620\" height=\"372\" aria-describedby=\"caption-attachment-7969\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7969\" class=\"wp-caption-text\">Start Apache Web Server<\/p>\n<\/div>\n<p><strong>3.<\/strong>\u00a0On the next step start Apache service using systemd init script and open RHEL\/CentOS 7.0 Firewall rules using\u00a0<b>firewall-cmd<\/b>, which is the default command to manage iptables through\u00a0<b>firewalld<\/b>\u00a0daemon.<\/p>\n<pre># firewall-cmd --add-service=http<\/pre>\n<p><strong>NOTE<\/strong>: Make notice that using this rule will lose its effect after a system reboot or firewalld service restart, because it opens on-fly rules, which are not applied permanently. To apply consistency iptables rules on firewall use\u00a0<b>\u2013permanent<\/b>\u00a0option and restart firewalld service to take effect.<\/p>\n<pre># firewall-cmd --permanent --add-service=http\r\n# systemctl restart firewalld<\/pre>\n<div id=\"attachment_7970\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Firewall-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7970\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Firewall-in-CentOS-7-620x251.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Firewall-in-CentOS-7-620x251.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Firewall-in-CentOS-7.png 900w\" alt=\"Enable Firewall in CentOS 7\" width=\"620\" height=\"251\" aria-describedby=\"caption-attachment-7970\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7970\" class=\"wp-caption-text\">Enable Firewall in CentOS 7<\/p>\n<\/div>\n<p>Other important Firewalld options are presented below:<\/p>\n<pre># firewall-cmd --state\r\n# firewall-cmd --list-all\r\n# firewall-cmd --list-interfaces\r\n# firewall-cmd --get-service\r\n# firewall-cmd --query-service service_name\r\n# firewall-cmd --add-port=8080\/tcp<\/pre>\n<p><strong>4.<\/strong>\u00a0To verify Apache functionality open a remote browser and type your server IP Address using HTTP protocol on URL (<b>http:\/\/server_IP<\/b>), and a default page should appear like in the screenshot below.<\/p>\n<div id=\"attachment_7971\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Default-Page.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7971\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Default-Page-620x324.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Default-Page-620x324.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Default-Page-1024x536.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Default-Page.png 1096w\" alt=\"Apache Default Page\" width=\"620\" height=\"324\" aria-describedby=\"caption-attachment-7971\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7971\" class=\"wp-caption-text\">Apache Default Page<\/p>\n<\/div>\n<p><strong>5.<\/strong>\u00a0For now, Apache\u00a0<b>DocumentRoot<\/b>\u00a0path it\u2019s set to\u00a0<b>\/var\/www\/html<\/b>\u00a0system path, which by default doesn\u2019t provide any index file. If you want to see a directory list of your DocumentRoot path open Apache\u00a0<b>welcome<\/b>\u00a0configuration file and set\u00a0<b>Indexes<\/b>\u00a0statement from\u00a0<b>\u2013<\/b>\u00a0to\u00a0<b>+<\/b>\u00a0on\u00a0<b>&lt;LocationMach&gt;<\/b>\u00a0directive, using the below screenshot as an example.<\/p>\n<pre># nano \/etc\/httpd\/conf.d\/welcome.conf<\/pre>\n<div id=\"attachment_7972\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Directory-Listing.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7972\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Directory-Listing-620x284.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Directory-Listing-620x284.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Directory-Listing.png 1014w\" alt=\"Apache Directory Listing\" width=\"620\" height=\"284\" aria-describedby=\"caption-attachment-7972\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7972\" class=\"wp-caption-text\">Apache Directory Listing<\/p>\n<\/div>\n<p><strong>6.<\/strong>\u00a0Close the file, restart Apache service to reflect changes and reload your browser page to see the final result.<\/p>\n<pre># systemctl restart httpd<\/pre>\n<div id=\"attachment_7973\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Index-File.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7973\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Apache-Index-File.png\" alt=\"Apache Index File\" width=\"516\" height=\"272\" aria-describedby=\"caption-attachment-7973\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7973\" class=\"wp-caption-text\">Apache Index File<\/p>\n<\/div>\n<h3>Step 2: Install PHP5 Support for Apache<\/h3>\n<p><strong>7.<\/strong>\u00a0Before installing PHP5 dynamic language support for Apache, get a full list of available PHP modules and extensions using the following command.<\/p>\n<pre># yum search php<\/pre>\n<div id=\"attachment_7974\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7974\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-in-CentOS-7-620x338.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-in-CentOS-7-620x338.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-in-CentOS-7.png 999w\" alt=\"Install PHP in CentOS 7\" width=\"620\" height=\"338\" aria-describedby=\"caption-attachment-7974\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7974\" class=\"wp-caption-text\">Install PHP in CentOS 7<\/p>\n<\/div>\n<p><strong>8.<\/strong>\u00a0Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic\u00a0<b>MariaDB<\/b>\u00a0support in PHP and\u00a0<b>PhpMyAdmin<\/b>\u00a0you need to install the following modules.<\/p>\n<pre># yum install php php-mysql php-pdo php-gd php-mbstring<\/pre>\n<div id=\"attachment_7975\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-Modules-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7975\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-Modules-in-CentOS-7-620x139.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-Modules-in-CentOS-7-620x139.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-Modules-in-CentOS-7.png 824w\" alt=\"Install PHP Modules in CentOS 7\" width=\"620\" height=\"139\" aria-describedby=\"caption-attachment-7975\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7975\" class=\"wp-caption-text\">Install PHP Modules<\/p>\n<\/div>\n<div id=\"attachment_7976\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-mbstring-in-CentOs-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7976\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-mbstring-in-CentOs-7-620x290.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-mbstring-in-CentOs-7-620x290.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-mbstring-in-CentOs-7-1024x479.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-PHP-mbstring-in-CentOs-7.png 1030w\" alt=\"Install PHP mbstring Module\" width=\"620\" height=\"290\" aria-describedby=\"caption-attachment-7976\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7976\" class=\"wp-caption-text\">Install PHP mbstring Module<\/p>\n<\/div>\n<p><strong>9.<\/strong>\u00a0To get a full information list on PHP from your browser, create a\u00a0<b>info.php<\/b>\u00a0file on Apache Document Root using the following command from root account, restart httpd service and direct your browser to the\u00a0<b>http:\/\/server_IP\/info.php<\/b>\u00a0address.<\/p>\n<pre># echo \"&lt;?php phpinfo(); ?&gt;\" &gt; \/var\/www\/html\/info.php\r\n# systemctl restart httpd<\/pre>\n<div id=\"attachment_7977\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Check-PHP-Info-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7977\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Check-PHP-Info-in-CentOS-7-620x359.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Check-PHP-Info-in-CentOS-7-620x359.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Check-PHP-Info-in-CentOS-7-1024x593.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Check-PHP-Info-in-CentOS-7.png 1045w\" alt=\"Check PHP Info in CentOS 7\" width=\"620\" height=\"359\" aria-describedby=\"caption-attachment-7977\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7977\" class=\"wp-caption-text\">Check PHP Info in CentOS 7<\/p>\n<\/div>\n<p><strong>10.<\/strong>\u00a0If you get an error on PHP Date and Timezone, open\u00a0<b>php.ini<\/b>\u00a0configuration file, search and uncomment\u00a0<b>date.timezone<\/b>\u00a0statement, append your physical location and restart Apache daemon.<\/p>\n<pre># nano \/etc\/php.ini<\/pre>\n<p>Locate and change\u00a0<b>date.timezone<\/b>\u00a0line to look like this, using\u00a0<a href=\"https:\/\/php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"nofollow noopener\">PHP Supported Timezones<\/a>\u00a0list.<\/p>\n<pre>date.timezone = Continent\/City<\/pre>\n<div id=\"attachment_7978\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Set-Time-Zone-in-CentOS.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7978\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Set-Time-Zone-in-CentOS-620x335.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Set-Time-Zone-in-CentOS-620x335.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Set-Time-Zone-in-CentOS.png 991w\" alt=\"Set Timezone in PHP\" width=\"620\" height=\"335\" aria-describedby=\"caption-attachment-7978\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7978\" class=\"wp-caption-text\">Set Timezone in PHP<\/p>\n<\/div>\n<h3>Step 3: Install and Configure MariaDB Database<\/h3>\n<p><strong>11.<\/strong>\u00a0Red Hat Enterprise Linux\/CentOS 7.0 switched from MySQL to MariaDB for its default database management system. To install MariaDB database use the following command.<\/p>\n<pre># yum install mariadb-server mariadb<\/pre>\n<div id=\"attachment_7979\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-MariaDB-in-CentOs-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7979\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-MariaDB-in-CentOs-7-620x174.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-MariaDB-in-CentOs-7-620x174.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Install-MariaDB-in-CentOs-7.png 814w\" alt=\"Install MariaDB in CentOS 7\" width=\"620\" height=\"174\" aria-describedby=\"caption-attachment-7979\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7979\" class=\"wp-caption-text\">Install MariaDB in CentOS 7<\/p>\n<\/div>\n<p><strong>12.<\/strong>\u00a0After MariaDB package is installed, start database daemon and use\u00a0<b>mysql_secure_installation<\/b>\u00a0script to secure database (set root password, disable remotely logon from root, remove test database and remove anonymous users).<\/p>\n<pre># systemctl start mariadb\r\n# mysql_secure_installation<\/pre>\n<div id=\"attachment_7980\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-MariaDB-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7980\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-MariaDB-in-CentOS-7-620x243.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-MariaDB-in-CentOS-7-620x243.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Start-MariaDB-in-CentOS-7.png 1017w\" alt=\"Start MariaDB Database\" width=\"620\" height=\"243\" aria-describedby=\"caption-attachment-7980\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7980\" class=\"wp-caption-text\">Start MariaDB Database<\/p>\n<\/div>\n<div id=\"attachment_7981\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Secure-MySQL-Installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7981\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Secure-MySQL-Installation-620x279.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Secure-MySQL-Installation-620x279.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Secure-MySQL-Installation.png 1012w\" alt=\"Secure MySQL Installation\" width=\"620\" height=\"279\" aria-describedby=\"caption-attachment-7981\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7981\" class=\"wp-caption-text\">Secure MySQL Installation<\/p>\n<\/div>\n<p><strong>13.<\/strong>\u00a0To test database functionality login to MariaDB using its root account and exit using\u00a0<b>quit<\/b>\u00a0statement.<\/p>\n<pre>mysql -u root -p\r\nMariaDB &gt; SHOW VARIABLES;\r\nMariaDB &gt; quit<\/pre>\n<div id=\"attachment_7982\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Connect-MySQL-Installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7982\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Connect-MySQL-Installation-620x267.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Connect-MySQL-Installation-620x267.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Connect-MySQL-Installation.png 995w\" alt=\"Connect MySQL Database in CentOS\" width=\"620\" height=\"267\" aria-describedby=\"caption-attachment-7982\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7982\" class=\"wp-caption-text\">Connect MySQL Database<\/p>\n<\/div>\n<h3>Step 4: Install PhpMyAdmin<\/h3>\n<p><strong>14.<\/strong>\u00a0By default official RHEL 7.0 or CentOS 7.0 repositories doesn\u2019t provide any binary package for PhpMyAdmin Web Interface. If you are uncomfortable using MySQL command line to manage your database you can install PhpMyAdmin package by enabling\u00a0<b>CentOS 7.0 rpmforge<\/b>\u00a0repositories using the following command.<\/p>\n<pre># yum install http:\/\/pkgs.repoforge.org\/rpmforge-release\/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm<\/pre>\n<p>After enabling rpmforge repository, next install PhpMyAdmin.<\/p>\n<pre># yum install phpmyadmin<\/pre>\n<div id=\"attachment_7983\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-RPMForge-in-CentOS-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7983\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-RPMForge-in-CentOS-7-620x130.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-RPMForge-in-CentOS-7-620x130.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-RPMForge-in-CentOS-7.png 985w\" alt=\"Enable RPMForge in CentOS 7\" width=\"620\" height=\"130\" aria-describedby=\"caption-attachment-7983\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7983\" class=\"wp-caption-text\">Enable RPMForge Repository<\/p>\n<\/div>\n<p><strong>15.<\/strong>\u00a0Next configure PhpMyAdmin to allow connections from remote hosts by editing\u00a0<b>phpmyadmin.conf<\/b>\u00a0file, located on Apache\u00a0<b>conf.d<\/b>\u00a0directory, commenting the following lines.<\/p>\n<pre># nano \/etc\/httpd\/conf.d\/phpmyadmin.conf<\/pre>\n<p>Use a\u00a0<b>#<\/b>\u00a0and comment this lines.<\/p>\n<pre># Order Deny,Allow\r\n# Deny from all\r\n# Allow from 127.0.0.1<\/pre>\n<div id=\"attachment_7984\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Allow-Remote-PhpMyAdmin-Access.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7984\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Allow-Remote-PhpMyAdmin-Access-620x295.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Allow-Remote-PhpMyAdmin-Access-620x295.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Allow-Remote-PhpMyAdmin-Access.png 923w\" alt=\"Allow Remote PhpMyAdmin Access\" width=\"620\" height=\"295\" aria-describedby=\"caption-attachment-7984\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7984\" class=\"wp-caption-text\">Allow Remote PhpMyAdmin Access<\/p>\n<\/div>\n<p><strong>16.<\/strong>\u00a0To be able to login to PhpMyAdmin Web interface using cookie authentication method add a\u00a0<b>blowfish<\/b>\u00a0string to phpmyadmin\u00a0<b>config.inc.php<\/b>\u00a0file like in the screenshot below using the\u00a0<a href=\"http:\/\/www.question-defense.com\/tools\/phpmyadmin-blowfish-secret-generator\" target=\"_blank\" rel=\"nofollow noopener\">generate a secret string<\/a>, restart Apache Web service and direct your browser to the URL address\u00a0<b>http:\/\/server_IP\/phpmyadmin\/<\/b>.<\/p>\n<pre># nano \/etc\/httpd\/conf.d\/phpmyadmin.conf\r\n# systemctl restart  httpd<\/pre>\n<div id=\"attachment_7985\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Add-Blowfish-PhpMyAdmin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7985\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Add-Blowfish-PhpMyAdmin-620x298.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Add-Blowfish-PhpMyAdmin-620x298.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Add-Blowfish-PhpMyAdmin.png 946w\" alt=\"Add Blowfish in PhpMyAdmin\" width=\"620\" height=\"298\" aria-describedby=\"caption-attachment-7985\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7985\" class=\"wp-caption-text\">Add Blowfish in PhpMyAdmin<\/p>\n<\/div>\n<div id=\"attachment_7986\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Login-to-PhpMyAdmin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7986\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Login-to-PhpMyAdmin-620x335.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Login-to-PhpMyAdmin-620x335.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Login-to-PhpMyAdmin-1024x553.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Login-to-PhpMyAdmin.png 1110w\" alt=\"PhpMyAdmin Dashboard\" width=\"620\" height=\"335\" aria-describedby=\"caption-attachment-7986\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7986\" class=\"wp-caption-text\">PhpMyAdmin Dashboard<\/p>\n<\/div>\n<h3>Step 5: Enable LAMP System-wide<\/h3>\n<p><strong>17.<\/strong>\u00a0If you need MariaDB and Apache services to be automatically started after reboot issue the following commands to enable them system-wide.<\/p>\n<pre># systemctl enable mariadb\r\n# systemctl enable httpd<\/pre>\n<div id=\"attachment_7987\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Services-System-Wide.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7987\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Services-System-Wide-620x128.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Services-System-Wide-620x128.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/07\/Enable-Services-System-Wide.png 904w\" alt=\"Enable Services System Wide\" width=\"620\" height=\"128\" aria-describedby=\"caption-attachment-7987\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7987\" class=\"wp-caption-text\">Enable Services System Wide<\/p>\n<\/div>\n<p>That\u2019s all it takes for a basic LAMP installation on Red Hat Enterprise 7.0 or CentOS 7.0. The next series of articles related to LAMP stack on CentOS\/RHEL 7.0 will discuss how to create Virtual Hosts, generate SSL Certificates and Keys and add SSL transaction support for Apache HTTP Server.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/install-lamp-in-centos-7\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Skipping the LAMP introduction, as I\u2019m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous\u00a0LAMP\u00a0stack \u2013 Linux Apache, MariaDB, PHP, PhpMyAdmin \u2013 on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded\u00a0httpd\u00a0daemon &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/installing-lamp-linux-apache-mariadb-php-phpmyadmin-in-rhel-centos-7-0\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing LAMP (Linux, Apache, MariaDB, PHP\/PhpMyAdmin) in RHEL\/CentOS 7.0&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13837","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13837"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13837\/revisions"}],"predecessor-version":[{"id":13838,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13837\/revisions\/13838"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}