安装脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| #!/bin/bash
if command -v openresty &> /dev/null; then echo "OpenResty is already installed." exit fi
sudo apt-get update sudo apt-get install -y curl gnupg2 ca-certificates lsb-release echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list curl -fsSL https://openresty.org/package/pubkey.gpg | sudo apt-key add - sudo apt-get update
sudo apt-get install -y openresty
sudo apt-get install -y openresty-opm echo "OpenResty is now installed."
|