Start local development from scratch without reinventing the wheel
Follow the Table of Contents and use what you need.
- Operating System
- Server
- DNS
- Database
- Database Management
- Programming Language
- Content Management System
- Static Site Generator
- Version Control
- Package Management
- Cloud Storage
- Symbolic Links
TODO: Add Operating System content
- MacOS
- Setup: [https://dev.to/therealdanvega/new-macbook-setup-for-developers-2nma]
- Applications
- Browser
- Google Chrome
- Safari
- FireFox
- Chat: Slack
- Cloud Storage
- Backup and Sync from Google
- OneDrive
- Code Editor
- MacDown
- Sublime Text
- Database Management: Sequel Pro
- Development
- Koala
- LiveReload
- PhoneGap
- Font Management: Font Book
- FTP: FileZilla
- Giphy Capture
- Git: GitHub Desktop
- Image Optimization: ImageOptim
- Search: Alfred
- Shell
- iTerm
- Oh My ZSH
- Z
- List Creation: Wunderlist
- Video Conferencing: Zoom
- Virtual Machines: Virtual Box
- Window Management: Spectacle
- Browser
- Applications
- Windows
- 10
- 7
- Linux
- CentOS
- Ubuntu
- Apache
-
Stop and unload pre-installed Apache (MacOS)
$ sudo apachectl stop $ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
-
Install and start Apache
-
via Homebrew (MacOS)
$ brew install httpd $ sudo brew services start httpd
-
Download Latest Version, then Install Apache (Windows)
-
Install as a service
$ httpd.exe -k install
-
-
Download Latest Version, then Install Apache (Linux)
-
Visit
http://localhost:8080
and see "It works!"
-
-
Configure Apache, add Virtual Hosts and SSL
-
Edit Apache Config File:
/conf/httpd.conf
-
Add
Define localhost_location "path/to/folder"
-
Replace
Listen 8080
withListen 80
-
Uncomment
LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so
-
Uncomment
LoadModule brotli_module lib/httpd/modules/mod_brotli.so
-
Uncomment
LoadModule ssl_module lib/httpd/modules/mod_ssl.so
-
Uncomment
LoadModule http2_module lib/httpd/modules/mod_http2.so
-
Uncomment
LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
-
Uncomment
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
-
Replace
User
with local User name -
Replace
Group
with local Group nameGroup staff
(MacOS)
-
Replace
#ServerName www.example.com:8080
withServerName localhost
-
Update
DocumentRoot
and<Directory>
locations with"${localhost_location}"
-
Replace
AllowOverride None
withAllowOverride All
-
Find and replace:
<IfModule dir_module> DirectoryIndex index.html </IfModule>
with:
<IfModule dir_module> DirectoryIndex index.php index.html </IfModule> <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch>
-
Uncomment
Include /usr/local/etc/httpd/extra/httpd-vhosts.conf
-
Uncomment
Include /usr/local/etc/httpd/extra/httpd-ssl.conf
-
-
Edit Virtual Hosts Config File:
/conf/extra/httpd-vhosts.conf
# Replace Your_Domain_Name with your domain (i.e. example.test) # Replace Project_Name with your project folder name <VirtualHost *:80> DocumentRoot "${localhost_location}" ServerName localhost <Directory "${localhost_location}"> Require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "${localhost_location}/Project_Name" ServerName Your_Domain_Name <Directory "${localhost_location}/Project_Name"> Require all granted </Directory> </VirtualHost> <VirtualHost *:443> Protocols h2 http/1.1 DocumentRoot "${localhost_location}/Project_Name" ServerName Your_Domain_Name <Directory "${localhost_location}/Project_Name"> Require all granted </Directory> SSLEngine on SSLCertificateFile "${localhost_location}/Project_Name/certs/server.crt" SSLCertificateKeyFile "${localhost_location}/Project_Name/certs/server.key" </VirtualHost>
-
Generate SSL Certificate files
# Replace Your_Domain_Name with your domain (i.e. example.test) # Replace Project_Name with your project folder name cd Project_Name mkdir certs cd certs openssl req -x509 -out server.crt -keyout server.key \ -newkey rsa:2048 -nodes -sha256 \ -subj '/CN=Your_Domain_Name' -extensions EXT -config <( \ printf "[dn]\nCN=Your_Domain_Name\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:Your_Domain_Name\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
-
Edit SSL Config File:
/conf/extra/httpd-ssl.conf
- Find/replace
8443
with443
- Find/replace
-
-
Control Apache (MacOS, Linux)
sudo apachectl start sudo apachectl stop sudo apachectl -k restart
-
Visit
http://localhost
-
- NginX
- TODO: Add NginX content
- Microsoft IIS
- TODO: Add Microsoft IIS content
-
Open
hosts
file and add local websites127.0.0.1 localhost 127.0.0.1 example.com 127.0.0.1 www.example.com
- MacOS:
/etc/hosts
- Windows:
C:\Windows\system32\drivers\etc\hosts
- Linux:
/etc/hosts
-
dnsmasq (MacOS and Linux)
-
brew install dnsmasq echo 'address=/.test/127.0.0.1' > /usr/local/etc/dnsmasq.conf sudo brew services start dnsmasq sudo mkdir -v /etc/resolver sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
-
-
Acrylic DNS Proxy (Windows)
- Flush DNS
- MacOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Windows 7:
ipconfig /flushdns
- MacOS:
- Clear browser cache:
- MacOS
- Chrome:
cmd + shift + delete
- Chrome:
- MacOS
-
MySQL
-
MariaDB
- Install MariaDB
brew update brew install mariadb brew services start mariadb
To stop the server:
brew services stop mariadb
-
SQLite
-
PostgreSQL
- Sequel Pro
- Heidi SQL
- OmniDB
- phpMyAdmin
-
Install PHP
-
Install XCode Command Line Tools
xcode-select --install
-
Install Homebrew (see below)
-
Install Mojave Required Libraries (MacOS Mojave)
$ brew install openldap libiconv
-
Install Apache (see above)
-
Install PHP
$ brew install php@5.6 $ brew install php@7.0 $ brew install php@7.1 $ brew install php@7.2
-
TODO: See if this also works:
$ brew install php@7.3
-
-
Switch to PHP 5.6
$ brew unlink php@7.2 && brew link --force --overwrite php@5.6
-
-
Check PHP version:
php -v
TODO: Add Ruby content
TODO: Add Node.js content
TODO: Add Go content
TODO: Add Content Management System content
- WordPress
- Cockpit
- Netlify CMS
TODO: Add Static Site Generator content
- Eleventy
- Jekyll
TODO: Add Version Control content
- Git
- GitHub
-
Homebrew
-
Is Homebrew installed?
$ brew --version
-
Install Homebrew
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Fix/correct Homebrew
$ brew doctor
-
-
npm
- TODO: Add npm content
-
Chocolatey
- TODO: Add Chocolatey content
-
apt-get
- TODO: Add apt-get content
TODO: Add Cloud Storage content
- OneDrive
- Google Drive
- DropBox
- Box
Otherwise known as symlinks, they are like pointers to another place. While you don't have to actually move the folder you are referencing, you can create a pointer to it that behaves as if you did. —Chris Coyier
ln -s /path/to/original/ /path/to/link
You can create symbolic links using the mklink command in a Command Prompt window as Administrator. To open one, locate the “Command Prompt” shortcut in your Start menu, right-click it, and select “Run as Administrator”. —How-To Geek
# Without any extra options, mklink creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link pointing to the file Target :
mklink Link Target
# Use /D when you want to create a soft link pointing to a directory. like so:
mklink /D Link Target
# Use /H when you want to create a hard link pointing to a file:
mklink /H Link Target
# Use /J to create a hard link pointing to a directory, also known as a directory junction:
mklink /J Link Target
Upcoming changes are indicated by TODO
.
If you'd like to contribute, please read the Code of Conduct, then fork the repository and use a feature branch. Pull requests are welcome.
Working on your first Pull Request? You can learn how from this free series, How to Contribute to an Open Source Project on GitHub.
Name | Role |
---|---|
Paul Shryock | Owner |
- Project homepage: https://paulshryock.github.io/Leigh/
- Repository: https://github.com/paulshryock/Leigh
- Releases: - v0.1.0 - Roadmap
- Issue tracker: https://github.com/paulshryock/Leigh/issues
- In case of sensitive bugs like security vulnerabilities, please contact paul@pshry.com directly instead of using issue tracker. We value your effort to improve the security and privacy of this project!
- Changelog: https://github.com/paulshryock/Leigh/blob/master/CHANGELOG.md
- Related projects:
- Project Roadmap: https://github.com/paulshryock/Project-Roadmap - Plan and execute digital projects from scratch without reinventing the wheel
- Eustace: https://github.com/paulshryock/Eustace - Start from scratch without reinventing the wheel
- Myrtle: https://github.com/paulshryock/Myrtle - Start Cockpit from scratch without reinventing the wheel
- Brimbly: https://github.com/paulshryock/Brimbly - Start WordPress from scratch without reinventing the wheel
The code in this project is licensed under GNU General Public License v3.0.