memcached will be put into/usr/local/bin/memcached,
5. Test whether the memcached is installed successfully:# 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/memcached-debug
To start the memcached service :1. Start the server side of the memcache:#/usr/local/bin/memcached-d-M 10-u root-l 192.168.141.64-p 12000-c 256-p/tmp/memcached.pid
The-D opt
-xr-x 1 root root 263546 11?? 17:38 libevent-1.2.so.1.0.3-rw-r-r-1 root root 454156 11?? 17:38 LIBEVENT.A-rwxr-xr-x 1 root root 811 11?? 17:38 libevent.lalrwxrwxrwx 1 root root 21 11?? 17:38 libevent.so-libevent-1.2.so.1.0.3Good, all installed.4. Install the memcached and require the installation location of the specified libevent in the installation:# cd/tmp# tar ZXVF memcached-1.2.0.tar.gz# CD memcached-1.2.0#./CONFIGURE-WITH-LIBEVENT=/USR# make# make InstallIf there is an error in the middle,
Basic questions1, the basic settings of memcached1) Start the server side of the Memcache#/usr/local/bin/memcached-d-M 10-u root-l 192.168.0.200-p 12000-c 256-p/tmp/memcached.pidThe-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,-U is the user running memcache, I am root here,-L is the server IP address of the listener, if there are multiple addresses, I specify the server IP address 192.168.0.20
Memcache, here uses is compiles installs, the version 1.4.15[email protected] memcached-1.4.15]# Yum install-y gcc libevent-devel[[email protected] memcached-1.4.15]#./configure --with-libevent--prefix=/usr/local/memcached [[email protected] memcached-1.4.15]# make make installInstallation complete go to install directory test whether installation is successful[Email protected] memcached-1.4.15]# Cd/usr/local/memcached/bin[[email protected] bin]#./memcached-i memcached1.4.15 Copyright (c) 2003
= ' 95599200901215522 ', cash=12000} account successful, amount is-4000, current amount is 12000Write: Zhang San is operating mycount{oid= ' 95599200901215522 ', cash=12000} account, the amount is 800, the current amount is 12000Write: Zhang San operation mycount{oid= ' 95599200901215522 ', cash=12800} account successful, amount is 800, current amount is 12800Write: Zhang San his brother is operating mycoun
19744 0t0 TCP *:11212 (LISTEN)memcached 14967 root 28u IPv4 19747 0t0 UDP *:11212memcached 14967 root 29u IPv6 19748 0t0 UDP *:11212such as:/usr/local/bin/memcached-d-M 200-u root-l 192.168.1.91-p 12000-c1000-p/tmp/memcached.pidThe relevant explanations are as follows:The-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, 200MB-U is the user running memcache, I am root here-L is the server IP address of the
the server side of the memcache:#/usr/local/bin/memcached-d-M 10-u root-l 192.168.0.200-p 12000-c 256-p/tmp/memcached.pid
The-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,-U is the user running memcache, I am root here,-L is the server IP address of the listener, if there are multiple addresses, I specify the server IP address 192.168.0.200,-P is the port that sets Memcache listening,
Basic questions1, the basic settings of memcached1) Start the server side of the Memcache#/usr/local/bin/memcached-d-M 10-u root-l 192.168.0.200-p 12000-c 256-p/tmp/memcached.pidThe-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,-U is the user running memcache, I am root here,-L is the server IP address of the listener, if there are multiple addresses, I specify the server IP address 192.168.0.20
Basic questions1, the basic settings of memcached1) Start the server side of the Memcache#/usr/local/bin/memcached-d-M 10-u root-l 192.168.0.200-p 12000-c 256-p/tmp/memcached.pidThe-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,-U is the user running memcache, I am root here,-L is the server IP address of the listener, if there are multiple addresses, I specify the server IP address 192.168.0.20
Although it may be a bit late to talk about memcached in this age, most cached applications are on Redis, and here are some of their own ideas,This document does not do memcached theory, only write experimental data and results.Basic parameters: You can refer to the following (where with # # for the parameters should be mastered)-U # # -X # #repcached used to specify the configuration of the master IP:-X -X # #repcached used to specify the configuration of the master PORT:-X Implementation
Memcache, as an excellent out-of-process cache, is often used in high-concurrency system architectures. Here's a look at how to view memcache health and manage maintenance of its key through the Telnet tool. Suppose memcache installation directory:/usr/local/memcached1. Start Memcache [plain] view plaincopy + 192.168. 119.70 12000 -p/usr/local/memcached/memcached.pid Start parameter details-D: Starts as daemon. If this parameter is not specifie
1, directly modify the php.ini configuration file
Copy Code code as follows:
Session.save_handler = memcache//Set session storage mode to Memcache
Memcache.hash_strategy = "consistent"//Set hash algorithm for Memcache
Session.save_path = "tcp://127.0.0.100:11211"//Set the position of the session store, multiple memcache separated by commas, for example: tcp://127.0.0.1:11211,tcp:// 127.0.0.1:12000
2, using the directory of t
root 454156 11?? 17:38 LIBEVENT.A-rwxr-xr-x 1 root root 811 11?? 17:38 libevent.lalrwxrwxrwx 1 root root 21 11?? 17:38 libevent.so-libevent-1.2.so.1.0.3Good, all installed.4. Install the memcached and require the installation location of the specified libevent in the installation:# cd/tmp# tar ZXVF memcached-1.2.0.tar.gz# CD memcached-1.2.0#./CONFIGURE-WITH-LIBEVENT=/USR# make# make InstallIf there is an error in the middle, please carefully check the errors, follow the error message to configu
implementation data storageThe so-called client installation means PHP (or other programs, memcache and other good API interface) to use the server-side memcache provided functions, the need for PHP to add extensions.
The specific configuration You can refer to:Memcache installation under Linux: http://www.ccvita.com/index.php/257.htmlMemcache installation under Windows: http://www.ccvita.com/index.php/258.htmlMemcache Basic Tutorial: http://www.ccvita.com/index.php/259.html
php Memcache //
follows:
5.1 I have used, the workable command
Memcached-d-M 128-l localhost-p 11211-u root (where localhost refers to the port on which this machine is being monitored.)
5.2 Online A lot but I use but failed command
/usr/local/bin/memcached-d-M 10-u root-l localhost-p 12000-c 256-p/tmp/memcached.pid
6. Give the memcached Start command parameters detailed.
The-D option is to start a daemon,
-M is the amount of memory allocated to Memcache, in megaby
implementation data storageThe so-called client installation means PHP (or other programs, memcache and other good API interface) to use the server-side memcache provided functions, the need for PHP to add extensions.
The specific configuration You can refer to:Memcache installation under Linux: http://www.ccvita.com/257.htmlMemcache installation under Windows: http://www.ccvita.com/258.htmlMemcache Basic Tutorial: http://www.ccvita.com/259.htmldiscuz! memcache Cache implementation: http://www.
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
-rwxr-xr-x 1 root root 140179 11?? 17:39/usr/local/bin/memcached-debug
Start the Memcache service
Start the memcached service:
1. Start the Memcache server side:
#/usr/local/bin/memcached-d-M 8096-u root-l 192.168.77.105-p 12000-c 256-p/tmp/memcached.pid
The-D option is to start a daemon,
-M is the amount of memory a
now ready to use.
Run on service side:#./memcached-d-M 2048-l 10.0.0.40-p 11211This will start a process that consumes 2G of memory and open port 11211 to receive requests. Because 32-bit systems can handle only 4G of memory addressing, 2-3 processes can be run on 32-bit servers that use PAE greater than 4G memory and are monitored on different ports.
Another example: memcached-d-M 10-u root-l 192.168.105.73-p 12000-c 256-p
The-D option is to star
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.