1

Topic: Installing memcached

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, I am wondering the process of installing memcached on the Iredmail server. I am receiving some error entries in the logs and in the crontab that I receive daily. How do I implement it to function correctly as a Sogo cache?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Installing memcached

memcached should be installed by iRedMail installer as a dependence of SOGo. Not sure why your server doesn't have it.

There's no trick to install and run memcached, just install the package then start it. You may want to tune its config file to listen on 127.0.0.1 (instead of 0.0.0.0), also increase the cache memory size. That's all.

Then update /etc/sogo/sogo.conf to enable it (Search "SOGoMemcachedHost").

3 (edited by ramonalonso 2020-03-08 12:50:41)

Re: Installing memcached

Hello @ZhangHuangbin! Thanks

I tried to install but it is showing an error:

root@srv-mx1:/var/log# systemctl status memcached.service
● memcached.service - memcached daemon
   Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-03-08 04:36:00 UTC; 12s ago
  Process: 32082 ExecStart=/usr/share/memcached/scripts/systemd-memcached-wrapper /etc/memcached.conf (code=exited, status=64)
Main PID: 32082 (code=exited, status=64)

Mar 08 04:36:00 srv-mx1.xxx.com.br systemd[1]: Started memcached daemon.
Mar 08 04:36:00 srv-mx1.xxx.com.br systemd-memcached-wrapper[32082]: can't run as root without the -u switch
Mar 08 04:36:00 srv-mx1.xxx.com.br systemd[1]: memcached.service: Main process exited, code=exited, status=64/n/a
Mar 08 04:36:00 srv-mx1.xxx.com.br systemd[1]: memcached.service: Unit entered failed state.
Mar 08 04:36:00 srv-mx1.xxx.com.br systemd[1]: memcached.service: Failed with result 'exit-code'.

4 (edited by ramonalonso 2020-03-08 12:51:13)

Re: Installing memcached

Hello!

I found the problem. The parameter that was in /etc/memcached.conf was incorrect. I had to remove the text and replace it with:

-u memcache

that I found in another post.

In case it is of interest to someone the command I used to install was:

apt-get install memcached libmemcached-tools -y

Followed by:

systemctl start memcached
systemctl enable memcached

Thanks! smile