国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術文章
文章詳情頁

強大的 Web 應?服務器OpenResty安裝(Nginx倉庫)

瀏覽:11日期:2023-08-03 20:13:38

OpenResty(?稱:ngx_openresty) 是一個基于 NGINX 的可伸縮的 Web 平臺,OpenResty 是?個強大的 Web 應?服務器,Web 開發?員可以使用 Lua 腳本語?調動 Nginx ?持的各種 C 以及 Lua 模塊,更主要的是在性能方面,OpenResty可以快速構造出足以勝任 10K 以上并發連接響應的超高性能 Web 應用系統

OpenResty® 是一個基于 Nginx 與 Lua 的高性能 Web 平臺,其內部集成了大量精良的 Lua 庫、第三方模塊以及大多數的依賴項。用于方便地搭建能夠處理超高并發、擴展性極高的動態 Web 應用、Web 服務和動態網關。

OpenResty® 通過匯聚各種設計精良的 Nginx 模塊(主要由 OpenResty 團隊自主開發),從而將 Nginx 有效地變成一個強大的通用 Web 應用平臺。這樣,Web 開發人員和系統工程師可以使用 Lua 腳本語言調動 Nginx 支持的各種 C 以及 Lua 模塊,快速構造出足以勝任 10K 乃至 1000K 以上單機并發連接的高性能 Web 應用系統。

OpenResty® 的目標是讓你的Web服務直接跑在 Nginx 服務內部,充分利用 Nginx 的非阻塞 I/O 模型,不僅僅對 HTTP 客戶端請求,甚至于對遠程后端諸如 MySQL、PostgreSQL、Memcached 以及 Redis 等都進行一致的高性能響應。

OpenResty中?官網: http://openresty.org/cn/

windows版安裝

1.運??個Hello World

在任意?個地?新建?個?件夾(注意最好不要有中?路徑)。例如:在桌面新建?個 example 文件夾, ?錄結構如下 (?錄樹生成網站 http://dir.yardtea.cc/)

2.其中logs和conf是必要的,?面的?件可以新建空文件。

3.打開nginx.conf如?配置:

worker_processes 1;error_log logs/error.log;events { worker_connections 1024;}http { server {listen 9000;default_type text/html;location / { root /data/html; index kbn.html;}} }

4.啟動nginx

nginx -p /bin -c conf/nginx.conf或 cd /var/nginx/bin目錄使用 nginx -c conf/nginx.conf如果啟動報錯 resty.core 找不到, 就把nginx安裝目錄中的lua,luaLib 兩個?件夾復制到project ?面去

5.修改配置之后使? ./nginx -s reload 重啟

停?./nginx -s stop

ConterOS 安裝 OpenResty

下載地址:OpenResty官?: http://openresty.org/OpenResty下載地址:http://openresty.org/cn/download.html

安裝依賴庫:$ yum install -y pcre-devel openssl-devel gcc curl

2.下載OpenResty版本:

$ wget https://openresty.org/download/openresty-1.15.8.1.tar.gzwget https://openresty.org/download/openresty-1.21.4.1.tar.gz解壓: $ tar -xzvf openresty-1.15.8.1.tar.gz進?解壓?目錄:$ cd openresty-1.15.8.1/檢查配置環境, ?成 Makefile,默認安裝到/usr/local/openresty:$ ./configure編譯安裝:$ gmake && gmake install

安裝結果:

mkdir -p /usr/local/openresty/site/lualib /usr/local/openresty/site/pod /usr/local/openresty/site/manifestln -sf /usr/local/openresty/nginx/sbin/nginx /usr/local/openresty/bin/openresty

可以看到openresty 實際上是nginx的軟連接。7.常用命令:

查看版本號:$ /usr/local/openresty/bin/openresty -v nginx version: openresty/1.15.8.3檢驗配置/usr/local/openresty/bin/openresty -t啟動/usr/local/openresty/bin/openresty停?/usr/local/openresty/bin/openresty -s stop重新加載配置/usr/local/openresty/bin/openresty -s reload配置/lib/systemd/system/openresty.service,通過systemctl啟動:[Unit]Description=openresty - high performance web serverAfter=network.target remote-fs.target nss-lookup.target[Service]Type=forkingExecStart=/usr/local/openresty/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.confExecReload=/usr/local/openresty/bin/openresty -s reloadExecStop=/usr/local/openresty/bin/openresty -s stop[Install]WantedBy=multi-user.target

9.添加openresty.service后,使配置文件生效:

$ systemctl daemon-reload

10.使用systemctl管理openresty:

啟動$ systemctl start openresty停?$ systemctl stop openresty重載配置$ systemctl reload openresty重啟$ systemctl restart openresty

到此這篇關于強大的 Web 應?服務器OpenResty安裝(Nginx倉庫) 的文章就介紹到這了,更多相關安裝OpenResty內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: Nginx
相關文章:
主站蜘蛛池模板: 成人毛片免费观看视频在线 | 免费一级毛片在线播放不收费 | 成人做爰视频www网站 | 亚洲精品不卡在线 | 亚洲欧美日韩高清在线看 | 99国产在线| 美国全免费特一级毛片 | 国产香蕉在线视频一级毛片 | 综合亚洲精品一区二区三区 | 日本韩国欧美在线观看 | 欧美性猛交xxxxx按摩国内 | 老司机亚洲精品 | 久久久久国产成人精品亚洲午夜 | 成年人看的免费视频 | 国产成人91一区二区三区 | 99久久精品国产一区二区小说 | 538prom精品视频在放免费 | 亚洲欧美日韩精品久久 | 欧美 亚洲 另类 自拍 在线 | 成人在线播放视频 | 国产成人精品男人免费 | 国产一级特黄一级毛片 | 色一欲一性一乱一区二区三区 | 国产a级特黄的片子视频免费 | 国产成人精品一区二区秒拍 | 欧美在线一级精品 | 一级特黄aaa大片免费看 | 成人国产精品免费软件 | 亚洲一区二区中文字幕 | 91久久香蕉国产线看 | 久久99国产精一区二区三区! | 日韩精品亚洲一级在线观看 | 欧美视频在线观看网站 | 牛牛本精品99久久精品88m | 欧美一级毛片100部 欧美一级毛片aaaaa | 婷婷色九月综合激情丁香 | 国产视频中文字幕 | 免费一级在线观看 | 色综合日韩 | 91精品国产免费久久久久久 | 欧美精品hdxxxxx |