Различия
Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слева Предыдущая версия | |||
brew:server-setup [2015/11/05 01:19] – удалено mirocow | brew:server-setup [Дата неизвестна] (текущий) – внешнее изменение (Дата неизвестна) 127.0.0.1 | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | {{tag> | ||
+ | ====== MNMP + Memcached ====== | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | # install homebrew' | ||
+ | brew tap josegonzalez/ | ||
+ | |||
+ | # install homebrew-dupes (required to install zlib, php53' | ||
+ | brew tap homebrew/ | ||
+ | |||
+ | # install nginx + mysql + php 5.3 + php-fpm + apc + xdebug | ||
+ | brew install nginx mysql | ||
+ | brew install --with-fpm --with-mysql php53 | ||
+ | brew install php53-zenddebugger php53-memcache php53-gearman php53-apc php53-mcrypt | ||
+ | brew install memcached | ||
+ | |||
+ | |||
+ | # add apc + xdebug configs to php.ini: | ||
+ | if `grep -q zenddebugger / | ||
+ | then | ||
+ | echo "The PHP config file is edited" | ||
+ | else | ||
+ | echo " | ||
+ | |||
+ | [apc] | ||
+ | extension = \" | ||
+ | apc.enabled = 1 | ||
+ | apc.shm_segments = 1 | ||
+ | apc.shm_size = 64M | ||
+ | apc.ttl = 7200 | ||
+ | apc.user_ttl = 7200 | ||
+ | apc.num_files_hint = 1024 | ||
+ | apc.mmap_file_mask = / | ||
+ | apc.enable_cli = 1 | ||
+ | |||
+ | [zenddebugger] | ||
+ | zend_extension = \" | ||
+ | |||
+ | " >> / | ||
+ | fi | ||
+ | |||
+ | # set up mysql to run as user account | ||
+ | # install mysql db default | ||
+ | if [ ! -d / | ||
+ | unset TMPDIR | ||
+ | rm -R / | ||
+ | mysql_install_db --verbose --user=`whoami` --basedir=" | ||
+ | --datadir=/ | ||
+ | fi | ||
+ | |||
+ | # launch mysql on startup | ||
+ | echo " | ||
+ | if [ -f ~/ | ||
+ | launchctl unload -w ~/ | ||
+ | rm ~/ | ||
+ | fi | ||
+ | cp `brew --prefix mysql`/ | ||
+ | if [ -f / | ||
+ | / | ||
+ | fi | ||
+ | launchctl load -w ~/ | ||
+ | |||
+ | |||
+ | # launch php-fpm on startup | ||
+ | echo " | ||
+ | if [ -f ~/ | ||
+ | launchctl unload -w ~/ | ||
+ | rm ~/ | ||
+ | fi | ||
+ | cp `brew --prefix php53`/ | ||
+ | launchctl load -w ~/ | ||
+ | |||
+ | |||
+ | # launch nginx at startup as root (in order to listen on privileged port 80): | ||
+ | echo " | ||
+ | if [ -f ~/ | ||
+ | launchctl unload -w ~/ | ||
+ | rm ~/ | ||
+ | fi | ||
+ | cp `brew --prefix nginx`/ | ||
+ | sed -i -e ' | ||
+ | launchctl load -w ~/ | ||
+ | |||
+ | # launch memcached | ||
+ | echo " | ||
+ | if [ -f ~/ | ||
+ | launchctl unload -w ~/ | ||
+ | rm ~/ | ||
+ | fi | ||
+ | cp `brew --prefix memcached`/ | ||
+ | launchctl load -w ~/ | ||
+ | |||
+ | echo " | ||
+ | POST-INSTALL PROCEDURE: | ||
+ | ======================= | ||
+ | 1) configure intellij / netbeans / phpstorm / eclipse pdt to connect to xdebug on port 9009 | ||
+ | " | ||
+ | |||
+ | </ |