大漠駝鈴

          置身浩瀚的沙漠,方向最為重要,希望此blog能向大漠駝鈴一樣,給我方向和指引。
          Java,Php,Shell,Python,服務(wù)器運(yùn)維,大數(shù)據(jù),SEO, 網(wǎng)站開發(fā)、運(yùn)維,云服務(wù)技術(shù)支持,IM服務(wù)供應(yīng)商, FreeSwitch搭建,技術(shù)支持等. 技術(shù)討論QQ群:428622099
          隨筆 - 238, 文章 - 3, 評(píng)論 - 117, 引用 - 0
          數(shù)據(jù)加載中……

          Mac下如何安裝Nginx+PHP-FPM+Mariadb環(huán)境

          1.Nginx
          brew install nginx
          #設(shè)置自啟動(dòng)
          ln 
          -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents  
          #Nginx命令
          sudo nginx            # start  
          sudo nginx -s stop    # stop  
          sudo nginx -s reload  # restart
          #Nginx配置文件
          /usr/local/etc/nginx
          默認(rèn)的Nginx端口是8080
          2.PHP_FPM
          #添加brew的PHP源
          sudo brew tap homebrew
          /dupes
          sudo brew tap homebrew
          /versions
          sudo brew tap homebrew
          /homebrew-php  
          #安裝PHP
          sudo brew install 
          ---with-fpm  --disable-opcache --with-imap php56  
          #設(shè)置自啟動(dòng)
          ln 
          -sfv /usr/local/opt/php56/*.plist ~/Library/LaunchAgents  
          #設(shè)置環(huán)境變量
          export PATH="/usr/local/bin:/usr/local/sbin:$PATH" 
          #啟動(dòng)和關(guān)閉PHP_FPM
          sudo /usr/local/opt/php56/sbin/php56-fpm start

          sudo /usr/local/opt/php56/sbin/php56-fpm restart
          sudo /usr/local/opt/php56/sbin/php56-fpm stop
          sudo /usr/local/opt/php56/sbin/php56-fpm status

          其實(shí)并不用上面那么復(fù)雜
          Usage: /usr/local/sbin/php56-fpm {start|stop|force-quit|restart|reload|status}
          直接運(yùn)行
          sudo php56-fpm start

          sudo php56-fpm stop
          sudo php56-fpm restart
          3.Mariadb
          brew install mariadb
          #運(yùn)行
          mysql.server start
          mysql.server stop
          mysql.server restart
          #設(shè)置密碼
          mysql_secure_installation
          #查詢版本
          select @@version;
          mysql啟動(dòng)失敗解決方案
          參考http://unix-like.dyndns-web.com/?p=242



          posted on 2015-10-07 20:37 草原上的駱駝 閱讀(5519) 評(píng)論(0)  編輯  收藏


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 桐梓县| 北碚区| 木里| 鸡西市| 凉城县| 洱源县| 衡水市| 永城市| 叶城县| 乾安县| 平果县| 海口市| 会宁县| 威宁| 台中县| 朝阳区| 定州市| 温泉县| 郴州市| 平阳县| 曲麻莱县| 龙陵县| 巴青县| 五河县| 天水市| 成武县| 泽州县| 荆门市| 松原市| 云梦县| 新闻| 宁化县| 灵川县| 博野县| 富阳市| 青川县| 景宁| 延寿县| 宝应县| 逊克县| 慈利县|