OpenrestyインストールとHello World
一、Openresty紹介
OpenRestyはNginxとLuaに基づく高性能Webプラットフォームであり、多くの優れたLuaライブラリ、サードパーティモジュールなどを統合している.
10 Kから1000 Kまでのシングルマシン同時接続に対応した高性能Webアプリケーションシステムを迅速に構築
二、Openrestyのインストール
最新のインストールパッケージが見つかりましたhttps://openresty.org/cn/download.html例えば、openresty-1.13.6.2.tar.gz
三、Hello World DEMO
新しいフォルダworkを作成し、logs/conf/サブフォルダを作成します.
保存後
四、Hello World確認Openrestyインストール成功
OpenRestyはNginxとLuaに基づく高性能Webプラットフォームであり、多くの優れたLuaライブラリ、サードパーティモジュールなどを統合している.
10 Kから1000 Kまでのシングルマシン同時接続に対応した高性能Webアプリケーションシステムを迅速に構築
二、Openrestyのインストール
最新のインストールパッケージが見つかりましたhttps://openresty.org/cn/download.html例えば、openresty-1.13.6.2.tar.gz
tar -xzvf openresty-VERSION.tar.gz
cd openresty-VERSION/
./configure --with-luajit \
--with-http_iconv_module \
make && make install
三、Hello World DEMO
新しいフォルダworkを作成し、logs/conf/サブフォルダを作成します.
vim conf/nginx.conf
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location / {
default_type text/html;
content_by_lua '
ngx.say("hello, world
")
';
}
}
}
保存後
cd /usr/local/openresty/nginx/sbin
./nginx -c /root/work/conf/nginx.conf
四、Hello World確認Openrestyインストール成功
curl http://localhost:8080/
# hello
openresty