MENU

CentOS 源码安装 openresty

October 11, 2019 • linux相关

准备

安装依赖

yum update
yum -y install readline-devel pcre-devel gcc curl perl
yum -y install openssl openssl-devel

安装 openresty

wget https://openresty.org/download/openresty-1.15.8.2.tar.gz
tar -xzvf openresty-1.15.8.2.tar.gz
cd openresty-1.15.8.2
./configure
make
make install

默认自带参数 --prefix=/usr/local/openresty 程序会被安装到 /usr/local/openresty 目录。

检测 & 运行

[root@localhost lor]# openresty
[root@localhost lor]# ps -ef|grep nginx
root       1373      1  0 02:34 ?        00:00:00 nginx: master process openresty
nobody     1374   1373  0 02:34 ?        00:00:00 nginx: worker process
root       1377   1324  0 02:34 pts/0    00:00:00 grep --color=auto nginx
[root@localhost lor]# curl http://localhost
<p>hello, openresty</p>

ok~

安装 lor

  • http://lor.sumory.com/docs/installation-cn

    yum -y install gcc automake autoconf libtool make
    yum install -y git
    git clone https://github.com/sumory/lor
    cd lor
    make install

    新建项目:

    lord new myapp
    cd myapp
    chmod +x ./start.sh
    chmod +x ./stop.sh
    chmod +x ./reload.sh

    浏览器访问 http://ip:8888
    浏览器访问

二进制安装 openresty

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
sudo yum install -y openresty
sudo yum install -y openresty-resty

安装 kodExplorer 在线文件管理

yum -y install wget unzip
wget http://static.kodcloud.com/update/download/kodexplorer4.40.zip
unzip kodexplorer4.40.zip
chmod -Rf 777 ./*

资料

Last Modified: December 20, 2019