• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved installing memcached or apcu

Remigio

Basic Pleskian
I've follow this useful post:
How to install APCu module on Plesk server?
and also this:
How to install/uninstall memcached or memcache extension for PHP on Plesk server?
but after the instalaltion I've:
...
config.status: creating config.h
config.status: executing libtool commands
running: make
sh: 1: make: not found
ERROR: `make' failed

and for apcu instalaltion, after this commend /opt/plesk/php/7.0/bin/php -i | grep apc.enabled
I've==>
/opt/plesk/php/7.0/bin/php -i | grep apc.enabled
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/7.0/lib/php/modules/memcached.so' - /opt/plesk/php/7.0/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0

my system is debian Linux #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13) x86_64
 
sorry, but when I try to add mecached server into my prestashop cache configuration (ip:127.0.0.1 port:11211 weight:1) prestashop reply red dot, so doesn't work.
Why? port 11211 blocked? how can i test if really memcached works well?
 
* Check if your memcached server is running:
Code:
# systemctl status memcached.service

* Check if you can connect to your memcached server:
Code:
# telnet 127.0.0.1 11211

Please note: There are two components in a memcached setup: The memcached client (in this case PHP, using the PECL package) and the memcached server (where the client is connecting to to store the data in the cache). So in case you haven't installed the server then you should do an apt install memcached
 
You're lacking the memcached server.

Do the following:
apt install telnet memcached
systemctl enable memcached
systemctl start memcached

And you should be fine ;)
 
You're lacking the memcached server.

Do the following:
apt install telnet memcached
systemctl enable memcached
systemctl start memcached

And you should be fine ;)
you're simply great!!!!
systemctl status memcached.service
● memcached.service - memcached daemon
Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset
: enabled)
Active: active (running) since Thu 2018-08-23 20:25:00 CEST; 2min
35s ago
Docs: man:memcached(1)
Main PID: 4094 (memcached)
CGroup: /system.slice/memcached.service
└─4094 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1

Aug 23 20:25:00 100asa.it systemd[1]: Started memcached daemon.
 
it's normal when active memcached into prestashop backoffice, included the server data 127.0.0.1 11211 1, all my scripts ruiing slow, but very very slow... to build a feed file of about 11 mega get about 45 mins (normally without memcached create feed in about 6mins)
Also I've try to move my prestashop to nginx pure (php served by nginx) but I'm not very well to use prestashop with rewrite rule (please see Question - prestashop + nginx)
 
That's normal, memcached does not output anything when you connect.
To verify that it works:
# telnet 127.0.0.1
stats

Then you should see some output.

Also see: memcached Cheat Sheet
 
root@100asa:~# telnet 127.0.0.1
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
root@100asa:~#
root@100asa:~# telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
stats
STAT pid 675
STAT uptime 18833
STAT time 1535560644
STAT version 1.4.33
STAT libevent 2.0.21-stable
STAT pointer_size 64
STAT rusage_user 1.352000
STAT rusage_system 1.888000
STAT curr_connections 1
STAT total_connections 6
STAT connection_structures 2
STAT reserved_fds 20
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 0
STAT get_misses 0
STAT get_expired 0
STAT get_flushed 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 37
STAT bytes_written 32
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT time_in_listen_disabled_us 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT malloc_fails 0
STAT log_worker_dropped 0
STAT log_worker_written 0
STAT log_watcher_skipped 0
STAT log_watcher_sent 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT evictions 0
STAT reclaimed 0
STAT crawler_reclaimed 0
STAT crawler_items_checked 0
STAT lrutail_reflocked 0
END



and what do you think about my issue about prestashop doesn't seem connect with memcached server?
 
I don't know your prestashop configuration. Usually you only need to specifiy a hostname (127.0.0.1) and a port (11211) to make it work. But I don't have a prestashop around that I could do tests with.
 
I wouldn't install memcached, it has some weaknesses that can lead to hacking of your server..

Sent from my ALP-L09 using Tapatalk
 
I wouldn't install memcached, it has some weaknesses that can lead to hacking of your server..

Not necessarily true. Only if memcached listens on 0.0.0.0 instead of 127.0.0.1 and if you didn't configure your firewall.
But honestly, every sane sysadmin will always block all ports except for those really needed (80, 443 et al).

Default memcached config for CentOS is to listen on 127.0.0.1 and I think it's the same for Debian.
 
Back
Top