CentOS8.3にmemcachedをインストールする方法

操作方法
# cat /etc/redhat-release
CentOS Linux release 8.3.2011

1.libmemcachedをインストール
# dnf install memcached libmemcached

2.バージョンを確認
# rpm -qi memcached
Name : memcached
Epoch : 0
Version : 1.5.22
Release : 2.el8
Architecture: x86_64
Install Date: 2021年04月11日 22時27分20秒
Group : System Environment/Daemons
Size : 414767
License : BSD
Signature : RSA/SHA256, 2020年06月18日 02時57分20秒, Key ID 05b555b38483c65d
Source RPM : memcached-1.5.22-2.el8.src.rpm
Build Date : 2020年06月18日 02時19分21秒
Build Host : x86-02.mbox.centos.org
Relocations : (not relocatable)
Packager : CentOS Buildsys <bugs@centos.org>
Vendor : CentOS
URL : https://www.memcached.org/
Summary : High Performance, Distributed Memory Object Cache

3.設定ファイルを確認
# cat /etc/sysconfig/memcached
PORT="11211″
USER="memcached"
MAXCONN="1024″
CACHESIZE="64″
OPTIONS="-l 127.0.0.1,::1″

4.ファイアウォール設定
# firewall-cmd –add-port=11211/tcp –zone=public –permanent
success
# firewall-cmd –reload
success

5.自動起動を有効
# systemctl start memcached
# systemctl enable memcached
Created symlink /etc/systemd/system/multi-user.target.wants/memcached.service → /usr/lib/systemd/system/memcached.service.
# systemctl status memcached
● memcached.service – memcached daemon
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-04-11 22:33:16 JST; 7min ago

6.php-pecl-memcacheモジュールをインストール
# dnf install php-pecl-memcache

インストール済み:
php-pecl-memcache-4.0.5.2-1.el8.remi.7.4.x86_64

CentOS

Posted by arkgame