Skip to content

Instantly share code, notes, and snippets.

@kevyworks
Forked from Caffe1neAdd1ct/mailhog-install.sh
Created September 19, 2022 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevyworks/08161aa36ad71734d1f1d71f4ecc8b05 to your computer and use it in GitHub Desktop.
Save kevyworks/08161aa36ad71734d1f1d71f4ecc8b05 to your computer and use it in GitHub Desktop.
Installation of MailHog on CentOS 7
## Install packages
sudo yum install wget curl vim epel-release
sudo yum install daemonize.x86_64
## Install mailhog
wget https://github.com/mailhog/MailHog/releases/download/v0.2.0/MailHog_linux_amd64
sudo chmod +x MailHog_linux_amd64
sudo chown root:root MailHog_linux_amd64
sudo mv MailHog_linux_amd64 /usr/sbin/mailhog
## Install mailhog initd service
wget https://raw.githubusercontent.com/geerlingguy/ansible-role-mailhog/master/templates/mailhog.init.j2
sudo chown root:root mailhog.init.j2
sudo chmod +x mailhog.init.j2
sudo mv mailhog.init.j2 /etc/init.d/mailhog
### Fix the paths in the mailhog init.d file
sudo vim /etc/init.d/mailhog
## Start mailhog
sudo chkconfig mailhog on
sudo service mailhog start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment