Get the App
SLTechnology News&Howtos  ›  Servers  › 

Construction and debugging of LAMP multi-computer scheme

Shulou Source: shulou.com Published: 2022-06-03 04:54:11 10月03日 Update

What this article shares with you is the construction and debugging of LAMP multi-machine solution. I believe that most people have not yet learned this skill. In order to let you learn, I have summarized the following content for you. Without saying much, let's read on.

1.LAMP multi-machine solution to build the scene

two。 Skills that should be paid attention to in building, modulating, and testing environmental scenarios

1) after the 141host on the virtual machine is cloned successfully, the new host is reset to the new IP (192.168.153.141) address.

2) change the hostname of the 141host, such as # hostnamectl set-hostname LAMP

3) authorize the forum database in the 143 database server to the 141 host, otherwise the following error occurs, as shown in the following figure:

4) the problem of being unable to connect to the database server (192.168.153.143) will now be resolved:

[root@sky9890] # mysql-uroot-p

Enter password:

MySQL [(none)] > use mysql

Database changed

MySQL [mysql] > select Host from user where user='root'

+-- +

| | Host |

+-- +

| | 127.0.0.1 | |

| | 192.168.153.142 | |

| |:: 1 |

| | localhost |

| | localhost.localdomain |

+-- +

MySQL [mysql] > GRANT ALL ON *. * to root@'192.168.153.141' IDENTIFIED BY'*; # Authorization

MySQL [mysql] > flush privileges

MySQL [mysql] > select Host from user where user='root'

+-- +

| | Host |

+-- +

| | 127.0.0.1 | |

| | 192.168.153.141 | |

| | 192.168.153.142 | |

5) successful test, as shown below:

6) when starting the server, it is necessary to start the necessary services automatically, so it is necessary to train according to the job requirements and professionalism when studying at ordinary times.

[root@lamp sky9890] # cat / etc/rc.local

/ usr/local/apache2/bin/apachectl # apache service

[sky9890@redis_master ~] $ll / etc/rc.d/rc.local

-rw-r--r--. 1 root root 506 January 17 14:40 / etc/rc.d/rc.local

[root@lamp sky9890] # chmod + x / etc/rc.d/rc.local # must be granted for execution

After reading this article, have you learned how to build and debug the LAMP multi-computer scheme? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

Tags: Hosts services solutions skills data databases servers success content scenarios more articles tests essentials addresses most environment look literacy career Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB MySQL Huawei Docker