
/Applications folder and agree to the license. xcode-select --install Install button.⌘ + , to access the settings and go to the Locations tab. Install the Command Line Tools to the latest available version, Xcode 5.0.2 (5A3005) in my example:
apt-get or aptitude on Linux distributions for installing packages and dependencies for a specific application. brew also works only on computers running Mac OS X. It will also make sure that you get the latest updates for installed applications, so you will not have to worry about expired versions or security gaps, exploits, and so on. curl http://xquartz-dl.macosforge.org/SL/XQuartz-2.7.5.dmg -o /tmp/XQuartz.dmg open /tmp/XQuartz.dmg ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" brew doctor brew update brew upgrade brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install --without-apache --with-fpm --with-mysql php55 $PATH environment variable in the ~/.bash_profile file: echo 'export PATH="$(brew --prefix josegonzalez/php/php55)/bin:$PATH"' >> ~/.bash_profile mkdir -p ~/Library/LaunchAgents cp /usr/local/Cellar/php55/5.5.9/homebrew-php.josegonzalez.php55.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist lsof -Pni4 | grep LISTEN | grep php php-fpm 69659 frdmn 6u IPv4 0x8d8ebe505a1ae01 0t0 TCP 127.0.0.1:9000 (LISTEN) php-fpm 69660 frdmn 0u IPv4 0x8d8ebe505a1ae01 0t0 TCP 127.0.0.1:9000 (LISTEN) php-fpm 69661 frdmn 0u IPv4 0x8d8ebe505a1ae01 0t0 TCP 127.0.0.1:9000 (LISTEN) php-fpm 69662 frdmn 0u IPv4 0x8d8ebe505a1ae01 0t0 TCP 127.0.0.1:9000 (LISTEN) brew install mysql cp /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist secure_mysql_installation to change the root password, remove the anonymous user and disable the remote login feature as root: mysql_secure_installation > Enter current password for root (enter for none): > Change the root password? [Y/n] > Remove anonymous users? [Y/n] > Disallow root login remotely? [Y/n] > Remove test database and access to it? [Y/n] > Reload privilege tables now? [Y/n] mysql -uroot -p Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> \q command: mysql> \q Bye autoconf which is required for phpMyAdmin: brew install autoconf echo 'PHP_AUTOCONF="'$(which autoconf)'"' >> ~/.bash_profile brew install phpmyadmin brew install nginx sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/ sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist curl -IL http://localhost:8080 HTTP/1.1 403 Forbidden Server: nginx/1.4.4 Date: Sun, 08 Dec 2013 03:33:41 GMT Content-Type: text/html Content-Length: 168 Connection: keep-alive sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist mkdir -p /usr/local/etc/nginx/logs mkdir -p /usr/local/etc/nginx/sites-available mkdir -p /usr/local/etc/nginx/sites-enabled mkdir -p /usr/local/etc/nginx/conf.d mkdir -p /usr/local/etc/nginx/ssl sudo mkdir -p /var/www sudo chown :staff /var/www sudo chmod 775 /var/www nginx.conf file (which will always be available at /usr/local/etc/nginx/nginx.conf.default if you want to take a look at its code) and load the settings I created using curl from GitHub: rm /usr/local/etc/nginx/nginx.conf curl -L https://gist.github.com/frdmn/7853158/raw/nginx.conf -o /usr/local/etc/nginx/nginx.conf nginx.conf.default . curl -L https://gist.github.com/frdmn/7853158/raw/php-fpm -o /usr/local/etc/nginx/conf.d/php-fpm curl -L https://gist.github.com/frdmn/7853158/raw/sites-available_default -o /usr/local/etc/nginx/sites-available/default curl -L https://gist.github.com/frdmn/7853158/raw/sites-available_default-ssl -o /usr/local/etc/nginx/sites-available/default-ssl curl -L https://gist.github.com/frdmn/7853158/raw/sites-available_phpmyadmin -o /usr/local/etc/nginx/sites-available/phpmyadmin phpinfo() ) using git : git clone http://git.frd.mn/frdmn/nginx-virtual-host.git /var/www rm -rf /var/www/.git /var/www/.git folder so that git does not track subsequent changes. mkdir -p /usr/local/etc/nginx/ssl openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=State/L=Town/O=Office/CN=phpmyadmin" -keyout /usr/local/etc/nginx/ssl/localhost.key -out /usr/local/etc/nginx/ssl/localhost.crt openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=State/L=Town/O=Office/CN=localhost" -keyout /usr/local/etc/nginx/ssl/phpmyadmin.key -out /usr/local/etc/nginx/ssl/phpmyadmin.crt sites-enabled folder for virtual hosts in order to enable them: ln -sfv /usr/local/etc/nginx/sites-available/default /usr/local/etc/nginx/sites-enabled/default ln -sfv /usr/local/etc/nginx/sites-available/default-ssl /usr/local/etc/nginx/sites-enabled/default-ssl ln -sfv /usr/local/etc/nginx/sites-available/phpmyadmin /usr/local/etc/nginx/sites-enabled/phpmyadmin sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist phpinfo()phpinfo() (SSL) curl -L https://gist.github.com/frdmn/7853158/raw/bash_aliases -o /tmp/.bash_aliases cat /tmp/.bash_aliases >> ~/.bash_aliases echo "source ~/.bash_aliases" >> ~/.bash_profile ~/.bash_profile with the command: source ~/.bash_profile launchctl commands, as above. nginx.start nginx.stop nginx.restart nginx.logs.access nginx.logs.default.access nginx.logs.phpmyadmin.access nginx.logs.default-ssl.access nginx.logs.error nginx.logs.phpmyadmin.error [sudo] nginx -t php-fpm.start php-fpm.stop php-fpm.restart [sudo] php-fpm -t mysql.start mysql.stop mysql.restart hosts using the sudo vi /etc/hosts command.Source: https://habr.com/ru/post/217245/
All Articles