1. Giới thiệu
Memcache có cấu trúc tương tự một từ điển gồm key và value, key là khóa còn value chính là đối dữ liệu đối tượng lưu trữ.
2. Cài đặt
- Cần cài đặt thư viện libevent cho việc cài đặt memcached:
yum install libevent -y
- Download memcached source từ http://memcached.org/ . Tại thời điểm hiện tại v.1.4.15 là phiên bản mới nhất của memcached.
wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz
- Giải nén và build
tar -xvf memcached-1.4.15.tar.gz
cd memcached-1.4.15/
./configure
make
make install
Mặc định sau khi build xong memcached sẽ được cài vào thư mục /usr/local/bin , /usr/local/include.
3. Vận hành
Memcached chạy mặc định tại cổng 11211, bạn cũng có thể chạy tại cổng khác khi bắt đầu chạy memcached. Ở đây, tôi sẽ cho khởi động memcached tại port 11200 với user nobody, cấp 64MB RAM, chạy với chế độ daemon và xuất log ra file /var/log/memcached.log
memcached -l 0.0.0.0 -p 11211 -m 64M -d -u nobody -vv > /var/log/memcached.log 2>&1
Kiểm tra:
netstat -tulpn | grep memcached
Nếu kết quả ra
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 31042/memcached
udp 0 0 0.0.0.0:11211 0.0.0.0:* 31042/memcached
là OK.
--End--
30/7/13
Bài viết liên quan
How to install CSF Firewall on Linux server?Ưu điểm tích hợp với cpanel và directadmin ,webmin :Installation============Installation is quite s
How to install or Uninstall APF (Advance Policy Firewall) on CentOS / Ubuntu / BackTrack or any Linux distroAPF Advance Policy firewall that provides you an easy way to configure iptables rules. Th
SSH commandsshd reads configuration data from /etc/ssh/sshd_config (or the file specified with&
50 câu lệnh Linux phải nhớclear: làm sạch cửa sổ dòng lệnhls tenthumuc: Liệt kê nội dung bên trong m
[Ubuntu] How to reset your password in UbuntuThere are many reasons you might want to reset a password:Someone gave you a computer with Ubuntu i
How to disable core dumps on Linux ServersCore dump is a memory or a storage dump which records the memory state of a computer program at spe
Đăng ký:
Đăng Nhận xét (Atom)
0 comments:
Đăng nhận xét