最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux系統(tǒng)下如何搭建luarocks環(huán)境

 更新時間:2024年06月19日 11:25:06   作者:longxiaobai_WJ  
這篇文章主要介紹了Linux系統(tǒng)下如何搭建luarocks環(huán)境問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

1. notes

  • 本文中 openresty、git、node 為隨手記錄;
  • 主要搭建 luarocks 環(huán)境,測試實現(xiàn)openresty部分功能;

2. luarocks

  • lua或luajit安裝一個即可
wget https://luarocks.org/releases/luarocks-3.3.1.tar.gz

tar -zxpf luarocks-3.3.1.tar.gz

luarocks -h

luarocks list

luarocks install luafilesystem
# 還可以指定你安裝的包的存放路徑
luarocks install package --tree=path 

3. lua - luarocks

yum install -y readline-devel

# 系統(tǒng)原有l(wèi)ua,通過以下命令查看版本
lua -v

# 安裝同版本或穩(wěn)定版本
wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
tar -zxvf lua-5.1.4.tar.gz

# make linux test
cd lua-5.1.4
echo "INSTALL_TOP= /usr/local/lua_5.1.4" >> Makefile
make linux && make install

cd luarocks-3.3.1
# lua - configure
./configure --prefix=/usr/local/luarocks_3.3.1 --with-lua=/usr/local/lua_5.1.4 --with-lua-include=/usr/local/lua_5.1.4/include/

make && make install

# lua require('cjson')
luarocks install lua-cjson

# Maybe Globals Env Note Settings
export LUALOCKS_HOME=/usr/local/luarocks_3.3.1
export LUA_HOME=/usr/local/lua_5.1.4
export LUA_PATH="$LUALOCKS_HOME/share/lua/5.1/?.lua;?.lua;;"
export LUA_CPATH="$LUALOCKS_HOME/lib/lua/5.1/?.so;?.so;;"

export PATH = $PATH:$HOME/bin:$LUALOCKS_HOME/bin:$LUA_HOME/bin

4. luajit - luarocks

cd luarocks-3.3.1
# luajit - configure
./configure --prefix=/usr/local/luajit/ \
--with-lua=/usr/local/luajit/ \
--lua-suffix=jit \
--with-lua-include=/usr/local/luajit/include/luajit-2.0 \
--rocks-tree=/usr/local/

# --prefix 設(shè)定 luarocks 的安裝目錄
# --with-lua 則是系統(tǒng)中安裝的 lua 的根目錄
# --lua-suffix 版本后綴,此處因為openresyt的lua解釋器使用的是 luajit, 所以此處得寫 jit
# --with-lua-include 設(shè)置 lua 引入一些頭文件頭文件的目錄

make && make install

vim ~/.bashrc 
export LUAJIT_LIB=/usr/local/luajit/lib
export LUAJIT_INC=$LUAJIT_LIB/include/luajit-2.0

ln -s /usr/local/bin/luarocks /usr/bin/luarocks
# 刪除軟連接 
# rm /usr/bin/luarocks

# luajit require('cjson')
luarocks install lua-cjson

5. openresty

# Yum Install
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

yum install -y openresty

# Or 編譯安裝
wget https://openresty.org/download/openresty-1.19.3.1.tar.gz
tar -zxvf openresty-1.19.3.1.tar.gz

# 下載所需插件,如下示例
wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz 
tar -zxvf ngx_cache_purge-2.3.tar.gz # 解壓緩存插件, /usr/local/src/ngx_cache_purge-2.3

# 編譯 OpenResty
./configure --prefix=/usr/local/openresty --with-luajit --without- 
http_redis2_module --with-http_stub_status_module --with-http_v2_module --with- 
http_gzip_static_module --with-http_sub_module \
--add-module=/usr/local/src/ngx_cache_purge-2.3 # 配置緩存插件的源碼路徑

# 安裝 OpenResty
gmake && gmake install

cd luarocks-3.3.1
# luajit - configure, --prefix 為 OpenResty --prefix - luajit
./configure --prefix=/usr/local/openresty/luajit \
--with-lua=/usr/local/openresty/luajit/ \
--lua-suffix=jit \
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1

make
sudo make install

6. git

yum -y install git

7. node

wget https://nodejs.org/dist/v16.19.1/node-v16.19.1-linux-x64.tar.xz
tar -C /usr/local --strip-components 1 -xJf node-v16.19.1-linux-x64.tar.xz

8. openresty conf

./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' \
--with-cc='ccache gcc -fdiagnostics-color=always' \
--with-pcre-jit \
--with-stream \
--with-stream_ssl_module -\
-with-stream_ssl_preread_module \
--with-http_v2_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_secure_link_module \
--with-http_random_index_module \
--with-http_gzip_static_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-threads \
--with-compat \
--with-stream \
--with-http_ssl_module \
--add-module=../ngx_devel_kit-0.3.1 \
--add-module=../echo-nginx-module-0.62 \
--add-module=../xss-nginx-module-0.06 \
--add-module=../ngx_coolkit-0.2 \
--add-module=../set-misc-nginx-module-0.33 \
--add-module=../form-input-nginx-module-0.12 \
--add-module=../encrypted-session-nginx-module-0.09 \
--add-module=../srcache-nginx-module-0.32 \
--add-module=../ngx_lua-0.10.21 \
--add-module=../ngx_lua_upstream-0.07 \
--add-module=../headers-more-nginx-module-0.33 \
--add-module=../array-var-nginx-module-0.05 \
--add-module=../memc-nginx-module-0.19 \
--add-module=../redis2-nginx-module-0.15 \
--add-module=../redis-nginx-module-0.3.9 \
--add-module=../ngx_stream_lua-0.0.11 \

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • 關(guān)于opensips用戶認(rèn)證配置文件 opensips.cfg 使用介紹

    關(guān)于opensips用戶認(rèn)證配置文件 opensips.cfg 使用介紹

    本篇文章小編為大家介紹,關(guān)于opensips用戶認(rèn)證配置文件opensips.cfg使用介紹。需要的朋友參考下
    2013-04-04
  • Linux中FTP賬號無法刪除文件夾的解決方案

    Linux中FTP賬號無法刪除文件夾的解決方案

    本篇文章主要給大家分享了Linux中FTP賬號無法刪除文件夾的解決方案以及原因探索,有興趣的朋友學(xué)習(xí)下吧。
    2018-01-01
  • 通過yum升級CentOS/RHEL最小化安裝的方法

    通過yum升級CentOS/RHEL最小化安裝的方法

    下面小編就為大家?guī)硪黄ㄟ^yum升級CentOS/RHEL最小化安裝的方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2016-12-12
  • CentOS7防火墻和端口相關(guān)命令介紹

    CentOS7防火墻和端口相關(guān)命令介紹

    大家好,本篇文章主要講的是CentOS7防火墻和端口相關(guān)命令介紹,感興趣的同學(xué)趕快來看一看吧,對你有幫助的話記得收藏一下,方便下次瀏覽
    2022-01-01
  • Linux之信號的保存方式

    Linux之信號的保存方式

    這篇文章主要介紹了Linux之信號的保存方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-02-02
  • linux查看服務(wù)器開放的端口和啟用的端口多種方式

    linux查看服務(wù)器開放的端口和啟用的端口多種方式

    Nmap可以掃描網(wǎng)絡(luò)中的處于活動狀態(tài)的主機(jī)、開放端口、操作系統(tǒng)版本和服務(wù)檢測以及執(zhí)行隱匿方式的信息掃描,這篇文章主要介紹了linux查看服務(wù)器開放的端口和啟用的端口五種方式,需要的朋友可以參考下
    2022-08-08
  • Linux 檢測服務(wù)器是否連接著網(wǎng)絡(luò)

    Linux 檢測服務(wù)器是否連接著網(wǎng)絡(luò)

    這篇文章主要介紹了Linux 檢測服務(wù)器是否連接著網(wǎng)絡(luò)的相關(guān)資料,需要的朋友可以參考下
    2017-05-05
  • SSH遠(yuǎn)程登錄和端口轉(zhuǎn)發(fā)詳解

    SSH遠(yuǎn)程登錄和端口轉(zhuǎn)發(fā)詳解

    這篇文章主要介紹了關(guān)于SSH遠(yuǎn)程登錄和端口轉(zhuǎn)發(fā)的相關(guān)資料,文中介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-03-03
  • Nagios的安裝與使用詳細(xì)教程

    Nagios的安裝與使用詳細(xì)教程

    Nagios是一款開源的電腦系統(tǒng)和網(wǎng)絡(luò)監(jiān)視工具,能有效監(jiān)控Windows、Linux和Unix的主機(jī)狀態(tài),交換機(jī)路由器等網(wǎng)絡(luò)設(shè)置,打印機(jī)等,接下來通過本文給大家介紹Nagios的安裝與使用詳細(xì)教程,需要的朋友參考下
    2016-02-02
  • Linux find命令如何根據(jù)時間篩選出文件進(jìn)行刪除

    Linux find命令如何根據(jù)時間篩選出文件進(jìn)行刪除

    這篇文章主要介紹了Linux find命令如何根據(jù)時間篩選出文件進(jìn)行刪除的實現(xiàn)方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2025-07-07

最新評論

贡觉县| 北辰区| 天峻县| 东丰县| 潜江市| 开远市| 会东县| 延安市| 赫章县| 鲁甸县| 大邑县| 新田县| 宜春市| 内江市| 泗阳县| 车险| 广宗县| 安国市| 衡南县| 宁都县| 平度市| 成武县| 岱山县| 青冈县| 西乡县| 汶上县| 买车| 台东县| 辰溪县| 唐山市| 潞西市| 罗定市| 湟中县| 上饶县| 锦州市| 田东县| 大城县| 宁津县| 屏边| 阳新县| 毕节市|