Last active
December 12, 2015 06:58
-
-
Save yurivictor/4732580 to your computer and use it in GitHub Desktop.
Washington Post Mac OS 10.8 WordPress set up: nginx, mysql, php
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
# Requires: xcode, xcode command line tools | |
# Need to do: | |
# nginx.conf | |
# php-fpm plist | |
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# Install requirements | |
brew install libjpeg mcrypt git | |
# Install nginx | |
# Need to create a default conf, but in the mean time: | |
# http://codex.wordpress.org/Nginx#WordPress_Multisite_Subdirectory_rules | |
brew install nginx | |
ln -s /usr/local/Cellar/nginx/1.2.6/html /usr/share/html | |
# Install mysql | |
brew install mysql | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --tmpdir=/tmp | |
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock | |
# Install php | |
brew install php --without-apache --with-intl --with-fpm --with-mysql | |
# Install memcache | |
brew install libevent | |
brew install memcached | |
brew install libmemcached | |
sudo pecl install memcache | |
echo 'You should add "extension=memcache.so" to php.ini' | |
# Download wordpress and git repo | |
cd /usr/share/html | |
mkdir -p blogs && cd blogs/ | |
curl -O http://wordpress.org/latest.zip | |
tar zxvf latest.zip | |
mv wordpress/* ../ | |
rm -rf wordpress/ wp-content/ | |
git clone https://github.com/WPMedia/Wordpress-Blogs.git wp-content | |
# Load and unload | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist | |
cp /usr/local/Cellar/mysql/5.5.29/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
cp /usr/local/nginx/1.2.6/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist | |
# Set up | |
/usr/local/Cellar/mysql/5.5.29/bin/mysql_secure_installation | |
subl /usr/local/etc/nginx/nginx.conf | |
subl /usr/local/share/blogs/wp-config-sample.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment