OpenResty 1.13.6.2 安装配置(CentOS 7)

Openresty + GeoIP2实现IP归属国家查询 为了实现业务系统针对不同地区IP访问,展示包含不同地区信息的业务交互界面。很多情况下系统需要根据用户访问的IP信息,判断用户可能的访问区域,针对不同的区域提供个性化的服务内容。本方案在CentOS7.x环境下基于高性能的Openresty1.13.6.2来实现。 方案介绍 要通过IP地址确认归属地,通常可以使用一些在线查询服务来实现,比如https://blog.csdn.net/XinTeng2012/article/details/34418117?utm_source=blogxgwz8 介绍的常见提 阅读详情

1. 下载

点我下载 OpenResty 1.13.6.2

2. 安装依赖(CentOS 和 RedHat)

yum install pcre-devel openssl-devel gcc curl

3. 安装 OpenResty

1. 解压缩
# tar -xzvf openresty-VERSION.tar.gz
2. 安装配置(默认--prefix=/usr/local/openresty,[更多配置](http://nginx.org/en/docs/configure.html))
# ./configure
3. 编译
make
4. 安装
make install

4. 启动、停止、重启 OPenResty

语法:nginx -s [signal]
- stop - 快速关机
- quit - 优雅的关机
- reload - 重新加载配置文件
- reopen - 重新打开日志文件
1. 启动
# /usr/local/openresty/nginx/nginx/sbin/nginx
2. 停止
# /usr/local/openresty/nginx/nginx/sbin/nginx -s stop
3. 平滑关闭
# /usr/local/openresty/nginx/nginx/sbin/nginx -s quit
4. 重启
# /usr/local/openresty/nginx/nginx/sbin/nginx -s reload
5. 平滑重启(注意是着重符号,不是单引号)
# kill -HUP `cat /usr/local/openresty/nginx/nginx/logs/nginx.pid`

5. 其它常用命令

1. 检查 nginx 配置是否正确
# /usr/local/openresty/nginx/nginx/sbin/nginx -t
2. 查看 nginx 版本信息
# /usr/local/openresty/nginx/nginx/sbin/nginx -v
3. 查看 nginx 版本和编译信息
# /usr/local/openresty/nginx/nginx/sbin/nginx -V
4. 重新加载 nginx 配置
# /usr/local/openresty/nginx/bin/openresty -s reload
# /usr/local/openresty/nginx/nginx/sbin/nginx -s reload
CentOS下OpenResty安装详解 1.OpenResty是以Nginx为核心,以其他第三方模块组成。包括:Json、Mysql、Redis等组件模块,并且支持Lua语言,运行起来非常高效。安装OpenResty需要有Linux的支持,还需要一些其他编译组件库的支持,如:g++,openssl,pcre。 2.还有一点需要注意:在安装OpenResty时,会解压出一些模块或组件的目录,所以安装前需要规划好安装路径。建议采用下面的路径... 阅读详情

相关推荐

CentOS7下安装openresty、nginx部署静态资源以及反向代理配置

CentOS7下安装openresty和启动nginx部署静态资源和作为反向代理安装步骤1、准备工作2、安装openresty3、启动nginx4、部署静态资源5、nginx作为反向代理 安装步骤 1、准备工作 下载openresty-1.13.6.2.tar.gz 的包 https://openresty.org/cn/download.html 2、安装openresty 2.1、解压这个包 tar -zxvf openresty-1.13.6.2.tar.gz 2.2、进入后执行下面命令 ./co

刘阳洋的博客 1131

openresty/1.13.6.2 tcp代理设置

首先、安装openresty/1.13.6.2 nginx version: openresty/1.13.6.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/soft/openresty/nginx --with-cc-opt=-O2 --add

完颜振江 1604

OpenResty服务部署

一、环境 cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) nginx version:openresty/1.13.6.2 二、OpenResty安装 [root@localhost ~]# yum install yum-fastestmirror #更新源 [root@localhost ~]# yum up...

运维那些事儿 2596

OpenResty安装

openresty-1.13.6.2.tar.gz 测试环境aiqa uname -a 用于打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等) -a或--all:显示全部的信息 Linux 10-10-128-29 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux ...

疯批美人 1589

OpenResty(Nginx+Lua)高并发最佳实践

文章目录OpenResty简介Nginx优点Lua基础学习环境搭建window下环境搭建Linux(CentOS 7)下环境搭建linux下ab性能测试总结优点缺点可适用的场景 OpenResty简介 以下内容来源与OpenResty官网,更多信息可进入官网了解 OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多...

一行Java的博客 3万+

openresty-1.13.6.2.tar.gz下载及openresty安装说明

安装说明: OpenResty目标是让你的Web服务直接跑在 Nginx 服务内部,充分利用 Nginx 的非阻塞 I/O 模型,不仅仅对 HTTP 客户端请求,甚至于对远程后端诸如 MySQL、PostgreSQL、Memcached 以及 Redis 等都进行一致的高性能响应。 安装所需依赖包 yum -y install readline-devel pcre-devel openssl-devel gcc perl curl 解压压缩包 tar zxvf openresty-1.13.6.2.tar.gz 进入文件夹 cd openresty-1.13.6.2 编译 ./configure --prefix=/usr/local/webservice/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module 编译&编译安装 gmake & gmake install 设置php为全局命令: 修改/etc/profile文件使其永久性生效,并对所有系统用户生效, 在文件末尾加上如下两行代码: PATH=$PATH:/usr/local/webservice/openresty/nginx/sbin //php命令路径 如果还要同时加入mysql 则第一句: PATH=$PATH:/usr/local/php/bin:/usr/local/mysql/bin:/usr/local/webservice/openresty/nginx/sbin //路径一定要正确 执行 命令source /etc/profile 使用nginx -t确认

Openresty(Nginx)内网安装,手把手详细教学+附安装包

OpenResty 的核心是扩展了 Nginx 的 nginx-core,通常通过添加各种第三方模块来实现更多的功能,OpenResty 具有Nginx的功能。

BLWY_1124的博客 4816

openresty1.13.6.2

openresty1.13.6.2 官网文件包 直接下载不需要积分

CentOS安装OpenResty(Nginx+Lua)开发环境

一.简介OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。OpenResty® 通过汇聚各种设计精良的 Nginx 模块(主要由 OpenResty 团队自主开发),从而将 Nginx 有效地...

weixin_34066347的博客 1072

openresty-1.13.6.1-win32

openresty 是一个基于 Nginx 与Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发

手把手教你为ArduPilot添加自定义飞行模式:以自动巡检航线为例

本文详细介绍了如何为开源飞控ArduPilot添加自定义飞行模式,并以自动巡检航线为例,提供了从状态机设计、代码实现到地面站集成的完整开发指南。通过七步法手把手教学,帮助开发者深入理解飞控核心逻辑,实现无人机自主执行复杂巡检任务,满足行业应用定制需求。

weixin_29306875的博客 135

安装OpenResty

下载包openresty-1.13.6.2.tar.gz chmod -R 777 openresty-1.13.6.2.tar.gz tar -zxvf openresty-1.13.6.2.tar.gz cd openresty-1.13.6.2/ 预先安装 apt-get install libpcre3-dev\ ...

susuxuezhang的博客 223

DP接口详解:从主链路到AUX通道的完整解析(附常见问题排查)

本文深入解析DP接口的三大核心子系统:主链路的高速数据传输、AUX通道的智能协商以及HPD信号线的即时响应。详细介绍了DP接口的物理层设计要点、链路训练与均衡技术,并提供了常见故障排查指南,帮助工程师解决实际应用中的技术难题。

weixin_30790841的博客 462

Centos7编译安装OpenResty

Openresty官网 https://openresty.org/cn/ 复制代码 下载最新版本 cd /usr/local/src/ wget https://openresty.org/download/openresty-1.13.6.2.tar.gz 复制代码 解压 tar -zxvf openresty-1.13.6.2.tar.gz 复制代码 安装前的准备 yum install ...

weixin_33918114的博客 726

Hyper-V虚拟机 安装 银河麒麟V10桌面版

如何在windows 11 Hyper-V 虚拟机中 安装 银河麒麟V10桌面版。

m0_46756112的博客 3418

Oracle Scheduler任务故障诊断 实战指南

当基础环境无异常时,需聚焦任务本身的配置与状态。定义(JOB)→ 调度(SCHEDULE)→ 执行(SLAVE进程)→ 日志(LOG),每个环节都可能存在卡点。Oracle Scheduler任务的“隐性故障”看似棘手,实则是环境配置、资源竞争、时间逻辑等问题的集中体现。通过本文的诊断工具和排查思路,你可以构建从“基础环境→任务配置→执行链路→日志追踪”的全维度分析体系,让每一个“消失”的任务都无所遁形。

Nuzbb的博客 1073

Centos7 下 Openresty 从安装到入门

官网安装说明 根据官网的描述提供了不同的安装方式,例如:使用yum安装、源码编译安装等等。我目前暂时使用yum安装方式进行部署看看。 设置安装的yum源 你可以在你的 CentOS 系统中添加 openresty 仓库,这样就可以便于未来安装或更新我们的软件包(通过 yum update 命令)。运行下面的命令就可以添加我们的仓库: sudo yum install yum-ut...

蜗牛不会跑 1497

C++(Qt)软件调试---静态分析工具clang-tidy(18)

现在很多人在开发中完全忽略了编译器、IDE的警告提示,这怎么可能写出稳定的程序。 clang-tidy是一个由LLVM项目提供的开源工具,是一个静态分析工具,用于进行静态代码分析和代码质量改进。

mahuifa的博客 5080

全网最详细的Centos7系统里安装Openresty(图文详解)

    不多说,直接上干货! 介绍:    Nginx 采用一个 master 进程管理多个 worker 进程(master-worker)模式,基本的事件处理都在 woker 中,master 负责一些全局初始化,以及对 worker 的管理。在OpenResty中,每个 woker 使用一个 LuaVM,当请求被分配到 woker 时,将在这个 LuaVM 里创建...

weixin_30687587的博客 1673

【云原生技术】sonar的官方web接口,获取质量阀结果的接口

以下是一个示例思路,说明如何调用 SonarQube 的质量阀查询接口并在前端展示“哪些条件没过”。假设前端使用 AJAX 或 fetch 从后端接口拿到 SonarQube 返回的 JSON(或直接前端请求 SonarQube API),前端再把解析结果展示给用户。测试覆盖率 (Coverage) 当前仅有 60%,未满足最低 80% 的要求,需要补充测试或优化以提升覆盖率。接口),就会返回相应的质量阀状态信息;里使用它来查询当前质量阀(质量门)的状态。,你用它即可获取该次分析的质量阀状态。

weixin_46453070的博客 1278

LeRobot 机器人学习(Robot Learning)教程(二)经典机器人学

本文探讨了机器人学中基于学习的方法与传统动力学方法的对比与发展趋势。文章指出,传统方法依赖精确的动力学模型和大量人工调参,面临跨任务泛化能力弱、工程复杂度高、物理建模局限性等问题。随着机器学习技术的进步和机器人数据集的丰富,基于学习的方法展现出三大优势:(1)能够实现跨任务与实体的泛化;(2)降低对人类专业知识的依赖;(3)利用历史数据优化性能。文中以平面机械臂为例,分析了传统逆运动学方法的计算复杂性和环境适应性挑战,并指出基于学习的方案在处理高维感知输入、复杂接触动力学等方面具有明显优势。文章认为,结合物

2506_90492529的博客 1066

CentOS7上OpenResty安装

1,OpenResty安装 通过repl源安装: sudo yum-config-manager --add-repo https://openresty.org/yum/cn/centos/OpenResty.repo sudo yum install openresty 通过rpm包安装: 从https://copr-be.cloud.fedoraproject.org/results...

weixin_30448603的博客 269

YOLO26 vs YOLOv12 vs YOLOv10:工业场景性能实测,速度/精度/部署难度全对比(附完整测试代码)

YOLO26:工业场景全能型选手,无NMS+无DFL设计让部署和推理都省心,小目标精度优势明显,CPU推理速度提升43%,适合大多数生产线场景YOLOv12:中大型目标检测专家,Area Attention在复杂背景下表现出色,适合汽车、家电等大型零部件检测YOLOv10:速度狂魔,GPU上性能领先,轻量化版本适合边缘部署,但小目标精度略逊,适合对实时性要求极高的分拣线场景。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 623

centos7 中编译安装openresty

1.下载openresty wget https://openresty.org/download/openresty-1.13.6.1.tar.gz 2.解压openresty tar zxvf openresty-1.13.6.1.tar.gz 3.安装openresty依赖 yum -y install readline-devel pcre-devel openssl-devel gcc ...

Radioman-lhq的博客 918

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

OpenResty 安装

1.  准备工作安装Centos -7.0操作系统下载openresty 地址:https://openresty.org/download/openresty-1.13.6.2.tar.gz2.  依赖包安装 安装Openresty 之前首先需要安装依赖包pcre-devel openssl-devel readline-devel gcc,安装依赖包在机器可以联网时,我们可以直接采用yum –...

qqLK123的博客 1110

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: springboot *.properties 文件生成随机数
下一篇: nginx 解析静态内容demo
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值