In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Server1 (master) Server2 (slave) Server3 (Middleware middleware)
First of all, build a master-slave database server on server1 and server2
Server1 (master)
Install the software:
Yum install-y mysql mysql-server
Modify configuration file / etc/my.cnf
Start service login authorization:
Server2 (slave)
Install the software:
Yum install-y mysql mysql-server
Modify configuration file / etc/my.cnf
Server3 (middleware)
Install the gcc environment
Yum install-y gcc*
Install jdk (Java environment required to configure amoeba)
Declare how programs written in Java are used (/ etc/profile)
Source / etc/profile (declare the environment)
JAVA_HOME=/amoeba/jdk
Export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
Export PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH
Export CLASSPTH
Install amoeba
Decompress:
Configure amoeba
Make a copy for server2 (the IP address is the IP of the slave server)
Start amoeba
Modify startup script
Grant execution permissions:
Vim / usr/local/amoeba/bin/amoeba
You need to install the mysql toolkit yum-y install mysql (login address is IP for middleware)
Test:
Stop the stop slave service on the slave server
In server1
In server2
Query on server3 (middleware)
The results show that when I query the information, it provides services to me from the server.
At this point, I add information to the database:
Then check server1 and server2 respectively to see which server the data is written to.
Server1
Server2
In this experiment, data separation is realized.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.