Installation under Linux OpenResty

Download the installation package

1, upload it to the destination folder

Available finalshell, xshell tools such as drag and drop upload

2, extract

tar -xzvf openresty-VERSION.tar.gz

3, compile and install

  • You need to install the development libraries
    sudo yum install -y readline-devel pcre-devel openssl-devel perl gcc

installation

cd openresty-VERSION/
./configure --prefix=目标路径 --with-http_stub_status_module    
make && make install

4, the test

  • View
[hadoop@slave1 ~]$ lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio    	//centenos7自带lua
[hadoop@slave1 nginx]$ sudo ./sbin/nginx    					//启动ngix
[hadoop@slave1 sbin]$ ps -ef | grep ngix							//查看
hadoop   113711 111681  0 00:10 pts/0    00:00:00 grep --color=auto ngix
  • Configuration information, if the port is occupied, you can set other
    Here Insert Picture Description
  • Access
    Host IP: 80
    Success follows
    Here Insert Picture Description
Published 15 original articles · won praise 0 · Views 67

Guess you like

Origin blog.csdn.net/weixin_41611450/article/details/104508585