To setup my local machine for developing I do the following.
- Install Xcode
- Install developer tools
- Create SSH key
- Add SSH to github
- Install brew
- Install code VScode
⌘ + ⇧ + P
and then findShell Command: Install 'code' command in PATH command
- Install node
- Install nvm
- Install gh cli
- $PATH
/opt/homebrew/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin
Install macOS updates
Go to app store and download Xcode
Open Xcode and go to Open Developer Tools > More Developer Tools and download most recent Command Line Tools. Or you can run xcode-select --install
, must open Xcode once first.
https://developer.apple.com/xcode/
Install using dmg package.
Just use
sudo apachectl start
Create the folder /Users/[username]/Sites/
.
Create /etc/apache2/users/[username].conf
file with contents
<Directory "/Users/[username]/Sites/">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
</Directory>
Replace [username] with your username.
Set permissions -rw-r--r-- 1 root wheel 298 Jun 28 16:47 username.conf
sudo chmod 644 username.conf
Uncomment following lines in /etc/apache2/httpd.conf
file
LoadModule userdir_module libexec/apache2/mod_userdir.so
...
LoadModule include_module libexec/apache2/mod_include.so
...
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
...
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
...
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
Include /private/etc/apache2/extra/httpd-userdir.conf
Uncomment line in /etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/users/*.conf
Run sudo apachectl restart
to restart Apache and make sure there are no errors
Should be able to visit localhost
and localhost/~[username]
now.
Script I used which is from http://php-osx.liip.ch/. Installs it to /usr/local/php5
.
Uncomment timezone and lattitude in php ini file to Europe/London /usr/local/php5/php.d/99-liip-developer.ini
Need to add export PATH=/usr/local/php5/bin:$PATH
to .profile file for command line to pick up latest version of php
Test it by creating phpinfo.php
file with <?php phpinfo(); ?>
Installed MYSQL from mysql website. Under MySQL Community. Makes sure 64bit.
https://dev.mysql.com/downloads/mysql/
Downloaded Sequel Pro. Connected to local mysql using socket.
Add /usr/local/mysql/bin
to PATH
Download node installer from website.
Run installer.
Make sure /usr/local/bin
is in $PATH.
Check $PATH using echo $PATH
Google and install using:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Needed for NVM
https://eshlox.net/2019/01/27/how-to-use-nvm-with-fish-shell
Need to create .bash_profile
in home directory and add export export PATH=/usr/local/php5/bin:$PATH
for command line to pickup latest version of php. Add /usr/local/mysql/bin
to PATH also.
VSCode path
Launching VS Code from the terminal looks cool. To do this, press CMD + SHIFT + P, type shell command and select Install code command in path. Afterwards, navigate to any project from the terminal and type code .from the directory to launch the project using VS Code.
Add SSH key. Follow Githubs help.
Added Github Issues command line interface Install fish shell.
Run npm install -g yo grunt-cli bower
in terminal. May require sudo. grunt-cli bower
are not required for latest version of npm as npm will automatically install them.
Install bower
Download install from https://xquartz.macosforge.org/landing/
Download form apple developer website.
Install from webiste.
npm install -g coffee-script
Install from webiste.
Install following directions on website
Then add
<?php require 'vendor/autoload.php'; ?>
To you're project.
gem install sass
To create custom function create file in gem folder and require it into main sass module.
Check path of zsh shell which comes with mac
which zsh
Create zsh profile
touch ~/.zshrc
Change from bash to zsh
chsh -s /bin/zsh
Fish like command syntax highlighting https://github.com/zsh-users/zsh-syntax-highlighting
Install using brew install zsh-syntax-highlighting
Simple/minimal terminal
https://hyper.is/
Change preferences to point to zsh shell /bin/zsh
Hyper snazzy theme
hyper install hyper-snazzy
Install Vagrant using installer.
Install VirtualBox
Download project and run environment
You need to login by adding the user to the system/terminal.
npm adduser
To publish a package you need to first publish using native npm
npm publish
If you're publishing a scoped package in an organisation, which is not private you need to include the flag --access public
npm publish --access public
I had an issue pushing to github. I found I had to:
- search for
git.terminalAuthentication
in VS code settings. - Disable it
- Reload VScode
- Enable it again
- Run push command to setup new repo
- Then it prompted me to login via website