-
-
Save bogdanRada/4f059794899f1ea04956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
# Install Basics | |
# build-essential needed for "make" command | |
sudo apt-get install -y build-essential software-properties-common \ | |
vim curl wget tmux | |
# Install PHP 5.6 | |
sudo add-apt-repository -y ppa:ondrej/php5-5.6 | |
sudo apt-get update | |
sudo apt-get install -y php5 php5-fpm php5-mcrypt php5-curl | |
# Install Mailcatcher Dependencies (sqlite, ruby) | |
sudo apt-get install -y libsqlite3-dev ruby1.9.1-dev | |
# Install the gem | |
gem install mailcatcher | |
# Make it start on boot | |
echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab | |
update-rc.d cron defaults | |
# Make php use it to send mail | |
echo "sendmail_path = /usr/bin/env $(which catchmail) -f [email protected]" | sudo tee /etc/php5/mods-available/mailcatcher.ini | |
# Notify php mod manager (5.5+) | |
sudo php5enmod mailcatcher | |
#restart apache | |
sudo service apache2 restart | |
# Restart PHP-FPM if using FPM | |
sudo service php5-fpm restart | |
# Start it now | |
/usr/bin/env $(which mailcatcher) --ip=0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment