
mysqloraclemongodb_database high availability architecture (MySQL, Oracle, MongoDB, Redis)
1. MySQL MySQL small high-availability architecture Scheme :MySQL dual master, master-slave+ Keepalived master-slave automatic switching Server resources:two Taiwan PC Server Advantages :Simple architecture,Saving resources Disadvantages:Cannot be linearly expanded, Need to manually restore the master after the master-slave failure Slave architecture MySQL medium-sized high-availability architecture Scheme:MMM + MySQL dual-master+ multi-slave high-availability solution Server resources: 1. At least five PC Servers,2 MySQL master libraries,2 MySQL slave libraries,1 MMM Monitor; 2. 1 MMM Monitor selects low configuration; 3. If you do not use F5 as the load balancer of the slave library, you can use 2 PC SERVERs to deploy LVS or HAProxy+Keepalived combination, #xff1b; Advantages:Dual active hot standby mode,Read and write separation,SLAVE cluster can be linearly expanded Disadvantages:Read and write Separation needs to be solved on the program side ,Master-slave delay will occur when Master writes large batches MySQL large-scale high-availability architecture Main idea:Middleware& #43;MySQL Sharding Such as the solution “Cobar and other middleware” MySQL technology The picture is omitted. 2. MySQL master-slave+ Keepalived master-slave automatic switching scheme (already available above) 3. MMM+MySQL dual master+ multi-slave high availability Solution (already available above) 4. MySQL + Pecemaker(Heartbeat) + DRBD High Availability 5. MySQL + RHCS High Availability Solution 6. MySQL + Cluser cluster…

Installation and configuration under Linux: Java, Tomcat, Solr, Redis, ActiveMQ
JAVA: Tomcat: MySQL: Solr: Redis: ActiveMQ: Redirect: https://www.cnblogs.com/liuliu3/p/6945176.html

Installation and configuration under Linux: Java, Tomcat, Solr, Redis, ActiveMQ
JAVA: Tomcat: MySQL: Solr: Redis: ActiveMQ: Redirect: https://www.cnblogs.com/liuliu3/p/6945176.html

Deploy java, mysql, redis, fastdfs, tracker, stroage, nginx, rabbitMq services on the centos7 system and build corresponding servers
centos system builds development environment and services Foreword The centos system must ensure that it can access the Internet 1. Install java-1.8.0 version yum install java- 1.8.0-openjdk* This command can successfully install java-1.8.0. Enter java -version to view the java version 2. Mysql57 is installed and supports remote connection Operation steps Command (the yellow part changes according to the actual environment) (1) Install wget yum -y install wget (2) Download the MySQL57 database installation program wget -i -c http://dev.mysql.com/get/ mysql57-community-release-el7-10.noarch.rpm (3 )Install database yum -y install mysql57-community-release-el7-10.noarch.rpm (4) Install database service yum -y install mysql-community-server (5) Start the database systemctl start mysqld.service (6) View the database initial password grep “temporary password” /var/log/mysqld.log, the original password of the database here is: *(bywl-2hDlP ( 7) Log in to the database with the initial password mysql -uroot -p (8) Reset database password alter user root@localhost identified by ‘password‘; If the password you set is too simple You need to change the password rules (9) Change password rules set global validate_password_policy=0; (10) Change password length limit set global validate_password_length=6;Changesuccessful! (11)Afterthechangesarecompleted,proceedtostep8 alteruserroot@localhostidentifiedby’password‘; (12)Setdatabaseremoteconnection GRANTALLPRIVILEGESON.TO’root’@’%’IDENTIFIEDBY’password‘WITHGRANTOPTION; (13)Turnoffthefirewall systemctlstopfirewalld.service (14)Permanentlyturnoffthefirewall systemctldisablefirewalld.service (15)ThatisRemotesoftwareconnectionisavailable Remotesoftwarenavicat,aftertheinstallationiscompleted,openitandyoucantesttheconnection 3. Install redis-4.0.8 (1) Run the following command in the /usr/local/ directory, or you can…
Common microservice interview questions (Java, database, Redis, SpringCloud interview questions)
Microservices java Database redis spring cloud key memcached list Write your review! Come on, watch it all Member login | User registration Recommended reading (adsbygoogle = window.adsbygoogle || []).push({}); <!– –> .syntaxhighlighter{ width: 740px; padding-top:40px;padding-bottom:20px; border: 1px solid #333; background: url(“/style/SyntaxHighlighter/top_bg.svg”); background-size: 43px; background-repeat: no-repeat; margin-bottom: -7px; border-radius: 15px; background-position: 16px 12px; padding-left: 10px; } .gutter{ display: none; }

Deploy java, mysql, redis, fastdfs, tracker, stroage, nginx, rabbitMq services on the centos7 system and build corresponding servers
centos system builds development environment and services Foreword The centos system must ensure that it can access the Internet 1. Install java-1.8.0 version yum install java- 1.8.0-openjdk* This command can successfully install java-1.8.0. Enter java -version to view the java version 2. Mysql57 is installed and supports remote connection Operation steps Command (the yellow part changes according to the actual environment) (1) Install wget yum -y install wget (2) Download the MySQL57 database installation program wget -i -c http://dev.mysql.com/get/ mysql57-community-release-el7-10.noarch.rpm (3 )Install database yum -y install mysql57-community-release-el7-10.noarch.rpm (4) Install database service yum -y install mysql-community-server (5) Start the database systemctl start mysqld.service (6) View the database initial password grep “temporary password” /var/log/mysqld.log, the original password of the database here is: *(bywl-2hDlP ( 7) Log in to the database with the initial password mysql -uroot -p (8) Reset database password alter user root@localhost identified by ‘password‘; If the password you set is too simple You need to change the password rules (9) Change password rules set global validate_password_policy=0; (10) Change password length limit set global validate_password_length=6;Changesuccessful! (11)Afterthechangesarecompleted,proceedtostep8 alteruserroot@localhostidentifiedby’password‘; (12)Setdatabaseremoteconnection GRANTALLPRIVILEGESON.TO’root’@’%’IDENTIFIEDBY’password‘WITHGRANTOPTION; (13)Turnoffthefirewall systemctlstopfirewalld.service (14)Permanentlyturnoffthefirewall systemctldisablefirewalld.service (15)ThatisRemotesoftwareconnectionisavailable Remotesoftwarenavicat,aftertheinstallationiscompleted,openitandyoucantesttheconnection 3. Install redis-4.0.8 (1) Run the following command in the /usr/local/ directory, or you can…
Redis, redis Getting Started Guide_PHP Tutorial
Redis, redis Getting Started Guide It’s time to take a break from the busy schedule… 1 <?php 2 /** 3 * Description: Redis 4 * Create date:2015-10-11 17:27 5 * Author: zhaoyingnan 6 **/ 7 8 /* 9 __construct,__destruct,connect,pconnect,close,ping,echo,get,set, 10 setex,psetex,setnx,getSet,randomKey,renameKey,renameNx,getMultiple,exists,delete, 11 incr,incrBy,incrByFloat,decr,decrBy,type,append,getRange,setRange,getBit, 12 setBit,strlen,getKeys,sort,sortAsc,sortAscAlpha,sortDesc,sortDescAlpha,lPush,rPush, 13 lPushx,rPushx,lPop,rPop,blPop,brPop,lSize,lRemove,listTrim,lGet, 14 lGetRange,lSet,lInsert,sAdd,sSize,sRemove,sMove,sPop,sRandMember,sContains, 15 sMembers,sInter,sInterStore,sUnion,sUnionStore,sDiff,sDiffStore,setTimeout,save,bgSave, 16 lastSave,flushDB,flushAll,dbSize,auth,ttl,pttl,persist,info,resetStat, 17 select,move,bgrewriteaof,slaveof,object,bitop,bitcount,bitpos,mset,msetnx, 18 rpoplpush,brpoplpush,zAdd,zDelete,zRange,zReverseRange,zRangeByScore,zRevRangeByScore,zCount,zDeleteRangeByScore, 19 zDeleteRangeByRank,zCard,zScore,zRank,zRevRank,zInter,zUnion,zIncrBy,expireAt,pexpire, 20 pexpireAt,hGet,hSet,hSetNx,hDel,hLen,hKeys,hVals,hGetAll,hExists, 21 hIncrBy,hIncrByFloat,hMset,hMget,multi,discard,exec,pipeline,watch,unwatch, 22 publish,subscribe,psubscribe,unsubscribe,punsubscribe,time,eval,evalsha,script,dump, 23 restore,migrate,getLastError,clearLastError,_prefix,_serialize,_unserialize,client,scan,hscan, 24 zscan,sscan,getOption,setOption,config,slowlog,getHost,getPort,getDBNum,getTimeout, 25 getReadTimeout,getPersistentID,getAuth,isConnected,wait,pubsub,open,popen,lLen,sGetMembers, 26 mget,expire,zunionstore,zinterstore,zRemove,zRem,zRemoveRangeByScore,zRemRangeByScore,zRemRangeByRank,zSize, 27 substr,rename,del,keys,lrem,ltrim,lindex,lrange,scard,srem, 28 sismember,zrevrange,sendEcho,evaluate,evaluateSha, 29 */ 30 //Operation methods of Redis in PHP 31 $ReRedis = new ReflectionClass(‘Redis’); 32 $arMethods = $ReRedis->getMethods(); 33 $arMethods = objarray_to_array($arMethods); 34 //print_r($arMethods); 35 function objarray_to_array($obj) { 36 $ret = array(); 37 foreach ($obj as $key => $value) { 38 if (gettype($value) == “array” || gettype($value) == “object”){ 39 $ret[$key] = objarray_to_array($value); 40 }else{ 41 $ret[$key] = $value; 42 } 43 } 44 return $ret; 45 } 46 $i = 1; 47 foreach($arMethods as $arVal ) 48 echo $arVal[‘name’],’,’; 49 50 /***************************** Redis Introduction*************************************/ 51 //Redis, a memory cache database, the data model is key-value 52 //Redis is durable, (that is, it saves data from the hard disk) ensuring data security 53 //Redis rich data types: string, list, hash, set, sorted set…
Install some extensions of php under debian geoip, mongo, redis, libevent, proctitl
Because of the project, some new extensions need to be installed. debian xfce 7.2 x64 The following three are all installed through apt-get. PHP 5.4.4-14deb7u5 (cli) nginx1.2.1 apache 2.2.22 1: Installed by the default method (optimal), most of the commonly used ones are in the debian warehouse, you can download them Note, # means root can be passed su – Because of the project, some new extensions need to be installed debian xfce 7.2 x64 The following three are all installed through apt-get. PHP 5.4.4-14+deb7u5 (cli) nginx1.2.1 apache 2.2.22 1: Install by default method (optimal), most of the commonly used ones are in the debian warehouse and can be downloaded to Note, # means root, you can enter root through su – enter the password #apt-get install php5-geoip #apt-get install php-apc #apt-get install libevent-dev 2: Install via pecl (second) #pecl install mongo #pecl install channel://pecl.php.net/libevent-0.1.0 #pecl install channel://pecl.php.net/proctitle-0.1.2 #pecl install inotify #pecl install yaf After pecl is installed, you need to do several things, one is to add the corresponding so file to the corresponding ini, and the second is to link the ini to conf.d For example, the above 3 extensions, after pecl On debian /usr/lib/php5/20100525/mongo.so /usr/lib/php5/20100525/libevent.so /usr/lib/php5/20100525/proctitle.so /usr/lib/php5/20100525/inotify.so…
Linux installation php7.2 extension (swoole, redis)
2017-12-03 1. Install the swoole extension of php 1. Download the extension package ①. One-click download through the pecl command provided by php official: pecl install swoole; (this method has not been tried ) ②, download on github: wget -c https://github.com/swoole/swoole-src/archive/v1.9.8.tar.gz; (mainly introduced installation method) 2. Go to the /usr/local/src directory Command: cd /usr/local/src Execute method ② in step 1, go to / Download the swoole extension package under usr/local/src 3. Unzip the package and save it to another file Decompress: tar xvf v1.9.8.tar.gz Save as: mv v1.9.8.tar.gz swoole-v1.9.8.tar.gz 4. Install php-dev sudo apt install php7.2 -dev After the installation is successful, execute the following command: sudo phpize sudo ./configure sudo make sudo make test sudo make install 5. View all extensions of php ls /usr/lib/php/20170718/ No swoole. so extension file; then use php -m | grep swoole command to find all extensions of php 6. Operation of php directory after installation ls /etc/php/7.2/ sudo make clean cd /etc/php/7.2/ ls sudo find /etc -type f -name &# 8220;php.ini” sudo vi /etc/php/7.2/cli/php.ini (just checked the content inside, and did not do anything) cd /etc/php/7.2/mods-available (come to this directory) sudo cp pdo.ini swoole.ini (rename the pdo.ini file), and edit the swoole.ini file,…