/magent /usr/bin ##方便系统识别命令5. Start the memcached servicememcached -m 512k -u root -d -l 192.168.100.130 -p 11211memcached -m 512k -u root -d -l 192.168.100.131 -p 11211netstat -ntap |grep 11211有11211端口表示服务开启成功6.client Client test magent Solve single point of failure problem (1) Start the Magent service on memcached 1 onlymagent -u root -n 51200 -l 192.168.100.130 -p 12000 -s 192.168.100.130:11211 -b 192.168.100.131:11211(2) test on the client hos
First step: Enter the client shell[Email protected]:~$sqoop.sh ClientSqoop Home directory:/home/fulong/sqoop/sqoop-1.99.3-bin-hadoop200sqoop shell:type ' help ' or ' \h ' for help.Sqoop:000>Set server--host FBI003--port 12000--webapp sqoopServer is set successfullysqoop:000>Show version--allClient Version:sqoop 1.99.3 revision 2404393160301df16a94716a3034e31b03e27b0b Compiled by Mengweid on Fri Oct 18 14:15: 2013server version:sqoop 1.99.3 revision 24
/keepalived.conf.////Copy the profile of the master server to the From and modify it accordingly5. Making a master Tracking scriptMkdir/opt/shellCd/opt/shellVI magent.sh#!/bin/bashk=ps -ef | grep keepalived | grep -v grep | wc -lIf [$K-gt 0]; ThenMagent-u root-n 51200-l 192.168.80.188-p 12000-s 192.168.80.81:11211-b 192.168.80.82:11211ElsePkill-9 magentFi-N 51200//define user maximum number of connections-L 192.168.80.188//Specify virtual IP-P
,主备不同 priority 100 //优先级,备低于从 advert_int 1 authentication { auth_type PASS auth_pass 1111 }track_script { //调用上方定义好的magent magent} virtual_ipaddress { //指明VIP 192.168.10.200 }For convenience, you can use the following command to copy the keepalived configuration file that has been modified by the primary cache node for a little change.#备缓存节点上执行cd /etc/keepalivedmv keepalived.conf keepalived.conf.bak //重命名keepalive
It is good to use memcache to synchronize sessions. Of course, you can also use redis to save sessions. You can enable PHP and store sessions to redis cache, the following describes how to use memcache to synchronize sessions in a Web Cluster:
1. simulate a Web Cluster
I started two memcached processes, simulating two servers respectively.
/Usr/local/bin/memcached-D-M 20-u zhangy-P 12000-P./memcached. PID/Usr/local/bin/memcached-D-M 20-u zhangy-P 1300
#./configure–with-libevent=/usr# make# Make install if there is an error in the middle, please carefully check the errors and configure or add the appropriate libraries or paths according to the error message. When the installation is complete, the memcached will be put into/usr/local/bin/memcached, 5. Test for successful installation memcached:# Ls-al/usr/local/bin/mem*-rwxr-xr-x 1 root root 137986 11?? 17:39/usr/local/bin/memcached-rwxr-xr-x 1 root root 140179 11?? 17:39/usr/local/bin/memcache
deleted based on the LRU (Least recently used) algorithm. The memcached itself is a server designed for caching, so there is not too much consideration for permanent data issues.Installing memcachedwget http://memcached.org/latestmemcached-1.5.7. Tar.gztar zxf memcached-1.5.7. tar.gzcd memcached-1.5.7. /configure make make test make installInstalling the memcached Python clientPip Install python-memcachedStart memcachedMemcached-d-M 10-u root-l 127.0.0.1-p
the error message.
When the installation is complete, the memcached will be placed in the/usr/local/bin/memcached,
5. Test for successful installation of memcached:
# ls-al/usr/local/bin/mem*
-rwxr-xr-x 1 root root 137986 11?? 17:39/usr/local/bin/memcached
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/
-rwxr-xr-x 1 root root 140179 11?? 17:39/usr/local/bin/memcached-debug
Start the memcached service:
1. Start the Memcache server side:
#/usr/local/bi
contained in the Schemas attribute.
WriteContentTo saves all the child levels of the XmlDocument node to the specified XmlWriter. (Rewrite XmlNode ..:. WriteContentTo (XmlWriter ).)
WriteTo saves the XmlDocument node to the specified XmlWriter. (Rewrite XmlNode ..:. WriteTo (XmlWriter ).)
Iii. Events
NodeChanged occurs when the Value of the node that belongs to this document has been changed.
NodeChanging occurs when the Value of the node that belongs to this document is changed.
NodeInserted o
Use Python to operate MemcachedMemcached
Memcached is a high-performance distributed memory object Cache System for dynamic Web applications to reduce database load. It caches data and objects in the memory to reduce the number of reads to the database, thus improving the speed of dynamic and data library-driven websites. Memcached is based on a hashmap that stores key/value pairs. Its daemon is written in C, but the client can write it in any language and communicate with the daemon through mem
is cached to Nginx from the server when there is client access to Nginx. However, after the broadcast, all the client loading file is simultaneous, if an access request arrives and makes Nginx cache, the other client receives the post-broadcast load response, I am afraid it has already started and is nearing the end. The load pressure still falls on the server. What do we do?Solution Overview:When a client uploads file to the server, writes the file content to the Nginx cache, and then broadcas
First, memcached1.1. Installation
Cd/usr/local/srcwget http://memcached.org/latestTAR-ZXVF memcached-1.x.x.tar.gzCD memcached-1.x.x./configure make make test make install
1.2. Install the Client
Pip Install python-memcached
1.3. Start Memcache
Memcached-d-M 10-u root-l 127.0.0.1-p 12000-c 256-p/export/servers/memcache/logs/memcache.pid
-P Specify port number (default 11211)
-m specifies the maximum amoun
/shell Creating a DirectoryCd/opt/shellVI magent.sh
The script reads as follows:
#!/bin/bash
k=
ps -ef | grep keepalived | grep -v grep | wc -l
If [$K-gt 0]; Then
Magent-u root-n 51200-l 192.168.80.188-p 12000-s 192.168.80.181:11211-b 192.168.80.182:11211
Else
Pkill-9 magent
Fi parameter annotations:
-N 51200//define user maximum number of connections
-L 192.168.80.188//Specify virtual IP
-P 12000//Specify
minimum value. A single row function processes each row separately, and each row returns a result. Gyj @ OCM> select id, sum (salary) from t1; select id, sum (salary) from t1 * ERROR at line 1: ORA-00937: not a single-group function www.2cto.com is easy to understand. The id (number) column has 10 rows of data, while SUM (salary) has only one row of results. Oracle cannot combine these two columns with one row and one row. A column can be used in combination with a single row function, because
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.