Redis Install

Rob

Active Member
Hopefully someone will find this useful:

Redis Install (Also APF firewall to lock down access when not using redis password) on a server with a public & private IP address with MailWizz hosted on a different server but same internal network/cloud).

Also allows use of www.redsmin.com (These instructions lock down the server to just SSH & Redis, if you need other ports open then you will have to add them to the appropriate places and add your allow/deny rules)

Installed on clean Ubuntu 14.04 64bit

sudo apt-get update
sudo apt-get upgrade

wget http://www.rfxn.com/downloads/apf-current.tar.gz
tar -zxvf apf-current.tar.gz
cd apf-9.7-2

./install.sh

nano /etc/apf/conf.apf

DEVEL_MODE="0"
IFACE_IN="eth0" (You will need to check which is your internet network interface, "ifconfig -a")
IFACE_OUT="eth0"
IFACE_TRUSTED="eth1" (This is your private network interface, adding it here means it is by-passed by the firewall rules and MW can connect without password)
IG_TCP_CPORTS="22" (Set this to the SSH port you use)
EG_TCP_CPORTS="" (Delete all)
IG_UDP_CPORTS="" (Delete all)
DLIST_DSHIELD="1" (Changing the DS to 1 will begin to use DShield.org’s “block” list of top networks that have exhibited suspicious activity)

Start APF:
/usr/local/sbin/apf -s
Other APF Commands:
-r - restart APF
-f - stop APF
-l - list statistics
-st - status of APF
-a host - allow connections from "host"
-d host - deny connections from "host"

Allow Access to www.redsmin.com
/usr/local/sbin/apf -a 62.210.240.77

(START HERE IF INSTALLING ON SAME SERVER AS MW)
sudo apt-get install build-essential
sudo apt-get install tcl8.5
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
cd utils
sudo ./install_server.sh

Commands
redis-cli ping (test it's running)
sudo service redis_6379 start
sudo service redis_6379 stop

Install on your MW application server:

sudo apt-get install php5-redis
service apache2 restart
 
Last edited:
Do we need to configure Redis for MailWizz specifically, like maxmemory or the way it handles keys once filled?
 
Main advantage is that PHP doesn't have to wait for the email to be delivered. It just pushes the email in redis and bails out, doing this hundred times in a second as opposite as a few times if waiting to do the actual delivery.
 
@Rob thanks for updating the post.
Now you need to help me, how can i update my already existing installation of redis 3.0.2 to the latest august release 3.0.3??
And are there some major improvements in it?
Or should i leave my old installation as it is?
 
@Amine : You have to have php's pcntl extension enabled on your server and run the queue command provided by MW.
 
Back
Top