Created
June 16, 2015 17:05
-
-
Save drogers98/0195d49089befe0fcba1 to your computer and use it in GitHub Desktop.
EnvironmentSetup
This file contains hidden or 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
PREREQUISITES | |
============= | |
Install homebrew (if not already installed) | |
In terminal: | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
Note: May prompt to install xcode command line tools. If so, install them | |
Create a Sites folder in your home directory (if you don’t already have one) | |
In terminal: | |
sudo mkdir ~/Sites | |
Add a configuration folder (for your virtual hosts file) | |
In terminal: | |
sudo mkdir ~/Sites/_conf | |
MYSQL (M) | |
========= | |
Install mysql | |
In terminal: | |
brew install mysql | |
Specify that mysql launches at login (when you restart your machine etc.) | |
In terminal: | |
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents | |
Install system tables | |
In terminal: | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
Start mySQL | |
In terminal: | |
mysql.server start | |
Run secure installation | |
In terminal: | |
mysql_secure_installation | |
Follow the onscreen prompts by choosing Y (Yes) for each question | |
APACHE (A) | |
========= | |
Apache configuration | |
In terminal: | |
sudo vim /etc/apache2/httpd.conf | |
Uncomment the following lines: | |
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so | |
LoadModule userdir_module libexec/apache2/mod_userdir.so | |
LoadModule rewrite_module libexec/apache2/mod_rewrite.so | |
LoadModule php5_module libexec/apache2/libphp5.so | |
Include /private/etc/apache2/extra/httpd-userdir.conf | |
Uncomment user conf | |
In terminal: | |
sudo vim /private/etc/apache2/extra/httpd-userdir.conf | |
Uncomment the following: | |
Include /private/etc/apache2/users/*.conf | |
Create config file for user | |
In terminal: | |
cd /private/etc/apache2/users/ | |
cp Guest.conf <insert-your-username-here>.conf | |
Edit config file | |
In terminal: | |
sudo vim /private/etc/apache2/users/<insert-your-username-here>.conf | |
Add the following: | |
<Directory "/Users/<insert-your-username-here>/Sites/"> | |
Options Indexes MultiViews | |
AllowOverride all | |
Require all granted | |
</Directory> | |
Include /Users/<insert-your-username-here>/Sites/_conf/httpd-vhosts.conf | |
PHP (P) | |
====== | |
Install 5.5 | |
In terminal: | |
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 | |
Add APC support for Drupal | |
In terminal: | |
sudo vim /usr/local/php5/php.d/99-liip-developer.ini | |
Add the following to the bottom of the file: | |
apc.rfc1867 = 1 | |
RESTART APACHE | |
In terminal: | |
sudo apachectl graceful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment