{"id":27990473,"url":"https://github.com/syzygypl/mac-setup","last_synced_at":"2025-06-13T19:37:05.686Z","repository":{"id":93340942,"uuid":"63855986","full_name":"syzygypl/mac-setup","owner":"syzygypl","description":"Our automated new mac setup","archived":false,"fork":false,"pushed_at":"2020-11-04T13:38:20.000Z","size":83,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T16:52:04.472Z","etag":null,"topics":["ansible","ansible-playbook"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syzygypl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-21T09:28:09.000Z","updated_at":"2021-05-20T02:21:36.000Z","dependencies_parsed_at":"2023-03-07T09:30:44.470Z","dependency_job_id":null,"html_url":"https://github.com/syzygypl/mac-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syzygypl/mac-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syzygypl%2Fmac-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syzygypl%2Fmac-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syzygypl%2Fmac-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syzygypl%2Fmac-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syzygypl","download_url":"https://codeload.github.com/syzygypl/mac-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syzygypl%2Fmac-setup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259708119,"owners_count":22899545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook"],"created_at":"2025-05-08T16:46:41.204Z","updated_at":"2025-06-13T19:37:05.673Z","avatar_url":"https://github.com/syzygypl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mac setup with Ansible\n\n[![Build Status](https://travis-ci.org/syzygypl/mac-setup.svg?branch=master)](https://travis-ci.org/syzygypl/mac-setup)\n\n```bash\n$ curl -sL https://raw.githubusercontent.com/syzygypl/mac-setup/master/bootstrap.sh | bash\n```\n\nThis script will setup your Mac with software that we use in **Syzygy Warsaw** on a daily basis. All You need is paste above line to Terminal and execute.\n\nIt will install `Apache 2.4` and `PHP 5.6`, `7.1` and `7.2` with required extensions and configure sites to be served from `~/Sites/*.loc/web` directories.\nDNS records of `*.loc` are being handled by `Dnsmasq` so no changes in `/etc/hosts` are required.\n\nYou can check software being installed below. If no version is provided - we use the newest.\n\n## Apps\n\n- [1Password](https://1password.com/)\n- [Atom](https://atom.io/)\n- [Charles](https://www.charlesproxy.com/)\n- [Cocoa REST client](https://mmattozzi.github.io/cocoa-rest-client/)\n- [Docker](https://www.docker.com/products/docker)\n- [Firefox Developer Edition](https://www.mozilla.org/firefox/developer)\n- [Google Chrome](https://www.google.com/chrome/)\n- [PHPStorm](https://www.jetbrains.com/phpstorm/)\n- [iTerm2](https://www.iterm2.com/)\n- [Java](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)\n- [Skype](https://www.skype.com/)\n- [Slack](https://slack.com/)\n- [Discord](https://discordapp.com/)\n- [Vagrant](https://www.vagrantup.com/)\n- [VirtualBox](https://www.virtualbox.org/)\n- [WKhtmlTOpdf](http://wkhtmltopdf.org/)\n- [Sequel PRO](https://www.sequelpro.com/)\n- [RoboMongo](https://robomongo.org/)\n- [KeePassX](https://www.keepassx.org/)\n- [KeKa](http://www.kekaosx.com/)\n- [MacDown](https://macdown.uranusjr.com/)\n\n## Window-less software\n\n- [Apache 2.4](https://httpd.apache.org/)\n- [tree](http://mama.indstate.edu/users/ice/tree/)\n- [wget](https://www.gnu.org/software/wget/)\n- [Fish Shell](https://fishshell.com)\n- [Bash Shell](https://www.gnu.org/software/bash/)\n- [pv](https://www.ivarch.com/programs/pv.shtml)\n- [ssh-copy-id](https://www.openssh.com/)\n- [Redis](http://redis.io/)\n- [MySQL 5.7](https://dev.mysql.com/doc/refman/5.7/en/)\n- [PHP](https://php.net)\n- [PHP Xdebug](http://xdebug.org)\n- [PHP Redis](https://github.com/phpredis/phpredis)\n- [PHP Imagick](https://pecl.php.net/package/imagick)\n- [PHP APCu](https://pecl.php.net/package/apcu)\n- [PHP YAML](https://pecl.php.net/package/yaml)\n- [Composer](http://getcomposer.org)\n- [ImageMagick](https://www.imagemagick.org/)\n- [Ruby](https://www.ruby-lang.org/)\n- [ElasticSearch 5.6](https://www.elastic.co/products/elasticsearch)\n- [heroku-toolbelt](https://cli.heroku.com)\n- [Node](https://nodejs.org/)\n- [nvm](https://github.com/creationix/nvm)\n- [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)\n- [rsync 3.1](https://rsync.samba.org/)\n- [coreutils](https://www.gnu.org/software/coreutils)\n\n## Configuration\n\n### PHP\n\n`/usr/local/etc/php/*/php.ini`:\n\n```ini\nupload_max_filesize   20M\npost_max_size         80M\nmemory_limit          10G\ndate.timezone         'Europe/Warsaw'\n```\n\n### Apache\n\n`/usr/local/etc/httpd/httpd.conf`:\n\n```\nLoadModule  vhost_alias_module  libexec/mod_vhost_alias.so\nLoadModule  rewrite_module      libexec/mod_rewrite.so\nLoadModule  php5_module         /usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so\nLoadModule  php7_module         /usr/local/opt/php@7.1/lib/httpd/modules/libphp7.so\nLoadModule  php7_module         /usr/local/opt/php@7.2/lib/httpd/modules/libphp7.so\n\nInclude     /usr/local/etc/httpd/extra/httpd-vhosts.conf\nInclude     /usr/local/etc/httpd/extra/httpd-php.conf\n\nUser        {{ ansible_ssh_user }}\nGroup       staff\nServerName  {{ ansible_hostname }}.local\n```\n\n`/usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf`:\n\n```\n\u003cDirectory /Users/{{ ansible_ssh_user }}/Sites\u003e\n  Require all granted\n  AllowOverride All\n  DirectoryIndex index.php index.html\n\u003c/Directory\u003e\n\n\u003cVirtualHost *:80\u003e\n  DocumentRoot /Users/{{ ansible_ssh_user }}/Sites/\n\u003c/VirtualHost\u003e\n\n\u003cVirtualHost *:80\u003e\n  ServerName loc\n  ServerAlias *.loc\n\n  CustomLog /var/log/apache2/loc.access_log vcommon\n  ErrorLog /var/log/apache2/loc.error_log\n  VirtualDocumentRoot /Users/{{ ansible_ssh_user }}/Sites/%-2.0.%-1.0/web/\n\n  LogFormat \"%{Host}i %l %u %t \\\"%r\\\" %\u003es %b\" vcommon\n  Options +FollowSymLinks\n  DirectoryIndex index.php\n  FallbackResource /index.php\n\n  SetEnvIf Request_URI ^ Debug=1 DEBUG=1 SYMFONY_ENV=dev APP_ENV=dev\n  SetEnvIf Host ([^\\.]+).loc APP_NAME=$1\n  SetEnvIf Host app.([^\\.]+) APP_NAME=$1\n  SetEnvIf Cookie \"APP_NAME=(\\w+)\" APP_NAME=$1\n\n\u003c/VirtualHost\u003e\n\n# Additional VirtualHosts\nIncludeOptional /usr/local/etc/httpd/vhosts/*.conf\n```\n\n`/usr/local/etc/httpd/httpd-php.conf`:\n\n```\n\u003cFilesMatch \\.php$\u003e\n  SetHandler application/x-httpd-php\n\u003c/FilesMatch\u003e\n```\n\n### Dnsmasq\n\n`/etc/resolver/loc`:\n\n```\nnameserver 127.0.0.1\n```\n\n`/usr/local/etc/dnsmasq.conf`:\n\n```\naddress=/.loc/127.0.0.1\n```\n\n###  Services\n\nAll services are managed via `brew services` command.\n\n```bash\n$ brew services list\n\nName              Status  User Plist\ndnsmasq           started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist\nelasticsearch@5.6 started kuba /Users/kuba/Library/LaunchAgents/homebrew.mxcl.elasticsearch@5.6.plist\nhttpd             started root /Library/LaunchDaemons/homebrew.mxcl.httpd.plist\nmongodb           started kuba /Users/kuba/Library/LaunchAgents/homebrew.mxcl.mongodb.plist\nmysql@5.7         started kuba /Users/kuba/Library/LaunchAgents/homebrew.mxcl.mysql@5.7.plist\nphp               stopped\nphp@5.6           stopped\nphp@7.1           stopped\nredis             started kuba /Users/kuba/Library/LaunchAgents/homebrew.mxcl.redis.plist\n```\n\n`dnsmasq` and `apache` should be started as `root`:\n\n```bash\n$ sudo brew services start httpd\n==\u003e Successfully started `httpd` (label: homebrew.mxcl.httpd)\n\n$ sudo brew services start dnsmasq\n==\u003e Successfully started `dnsmasq` (label: homebrew.mxcl.dnsmasq)\n```\n\nRest can be started as regular user (no `sudo` required):\n\n```bash\n$ brew services start redis\n==\u003e Successfully started `redis` (label: homebrew.mxcl.redis)\n\n$ brew services start elasticsearch@5.6\n==\u003e Successfully started `elasticsearch@5.6` (label: homebrew.mxcl.elasticsearch@5.6)\n\n$ brew services start mysql@5.7\n==\u003e Successfully started `mysql@5.7` (label: homebrew.mxcl.mysql@5.7)\n```\n\nOther commands available for `brew services` are `restart` and `stop`.\n\n\n## Cleanup old brew PHP\n\n```bash\n$ brew update\n$ brew upgrade\n$ brew cleanup\n\n# check what packages are installed\n$ brew list | grep php\n\n# uninstall old php packages\n$ brew uninstall --force php56 php56-apcu php56-opcache php56-xdebug php56-yaml php56-igbinary php56-intl php56-redis php56-imagick php56-mcrypt\n$ brew uninstall --force php70 php70-apcu php70-opcache php70-xdebug php70-yaml php70-igbinary php70-intl php70-redis php70-imagick php70-mcrypt\n$ brew uninstall --force php71 php71-apcu php71-opcache php71-xdebug php71-yaml php71-igbinary php71-intl php71-redis php71-imagick php71-mcrypt\n$ brew uninstall --force php72 php72-apcu php72-opcache php72-xdebug php72-yaml php72-igbinary php72-intl php72-redis php72-imagick php72-mcrypt\n$ brew cleanup\n\n# check if everything was uninstalled Successfully\n$ brew list | grep php\n\n# remove old configs\n$ rm -Rf /usr/local/etc/php/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyzygypl%2Fmac-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyzygypl%2Fmac-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyzygypl%2Fmac-setup/lists"}