Skip to content

Instantly share code, notes, and snippets.

@xlmo
Created November 8, 2012 07:01
Show Gist options
  • Save xlmo/4037312 to your computer and use it in GitHub Desktop.
Save xlmo/4037312 to your computer and use it in GitHub Desktop.

Revisions

  1. Xiaolong Mo revised this gist Nov 9, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,8 @@ cp /usr/local/Cellar/nginx/1.2.4/homebrew.mxcl.nginx.plist ~/Library/LaunchAgent
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

    # Cancel the self-starting
    launchctl unload -w ~/Library/LaunchAgents/org.nginx.nginx.plist
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist


    # Install MySQL
    brew install mysql
  2. Xiaolong Mo revised this gist Nov 9, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,8 @@ brew install nginx

    # Create a link to autostart nginx when the system starts
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/nginx/1.0.10/org.nginx.nginx.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/org.nginx.nginx.plist
    cp /usr/local/Cellar/nginx/1.2.4/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

    # Cancel the self-starting
    launchctl unload -w ~/Library/LaunchAgents/org.nginx.nginx.plist
  3. Xiaolong Mo revised this gist Nov 8, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@ brew install mysql
    # requires these m4 macros, you'll need to add this path manually.

    # Install PHP
    brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --without-apache --with-intl --with-fpm --with-mysql
    brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --without-apache --with-intl --with-fpm --with-mysql

    # Configuration
    mkdir /usr/local/Cellar/php/5.3.10/var/log
  4. @MaximSavin MaximSavin renamed this gist Mar 21, 2012. 1 changed file with 22 additions and 6 deletions.
    28 changes: 22 additions & 6 deletions gistfile1 → gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,30 @@
    # First install requirements for BREW
    # http://mxcl.github.com/homebrew/
    # https://github.com/mxcl/homebrew/wiki/installation
    # Requirements
    # - An Intel CPU 2
    # - OS X 10.5 or higher
    # - Command Line Tools for Xcode (https://developer.apple.com/downloads)
    # or Xcode with X11 (http://itunes.apple.com/us/app/xcode/id448457090)
    # - Java Developer Update (https://connect.apple.com/)

    # Install BREW
    /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

    # Install nginx
    brew install nginx

    # 创建链接,用来在系统启动的时候启动nginx
    # Create a link to autostart nginx when the system starts
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/nginx/1.0.10/org.nginx.nginx.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/org.nginx.nginx.plist
    # 取消自启动

    # Cancel the self-starting
    launchctl unload -w ~/Library/LaunchAgents/org.nginx.nginx.plist

    # 安装MySQL
    # Install MySQL
    brew install mysql
    # 自启动
    # Configuration start MySQL
    # * if this is your first install:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/mysql/5.5.19/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
    @@ -25,9 +40,10 @@ brew install mysql
    # to "/usr/share/aclocal/dirlist". If an autoconf script you use
    # requires these m4 macros, you'll need to add this path manually.

    # 安装PHP
    # Install PHP
    brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --without-apache --with-intl --with-fpm --with-mysql
    # 配置

    # Configuration
    mkdir /usr/local/Cellar/php/5.3.10/var/log
    cp /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf.default /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
    mate /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
  5. @bindiry bindiry renamed this gist Mar 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh → gistfile1
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ brew install mysql

    # 安装PHP
    brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --without-apache --with-intl --with-fpm --with-mysql

    # 配置
    mkdir /usr/local/Cellar/php/5.3.10/var/log
    cp /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf.default /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
    mate /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
  6. @bindiry bindiry revised this gist Mar 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -32,5 +32,5 @@ mkdir /usr/local/Cellar/php/5.3.10/var/log
    cp /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf.default /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
    mate /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf

    chmod -R ug+w /usr/local/Cellar/php/5.3.8/lib/php
    chmod -R ug+w /usr/local/Cellar/php/5.3.10/lib/php
    pear config-set php_ini /usr/local/etc/php.ini
  7. @bindiry bindiry revised this gist Mar 3, 2012. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -10,20 +10,20 @@ launchctl unload -w ~/Library/LaunchAgents/org.nginx.nginx.plist
    # 安装MySQL
    brew install mysql
    # 自启动
    * if this is your first install:
    # * if this is your first install:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/mysql/5.5.19/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

    * if this is an upgrade and you already have the homebrew.mxcl.mysql.plist loaded:
    # * if this is an upgrade and you already have the homebrew.mxcl.mysql.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    cp /usr/local/Cellar/mysql/5.5.19/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

    m4 macros were installed to "share/aclocal".
    Homebrew does not append "/usr/local/share/aclocal"
    to "/usr/share/aclocal/dirlist". If an autoconf script you use
    requires these m4 macros, you'll need to add this path manually.
    # m4 macros were installed to "share/aclocal".
    # Homebrew does not append "/usr/local/share/aclocal"
    # to "/usr/share/aclocal/dirlist". If an autoconf script you use
    # requires these m4 macros, you'll need to add this path manually.

    # 安装PHP
    brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --without-apache --with-intl --with-fpm --with-mysql
  8. @bindiry bindiry created this gist Mar 3, 2012.
    36 changes: 36 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    brew install nginx

    # 创建链接,用来在系统启动的时候启动nginx
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/nginx/1.0.10/org.nginx.nginx.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/org.nginx.nginx.plist
    # 取消自启动
    launchctl unload -w ~/Library/LaunchAgents/org.nginx.nginx.plist

    # 安装MySQL
    brew install mysql
    # 自启动
    * if this is your first install:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/mysql/5.5.19/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

    * if this is an upgrade and you already have the homebrew.mxcl.mysql.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    cp /usr/local/Cellar/mysql/5.5.19/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

    m4 macros were installed to "share/aclocal".
    Homebrew does not append "/usr/local/share/aclocal"
    to "/usr/share/aclocal/dirlist". If an autoconf script you use
    requires these m4 macros, you'll need to add this path manually.
    # 安装PHP
    brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --without-apache --with-intl --with-fpm --with-mysql
    mkdir /usr/local/Cellar/php/5.3.10/var/log
    cp /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf.default /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
    mate /usr/local/Cellar/php/5.3.10/etc/php-fpm.conf
    chmod -R ug+w /usr/local/Cellar/php/5.3.8/lib/php
    pear config-set php_ini /usr/local/etc/php.ini
    17 changes: 17 additions & 0 deletions org.php.php-fpm.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
    <plist version='1.0'>
    <dict>
    <key>Label</key><string>org.php.php-fpm</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/sbin/php-fpm</string>
    <string>--fpm-config</string>
    <string>/usr/local/Cellar/php/5.3.8/etc/php-fpm.conf</string>
    </array>
    <key>Debug</key><false/>
    <key>RunAtLoad</key><true/>
    <key>KeepAlive</key><false/>
    <key>UserName</key><string>username</string>
    </dict>
    </plist>