Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Problems in the actual Operation of LAMP Multi-aircraft Scheme

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report