• A-Fu Design
  • 前端設計
    • jQuery 套件
    • HTML 5
  • 關於A-Fu
  • 隱私權政策
  • 聯絡A-Fu
Google+ facebook twitter

A-Fu Design

A-Fu Design


備忘錄幫助自己記憶所以並沒有寫得很詳細
使用 Ubuntu 14 64bit


1.使用 SSH 登入後先輸入指令更新套件內容
sudo apt-get update 


2. 安裝 MySQL 與確認安裝
sudo apt-get install mysql-server mysql-client


安裝過程會提示輸入密碼,安裝完成後可透過以下指令確認是否安裝與啟動

ps auxf | grep mysql


3. 安裝 Nginx

sudo apt-get install nginx


接下來啟動 Nginx 伺服器

sudo service nginx start

4. 安裝PHP5-fpm

sudo apt-get install php5-fpm



5.參考 phalcon 官方文件配置 nginx
官方文件:http://docs.phalconphp.com/zh/latest/reference/nginx.html
Nginx 的設定文件預設在 /etc/nginx/nginx.conf

server {

    listen   80;
    server_name localhost.dev;

    index index.php index.html index.htm;
    set $root_path '/var/www/phalcon/public';
    root $root_path;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    location ~ \.php {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
 fastcgi_pass unix:/var/run/php5-fpm.sock;
 fastcgi_index index.php;
 include fastcgi_params;
    }

    location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
        root $root_path;
    }

    location ~ /\.ht {
        deny all;
    }
}
修改完成後可使用以下指令檢察文件正確性
sudo service nginx configtest
接下來重新加載文件
sudo service nginx reload

6.接下來依據官方文件安裝與編譯 phalcon

http://docs.phalconphp.com/zh/latest/reference/install.html

sudo apt-get install gcc make git-core libpcre3-dev php5-dev

git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
接下來需要載入模組
新增模組文件
/etc/php5/mods-available/phalcon.ini
; configuration for php phalcon module
; priority=20
extension=phalcon.so
接下來需要載入模組
使用指令
sudo ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/fpm/conf.d/phalcon.ini

連結檔案後重新啟動 php5-fpm 和 nginx 後就可以再 phpinfo 裡面看到以下模組畫面


最後就可能自由的在 EC2 中使用
phalcon 框架了.預祝安裝使用愉快



Share
Tweet
Pin
Share
No 意見
Newer Posts
Older Posts

About me

還在努力掙扎中的工程師

Follow Us

  • Google+
  • facebook
  • twitter

Categories

Accordion Animation AutoComplete CSS Calendar Canvas Carousel Charts Color DatePicker Effects Facebook API Forms Gallery HTML5 Menu Mootools Prototype React images jQuery javascripts lightbox 前端技術 統計圖表 網頁設計

Recent Posts

  • Kalendae 一個不依賴任何框架的日期選擇器
  • Line Developer Day 2018 內部技術與實務分享
  • NCC資安初級認證?只有這 5 款通過
  • AJAX progress bar 非同步傳輸結合 XML 資料回傳
  • jQuery Gantt Chart 在網頁上繪製甘特圖的 jQuery 套件

Sponsor

Facebook

Blog Archive

  • 6月 2025 (36)
  • 4月 2025 (48)
  • 3月 2025 (60)
  • 2月 2025 (51)
  • 1月 2025 (56)
  • 12月 2024 (61)
  • 11月 2024 (60)
  • 10月 2024 (54)
  • 9月 2024 (55)
  • 8月 2024 (42)
  • 7月 2024 (40)
  • 6月 2024 (19)
  • 9月 2023 (3)
  • 4月 2023 (2)
  • 2月 2023 (1)
  • 12月 2021 (1)
  • 1月 2019 (11)
  • 12月 2018 (31)
  • 11月 2018 (31)
  • 10月 2018 (31)
  • 9月 2018 (30)
  • 8月 2018 (31)
  • 7月 2018 (3)
  • 2月 2018 (1)
  • 4月 2015 (1)
  • 9月 2014 (1)
  • 2月 2014 (1)
  • 7月 2013 (1)
  • 2月 2013 (2)
  • 1月 2013 (1)
  • 12月 2012 (12)
  • 11月 2012 (81)
  • 10月 2012 (64)

Created with by ThemeXpose | Distributed by Blogger Templates