Bootstrap: Apache and PHP configuration. Some refactoring.
This commit is contained in:
parent
0c43431131
commit
9d58ce5572
@ -12,25 +12,21 @@ Run `./bootstrap.sh` (or separate scripts in this folder) and make you some coff
|
||||
|
||||
## Scripts
|
||||
|
||||
### brew
|
||||
### stuff
|
||||
|
||||
Installs Homebrew with some formulaes (Git, MySQL, Node.js, etc.).
|
||||
|
||||
### npm
|
||||
|
||||
Installs some NPM modules (JSHint, Grunt, etc.). Depends on `brew`.
|
||||
Installs Homebrew, Git, [git-extras](https://github.com/visionmedia/git-extras), [git-friendly](https://github.com/jamiew/git-friendly), Node.js, JSHint, Grunt, configures Apache, PHP, MySQL, etc.
|
||||
|
||||
### bash
|
||||
|
||||
Installs Bash 4 and registers it as a default shell. Depends on `brew`.
|
||||
Installs Bash 4 and registers it as a default shell. Needs Homebrew.
|
||||
|
||||
### consolas
|
||||
|
||||
Installs Consolas font. Depends on `brew`.
|
||||
Installs Consolas font. Needs Homebrew.
|
||||
|
||||
### imgo
|
||||
|
||||
Installs [imgo](https://github.com/imgo/imgo) CLI image optimizer. Depends on `brew`.
|
||||
Installs [imgo](https://github.com/imgo/imgo) CLI image optimizer. Needs Homebrew.
|
||||
|
||||
### osx
|
||||
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
# New Mac bootstrap
|
||||
|
||||
. brew.sh
|
||||
. npm.sh
|
||||
. stuff.sh
|
||||
. bash.sh
|
||||
. consolas.sh
|
||||
. imgo.sh
|
||||
|
10
setup/npm.sh
10
setup/npm.sh
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Installs Node.js and some NPM packages
|
||||
|
||||
|
||||
brew install node
|
||||
|
||||
npm install -g grunt
|
||||
npm install -g jshint
|
||||
npm install -g bower
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Installs Homebrew with some formulaes
|
||||
# Installs Homebrew, Git, git-extras, git-friendly, Node.js, configures Apache, PHP, MySQL, etc.
|
||||
|
||||
|
||||
# Setup Homebrew
|
||||
# Install Homebrew
|
||||
command -v brew >/dev/null 2>&1 || ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
|
||||
|
||||
# Make sure we’re using the latest Homebrew
|
||||
@ -32,9 +32,28 @@ unset TMPDIR
|
||||
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
|
||||
/usr/local/opt/mysql/bin/mysqladmin -u root password 'root'
|
||||
|
||||
# Apache: enable PHP, .htaccess files, virtual hosts and set it to run as current user
|
||||
cd /etc/apache2
|
||||
sudo cp httpd.conf httpd.conf.bak
|
||||
sudo cp extra/httpd-vhosts.conf extra/httpd-vhosts.conf.bak
|
||||
sudo sed -i '' "s^#\(LoadModule php5_module\)^\1^" httpd.conf
|
||||
sudo sed -i '' "s^#\(Include /private/etc/apache2/extra/httpd-vhosts.conf\)^\1^" httpd.conf
|
||||
sudo sed -i '' "s^<IfDefine WEBSHARING_ON>^<IfDefine !0>^" httpd.conf
|
||||
sudo sed -i '' "s^User _www^User `whoami`^" httpd.conf
|
||||
sudo sed -i '' "s^Group _www^Group staff^" httpd.conf
|
||||
echo -e "NameVirtualHost *:80\n\n<Directory />\n AllowOverride All\n Allow from all\n</Directory>\n" | sudo tee extra/httpd-vhosts.conf
|
||||
cd -
|
||||
|
||||
# Everything else
|
||||
brew install unrar
|
||||
brew install node
|
||||
|
||||
# Remove outdated versions from the cellar
|
||||
brew cleanup
|
||||
|
||||
# Node.js
|
||||
brew install node
|
||||
|
||||
npm install -g grunt
|
||||
npm install -g jshint
|
||||
npm install -g bower
|
Loading…
Reference in New Issue
Block a user