-
-
Save oleksandr-diudiun/38a7208acd7a6f99101d to your computer and use it in GitHub Desktop.
OSX install apache, php, mysql, postgres, node, npm, brew guide. Full OSX workstation (settings) for frontend developer
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
# - Start to Install xCode (download 4 Gb) | |
# - Setup languages | |
# - max key repeat speed | |
# - Short delay before repeat | |
# - enable Show symbols in menu bar | |
# - disable correct spelling | |
# - Shortcuts | |
# - Other items in settings | |
# - Run xCode | |
# - Setup time machine | |
# - Install homebrew and all from brew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
# Command line tools | |
xcode-select --install | |
# Install sublime text 3 from official site | |
# subl in console | |
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl | |
# - Install fresh git | |
brew install git | |
brew install bash-completion | |
# Install cask - tool for installing visual applications | |
brew install caskroom/cask/brew-cask | |
# Quick look for php xip json and etc by "space" | |
brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzipql webp-quicklook suspicious-package | |
# Run this in your terminal to allow text selection in the Quick Look window: | |
defaults write com.apple.finder QLEnableTextSelection -bool true && killall Finder | |
brew cask install google-chrome skype dropbox google-drive filezilla transmission sequel-pro sizzlingkeys sourcetree teamviewer | |
#Node with modules | |
brew install node | |
npm i -g trash | |
# mysql | |
brew install mysql | |
sudo cp $(brew --prefix mysql)/support-files/my-default.cnf /etc/my.cnf | |
# autotun MySQL and run now | |
mkdir -p ~/Library/LaunchAgents | |
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
#check it | |
brew services stop mysql | |
brew services start mysql | |
# set mysql password | |
mysql -u root | |
# mysql> use mysql; | |
# mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root'; | |
# mysql> flush privileges; | |
# mysql> quit | |
# PostgreSQL | |
# If it not alredy installed | |
brew install postgres --no-ossp-uuid | |
brew pin postgres | |
initdb /usr/local/var/postgres -E utf8 | |
createdb `whoami` | |
# For alredy installed PostgreSQL | |
# start server | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
pg_ctl -D /usr/local/var/postgres status | |
sudo -u user_name psql db_name | |
# > alter user user_name with password 'new_password'; | |
# PHP | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew options php56 | |
brew install php56 --with-apache --with-libmysql --with-postgresql | |
# imagemagick graphic library | |
brew install imagemagick | |
brew install homebrew/php/php56-imagick | |
# mod_rewrite | |
subl /etc/apache2/httpd.conf | |
# Check: | |
# LoadModule rewrite_module libexec/apache2/mod_rewrite.so | |
# DocumentRoot "/Users/max/Work/Projects" | |
# AllowOverride All | |
# LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so | |
# Check display_errors, error_reporting etc. | |
subl /usr/local/etc/php/5.6/php.ini | |
# start apache with system | |
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist | |
# ssh | |
ssh-keygen | |
cat ~/.ssh/id_rsa.pub | pbcopy | |
# Set git config values | |
git config --global user.name "Kevin Elliott" | |
git config --global user.email "[email protected]" | |
# bash themes and plugins | |
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it | |
~/.bash_it/install.sh | |
# Select theme "sexy" | |
# Setup terminal fonts and colors | |
brew install fasd | |
bash-it show plugins | |
bash-it enable plugin git | |
bash-it enable plugin node | |
bash-it enable plugin fasd | |
bash-it show completions | |
bash-it enable completion todo | |
bash-it enable completion npm | |
bash-it enable completion git | |
bash-it enable completion brew | |
# REDIS | |
brew install redis | |
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist | |
brew install php56-redis | |
sudo httpd -k restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment