OpenResty安裝(高性能web服務器)

OpenResty
參考資料:

默認安裝路徑如下/usr/local/openresty/
OpenResty,也被稱爲“ngx_openresty”,是一個基於Nginx的核心Web應用程序服務器,它包含了大量的第三方的Nginx模塊和大部分系統依賴包。 OpenResty不是Nginx的分支,它只是一個軟件包。主要有章亦春維護。
OpenResty允許開發人員使用lua編程語言構建現有的Nginx的C模塊,支持高流量的應用程序。
安裝OpenResty
依賴的軟件包:
  • perl 5.6.1+
  • libreadline
  • libpcre
  • libssl
Debian 和 Ubuntu系統:
1 apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
Fedora 、RedHat 和 centos系統:
1 yum install readline-devel pcre-devel openssl-devel gc-c++
1 wget http://openresty.org/download/ngx_openresty-1.5.8.1.tar.gz.

解壓、編譯、安裝:
1
2
3
4
5
tar xzvf ngx_openresty-1.5.8.1.tar.gz
cd ngx_openresty-1.5.8.1/
./configure --with-luajit
make
make install
另外的配置選項:
1
2
3
4
5
6
7
./configure --prefix=/opt/openresty
--with-luajit
--without-http_redis2_module
--with-http_iconv_module
--with-http_postgres_module
-j2
--help to see more options

此時安裝完成,打開localhost就可以看到nginx頁面了。






個人學習筆記,不當之處還請指正。
----------不定期更新------------






























發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章