Last active
August 29, 2015 14:03
-
-
Save bbcallen/070eb9cf14b28a1da15c 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
#==================== | |
# based on: | |
# http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/ | |
#==================== | |
# xcode command line tool | |
xcode-select --install | |
#==================== | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
# check homebrew | |
brew doctor | |
brew update | |
brew upgrade | |
# tap homebrew | |
brew tap homebrew/dupes | |
brew tap homebrew/homebrew-php | |
#==================== | |
# php55: install | |
brew install --without-apache --with-fpm --with-mysql php55 | |
# echo 'export PATH="$(brew --prefix josegonzalez/php/php55)/bin:$PATH"' >> ~/.profile | |
# php55: autostart | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/php55/5.5.14/homebrew-php.josegonzalez.php55.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist | |
lsof -Pni4 | grep LISTEN | grep php | |
#==================== | |
# mysql: install | |
brew install mysql | |
# mysql: autostart | |
cp /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
# mysql: secure installation | |
mysql_secure_installation | |
#==================== | |
# phpMyAdmin: install | |
brew install autoconf | |
echo 'PHP_AUTOCONF="'$(which autoconf)'"' >> ~/.profile | |
brew install phpmyadmin | |
#==================== | |
# nginx: install | |
brew install nginx | |
# nginx: autostart | |
sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/ | |
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | |
launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | |
curl -IL http://localhost:8080 | |
# ngin: config | |
mkdir -p /usr/local/etc/nginx/logs | |
mkdir -p /usr/local/etc/nginx/sites-available | |
mkdir -p /usr/local/etc/nginx/sites-enabled | |
mkdir -p /usr/local/etc/nginx/conf.d | |
mkdir -p /usr/local/etc/nginx/ssl | |
sudo mkdir -p /var/www | |
sudo chown :staff /var/www | |
sudo chmod 775 /var/www | |
rm /usr/local/etc/nginx/nginx.conf | |
curl -L https://gist.github.com/bbcallen/9020ea94e04c3bce520a/raw/nginx.conf -o /usr/local/etc/nginx/nginx.conf | |
curl -L https://gist.github.com/bbcallen/4d61847a40533f1dad1f/raw/php-fpm -o /usr/local/etc/nginx/conf.d/php-fpm | |
curl -L https://gist.github.com/bbcallen/796d4c24f906ba41e9a0/raw/sites-available_default -o /usr/local/etc/nginx/sites-available/default | |
curl -L https://gist.github.com/bbcallen/0aee144b3fbc80f4e080/raw/sites-available_default-ssl -o /usr/local/etc/nginx/sites-available/default-ssl | |
curl -L https://gist.github.com/bbcallen/5bd9ddb4f97412291c35/raw/sites-available_phpmyadmin -o /usr/local/etc/nginx/sites-available/phpmyadmin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment