apisix源码安装
这几天一直在尝试将apisix作为k8s的入口网关,期间遇到了一些问题,今天记录下,供后面的人参考,避开雷区:安装etcd安装apisix安装依赖:参考:https://github.com/apache/incubator-apisix/blob/master/doc/install-dependencies.md#centos-7# install epel, `luarocks...
·
安装依赖:
参考:https://github.com/apache/incubator-apisix/blob/master/doc/install-dependencies.md#centos-7
# install epel, `luarocks` need it.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
# add OpenResty source
sudo yum install yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
# install OpenResty, etcd and some compilation tools
sudo yum install -y etcd openresty curl git gcc luarocks lua-devel
# start etcd server
sudo service etcd start
安装apisix
(参考:https://github.com/apache/incubator-apisix/blob/master/doc/how-to-build-cn.md
- 下载apisix安装包:
wget http://www.apache.org/dist/incubator/apisix/1.1/apache-apisix-1.1-incubating-src.tar.gz tar zxvf apache-apisix-1.1-incubating-src.tar.gz
- 安装运行时依赖的 Lua 库:
cd apache-apisix-1.1-incubating make deps
- 将安装文件拷贝到/usr/local/apisix目录下
make install copy -r deps /usr/local/apisix/
安装dashboard
- 下载apisix的dashboard
git clone https://github.com/apache/incubator-apisix-dashboard.git
- 安装yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo sudo yum install yarn
- 安装nodejs
- 下载nodejs:
https://cdn.npm.taobao.org/dist/node/v12.16.1/node-v12.16.1-linux-x64.tar.xz - 解压目录:
tar -xvf node-v12.16.1-linux-x64.tar.xz
- 将目录加入到PATH环境变量中
- build dashboard
git checkout v1.0 yarn && yarn build:prod
- 拷贝dashboard到apisix的安装目录
mkdir -p /usr/local/apisix/dashboard cp -r dist/* /usr/local/apisix/dashboard
- 下载nodejs:
启动apisix并验证
- 启动
apisix start
- 验证
在浏览器中输入http://ip:9080/apisix/dashboard
出现如下页面,证明安装成功
更多推荐
已为社区贡献10条内容
所有评论(0)