第一步:进入opresty目录
[root@node03 openresty]# cd /export/servers/openresty/[root@node03 openresty]# lltotal 356drwxr-xr-x 2 root root 4096 Jul 26 11:33 bindrwxrwxr-x 44 1000 1000 4096 Jul 26 11:31 builddrwxrwxr-x 43 1000 1000 4096 Nov 13 2017 bundle-rwxrwxr-x 1 1000 1000 45908 Nov 13 2017 configure-rw-rw-r-- 1 1000 1000 22924 Nov 13 2017 COPYRIGHTdrwxr-xr-x 6 root root 4096 Jul 26 11:33 luajitdrwxr-xr-x 6 root root 4096 Aug 1 08:14 lualib-rw-r--r-- 1 root root 5413 Jul 26 11:32 Makefiledrwxr-xr-x 11 root root 4096 Jul 26 11:35 nginxdrwxrwxr-x 2 1000 1000 4096 Nov 13 2017 patchesdrwxr-xr-x 44 root root 4096 Jul 26 11:33 pod-rw-rw-r-- 1 1000 1000 3689 Nov 13 2017 README.markdown-rw-rw-r-- 1 1000 1000 8690 Nov 13 2017 README-win32.txt-rw-r--r-- 1 root root 218352 Jul 26 11:33 resty.indexdrwxr-xr-x 5 root root 4096 Jul 26 11:33 sitedrwxr-xr-x 2 root root 4096 Aug 1 10:54 testluadrwxrwxr-x 2 1000 1000 4096 Nov 13 2017 util[root@node03 openresty]#
说明:接下来我们关注两个目录 lualib 和 nginx
1.lualib: 是存放opresty所需要的集成软件包的
2.nginx: 是nginx服务目录
接下来,我们进入lualib目录一看究竟:
[root@node03 openresty]# cd lualib/[root@node03 lualib]# lltotal 116-rwxr-xr-x 1 root root 101809 Jul 26 11:33 cjson.sodrwxr-xr-x 3 root root 4096 Jul 26 11:33 ngxdrwxr-xr-x 2 root root 4096 Jul 26 11:33 rdsdrwxr-xr-x 2 root root 4096 Jul 26 11:33 redisdrwxr-xr-x 9 root root 4096 Aug 1 10:34 resty
这里我们看到了redis和ngx集成软件包,说明我们可以之间使用nginx和redis而无需导入任何依赖包!!!!
下面看看resty里面有些说明呢????
[root@node03 lualib]# cd resty/[root@node03 resty]# lltotal 152-rw-r--r-- 1 root root 6409 Jul 26 11:33 aes.luadrwxr-xr-x 2 root root 4096 Jul 26 11:33 core-rw-r--r-- 1 root root 596 Jul 26 11:33 core.luadrwxr-xr-x 2 root root 4096 Jul 26 11:33 dnsdrwxr-xr-x 2 root root 4096 Aug 1 10:42 kafka #这是我们自己导入的drwxr-xr-x 2 root root 4096 Jul 26 11:33 limit-rw-r--r-- 1 root root 4616 Jul 26 11:33 lock.luadrwxr-xr-x 2 root root 4096 Jul 26 11:33 lrucache-rw-r--r-- 1 root root 4620 Jul 26 11:33 lrucache.lua-rw-r--r-- 1 root root 1211 Jul 26 11:33 md5.lua-rw-r--r-- 1 root root 14544 Jul 26 11:33 memcached.lua-rw-r--r-- 1 root root 21577 Jul 26 11:33 mysql.lua-rw-r--r-- 1 root root 616 Jul 26 11:33 random.lua-rw-r--r-- 1 root root 9227 Jul 26 11:33 redis.lua-rw-r--r-- 1 root root 1192 Jul 26 11:33 sha1.lua-rw-r--r-- 1 root root 1045 Jul 26 11:33 sha224.lua-rw-r--r-- 1 root root 1221 Jul 26 11:33 sha256.lua-rw-r--r-- 1 root root 1045 Jul 26 11:33 sha384.lua-rw-r--r-- 1 root root 1359 Jul 26 11:33 sha512.lua-rw-r--r-- 1 root root 236 Jul 26 11:33 sha.lua-rw-r--r-- 1 root root 698 Jul 26 11:33 string.lua-rw-r--r-- 1 root root 5178 Jul 26 11:33 upload.luadrwxr-xr-x 2 root root 4096 Jul 26 11:33 upstreamdrwxr-xr-x 2 root root 406 Jul 26 11:33 websocket
新闻热点
疑难解答