mirror of
https://gitee.com/iresty/apisix.git
synced 2024-11-30 11:07:59 +08:00
feat: Support installation on arch (#5350)
This commit is contained in:
parent
2400cd7bb4
commit
e79bddb19f
@ -44,7 +44,9 @@ title: Install Dependencies
|
||||
|
||||
Run the following command to install Apache APISIX's dependencies on a supported operating system.
|
||||
|
||||
Supported OS versions: CentOS7, Fedora31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Mac OSX
|
||||
Supported OS versions: CentOS7, Fedora31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Arch Linux, Mac OSX
|
||||
|
||||
Note that in the case of Arch Linux, we use `openresty` from the AUR, thus requiring a AUR helper. For now `yay` and `pacaur` are supported.
|
||||
|
||||
```
|
||||
curl https://raw.githubusercontent.com/apache/apisix/master/utils/install-dependencies.sh -sL | bash -
|
||||
|
@ -44,7 +44,9 @@ title: 安装依赖
|
||||
|
||||
在支持的操作系统上运行以下指令即可安装 Apache APISIX dependencies。
|
||||
|
||||
支持的操作系统版本: CentOS 7, Fedora 31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Mac OSX。
|
||||
支持的操作系统版本: CentOS 7, Fedora 31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Arch Linux, Mac OSX。
|
||||
|
||||
注意,对于 Arch Linux 来说,我们使用 AUR 源中的 `openresty`,所以需要 AUR Helper 才能正常安装。目前支持 `yay` 和 `pacaur`。
|
||||
|
||||
```
|
||||
curl https://raw.githubusercontent.com/apache/apisix/master/utils/install-dependencies.sh -sL | bash -
|
||||
|
@ -19,6 +19,29 @@
|
||||
|
||||
set -ex
|
||||
|
||||
function detect_aur_helper() {
|
||||
if [[ $(which yay) ]]; then
|
||||
AUR_HELPER=yay
|
||||
elif [[ $(which pacaur) ]]; then
|
||||
AUR_HELPER=pacaur
|
||||
else
|
||||
echo No available AUR helpers found. Please specify your AUR helper by AUR_HELPER.
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
function install_dependencies_with_aur() {
|
||||
detect_aur_helper
|
||||
$AUR_HELPER -S openresty --noconfirm
|
||||
sudo pacman -S openssl --noconfirm
|
||||
|
||||
export OPENRESTY_PREFIX=/opt/openresty
|
||||
|
||||
sudo mkdir $OPENRESTY_PREFIX/openssl
|
||||
sudo ln -s /usr/include $OPENRESTY_PREFIX/openssl/include
|
||||
sudo ln -s /usr/lib $OPENRESTY_PREFIX/openssl/lib
|
||||
}
|
||||
|
||||
# Install dependencies on centos and fedora
|
||||
function install_dependencies_with_yum() {
|
||||
# add OpenResty source
|
||||
@ -66,6 +89,8 @@ function multi_distro_installation() {
|
||||
install_dependencies_with_apt "debian"
|
||||
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
|
||||
install_dependencies_with_apt "ubuntu"
|
||||
elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
|
||||
install_dependencies_with_aur
|
||||
else
|
||||
echo "Non-supported operating system version"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user