前言
dnf是包管理器,起到很便捷的作用
配置安装
安装dnf包管理器
}# yum -y install epel-release]# yum -y install dnf
dnf安装openresty
dnf -y install wgetwget '/package/centos/openresty.repo'mv openresty.repo /etc/yum.repos.d/dnf check-updatednf -y install openrestywhich openrestyfile `which openresty`openresty -Vsystemctl start openrestysystemctl enable openrestyps aux|grep nginxcurl 127.0.0.1ln -snf /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginxwhich restydnf -y install openresty-restywhich restyresty -e 'print("Hello Resty")'dnf -y install openresty-docrestydoc -s content_by_lua_filednf -y install openresty-opmopm get pintsized/lua-resty-httpls /usr/local/openresty/site/resty -e 'require "resty.http"resty -e 'require "resty.http"'dnf -y install openresty-debugwhich openresty-debugfile `which openresty-debug`dnf list openresty-valgrind openresty-asandnf check-updatednf upgrade 'openresty*'dnf --disablerepo='*' --enablerepo="openresty" list available
结语
在 CentOS 8 上通过 dnf 安装 OpenResty
openresty 官网