@@ -16,29 +16,15 @@ install_apisix_dependencies_rpm() {
1616
1717install_dependencies_rpm () {
1818 # install basic dependencies
19- yum -y install wget tar gcc automake autoconf libtool make curl git which unzip
19+ yum -y install wget tar gcc automake autoconf libtool make curl git which unzip sudo
2020 yum -y install epel-release
2121 yum install -y yum-utils readline-dev readline-devel
22-
23- # install lua 5.1 for compatible with openresty 1.17.8.2
24- install_lua
2522}
2623
2724install_dependencies_deb () {
2825 # install basic dependencies
2926 DEBIAN_FRONTEND=noninteractive apt-get update
30- DEBIAN_FRONTEND=noninteractive apt-get install -y wget tar gcc automake autoconf libtool make curl git unzip libreadline-dev lsb-release gawk
31-
32- # install lua 5.1 for compatible with openresty 1.17.8.2
33- install_lua
34- }
35-
36- install_lua () {
37- wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
38- tar -zxvf lua-5.1.4.tar.gz
39- cd lua-5.1.4/
40- make linux
41- make install
27+ DEBIAN_FRONTEND=noninteractive apt-get install -y wget tar gcc automake autoconf libtool make curl git unzip sudo libreadline-dev lsb-release gawk
4228}
4329
4430install_openresty_deb () {
@@ -59,18 +45,9 @@ install_openresty_rpm() {
5945}
6046
6147install_luarocks () {
62- # install luarocks
63- wget https://github.com/luarocks/luarocks/archive/v3.8.0.tar.gz
64- tar -xf v3.8.0.tar.gz
65- cd luarocks-3.8.0 || exit
66- ./configure --with-lua=/usr/local --with-lua-include=/usr/local/include > build.log 2>&1 || (cat build.log && exit 1)
67- make build > build.log 2>&1 || (cat build.log && exit 1)
68- make install > build.log 2>&1 || (cat build.log && exit 1)
69- cd .. || exit
70- rm -rf luarocks-3.8.0
71- mkdir ~ /.luarocks || true
72- luarocks config variables.OPENSSL_LIBDIR /usr/local/openresty/openssl111/lib
73- luarocks config variables.OPENSSL_INCDIR /usr/local/openresty/openssl111/include
48+ wget https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh
49+ chmod +x linux-install-luarocks.sh
50+ ./linux-install-luarocks.sh
7451}
7552
7653install_etcd () {
@@ -202,9 +179,6 @@ install_dashboard_dependencies_deb)
202179install_dashboard)
203180 install_dashboard
204181 ;;
205- install_lua)
206- install_lua
207- ;;
208182install_luarocks)
209183 install_luarocks
210184 ;;
0 commit comments