My previous post How I setup my Mac for development will work just fine with older macOS.
But now that it's Catalina,
bash has been changed to
zsh and I want to note my setup and other findings here.
Most of the steps are the same except
I sometime see people use long username in home folder. I usually go with short and easy to remember username. Mine is
To check, type open terminal and type
$ pwd /Users/sakko
If it's not what you like, find a way to change it now before continuing. It will be extremely difficult to change this after a few months.
Download Xcode from here https://developer.apple.com/download/more/ or the Apple App Store.
Then try creating a single page app iOS project. Run the project to see if it build successfully.
Open terminal and type
$ xcode-select --install
install to continue
Open terminal and input these (replace your name and email)
$ git config --global user.name "John Doe" $ git config --global user.email "firstname.lastname@example.org"
Mac has some annoying files that can be ignored by git. Let's add them.
$ nano ~/.gitignore
Then add these
# Node npm-debug.log # Mac .DS_Store .AppleDouble .LSOverride # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk # Windows Thumbs.db # WebStorm .idea/
After you are done, activate this globally by running
$ git config --global core.excludesfile ~/.gitignore
fully explained here https://github.com/robbyrussell/oh-my-zsh
but for quick installation just run
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
then restart terminal
For nodejs development, open https://github.com/nvm-sh/nvm
copy the installation line (eg.)
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
~/.zshrc and see if these lines are present. (if not, add it)
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
If you are using
.nvmrc in your projects to activate node version like
.ruby-version, then you might want to install
nvm-auto from https://github.com/dijitalmunky/nvm-auto
run this line by line
cd ~/.oh-my-zsh/custom/plugins git clone https://github.com/dijitalmunky/nvm-auto.git sed -e 's/^plugins=(\(.*\))/plugins=(\1 nvm-auto)/' -i .pre-nvm-auto ~/.zshrc echo 'nvm_auto_switch' >> ~/.zshrc source ~/.zshrc
Restart terminal then install nodejs (only the version you use)
$ nvm install 10.16.0 $ nvm install node # this will install latest
I'm a Rails developer so I need ruby as well. I choose rvm (like nvm) to manage versions and gemsets.
Simply run the command below and follow what's prompted.
$ \curl -sSL https://get.rvm.io | bash -s stable
When it's done, restart terminal once, to get rvm loaded.
Install ruby, I use
2.6.3 at the moment
$ rvm install 2.5.3 $ rvm install 2.6.3
I don't like document to be installed (to save space) so I usually globally ignore it. (Not sure if this is necessary anymore)
$ echo "gem: --no-document" >> ~/.gemrc
Then install latest version of Rails
$ gem install rails
RVM will install Homebrew for you, so you don't need to reinstall it.
So let's install other apps
# image processing $ brew install imagemagick gs vips # postgresql $ brew install postgresql $ brew services start postgresql # to start service # mysql $ brew install mysql $ brew services start mysql # to start service # redis $ brew install redis $ brew services start redis # to start service # memcached $ brew install memcached $ brew services start memcached # to start service
Installing ElasticSearch require Java8 you can download them from here.
Agree with the terms or use openjdk from Homebrew
$ brew tap AdoptOpenJDK/openjdk $ brew cask install adoptopenjdk8
Then install ElasticSearch
# elasticsearch $ brew install elasticsearch $ brew services start elasticsearch # to start service
The best tutorial is the official one.
- Little Snitch
- iStat Menus
I usually start with these packages, (you need to
install shell command from atom application menu first)
I usually use Sublime if I want to quickly open some file (especially JSON). Since it's the fastest editor I can find with all the features I need. These are the packages I usually use.
Babel Emmet GitGutter JsPrettier JSX
Also enable CLI with
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Docker - not yet, I'm saving my precious 256GB ssd T____T
python, gcloud, ansible, blah blah blah..... too many to add. Install them later.