Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 758

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/prolinuxhub/public_html/wp-includes/script-loader.php on line 758

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/load.php on line 926

Notice: Trying to access array offset on value of type bool in /home/prolinuxhub/public_html/wp-includes/theme.php on line 2360

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 693

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 774

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function create_function() is deprecated in /home/prolinuxhub/public_html/wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode.php on line 937

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798
Deploy LAMP on CentOS7 – PROLINUXHUB
Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Notice: Trying to access array offset on value of type null in /home/prolinuxhub/public_html/wp-content/plugins/cta/classes/class.cta.render.php on line 492

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deploy LAMP on CentOS7

Many open source p[projects require LAMP with database and database user ready to go. Here we will look at basic commands on CentOS7 to get it up and running quickly.

After CentOS7 installed update all packages

yum update -y

Install apache web server

yum install httpd

Start service and enable it to start on boot

systemctl start httpd.service
systemctl enable httpd.service

Install MariaDB database server

yum install mariadb-server mariadb

Start mysql services

systemctl start mariadb

Secure mysql installation

mysql_secure_installation

Enable MariaDB to start on boot

systemctl enable mariadb.service

Install PHP with mysql support

yum install php php-mysql

Restart apache web server

systemctl restart httpd.service

Open necessary firewall ports for example http

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --reload

And finally create database and user. See example below.

create database mydb;
grant usage on *.* to mydbuser@localhost identified by 'mypassword';
grant all privileges on mydb.* to user@localhost ;
FLUSH PRIVILEGES;

Remote MariaDB server

In some cases you may need to install database server on different system that your web server. Here is some basic steps to get it done.
yum install mariadb-server mariadb

1. Install mysql

yum install mariadb-server mariadb
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation

2. Edit configuretion file and add following directive

vi /etc/my.cnf
bind-address = 0.0.0.0

3. Create database and grant remote access to user

create database db_name;
grant usage on *.* to 'username'@'192.168.0.%' identified by 'Password';
grant all privileges on db_name.* to 'username'@'192.168.0.%' ;
FLUSH PRIVILEGES;

4. Open firewall ports

firewall-cmd --zone=public --permanent --add-port=3306/tcp
firewall-cmd --reload

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/prolinuxhub/public_html/wp-includes/formatting.php on line 4798