1, first install Memcached: 1sudoapt-getinstallmemcached2 $ memcached-d-m50-p11211-uroot parameter description-m specifies how many megabytes of cache space to use;-p specifies the port to listen; -u specifies the user to run and install the php module (this step can be omitted if it is only installed in django) 2. Install python-memcached
1. First install Memcached:
1 sudo apt-get install memcached
2 $ memcached-d-m 50-p 11211-u root
Parameter description-m specifies the MB of cache space used;-p specifies the port to be listened on;-u specifies the user to run
Install the php module (by the way, this step can be omitted if it is only used in django)
2. Install python-memcached
Download python-memcached-latest.tar.gz
Tar zxvf python-memcached-latest.tar.gz
Cd python-memcached-latest
Sudo python setup. py install
Note: Install Setuptools
Download ez_setup.py
Sudo python ez_setup.py
3. Change CACHE_BACKEND in settings. py of the Django project:
1 CACHE_BACKEND = 'memcached: // 127.0.0.1: 11211 /'
Install stress testing tools
Webbench is a website stress testing tool in Linux. It can simulate up to 30 thousand concurrent connections to test the load capacity of the website. Webbench-1.5.tar.gz is here.
This program is very small. It will be less than 50 kb after decompression.
Easy to install
# Tar zxvf webbench-1.5.tar.gz
# Cd webbench-1.5
# Sudo make & make install
The webbench executable file is generated in the current directory and can be used directly.
Usage:
Webbench-c concurrency-t run test time URL
For example:
Webbench-c 5000-t 120 http://www.linuxidc.com
Note: install ctags sudo apt-get install ctags to compile webshells