Crazy maker culture circle Java [one hundred million concurrent high flow chat room] actual combat series [ blog park entrance total ]
Architect interview growth + high concurrency essential foundation books [ Netty Zookeeper Redis high concurrency combat ]
Foreword
Crazy-SpringCloud micro scaffolding services & video introduction :
Crazy-SpringCloud micro scaffolding services, is ready for the Java Micro Services Developer beginners to learn and develop scaffolding. And it is equipped with a series of tutorials and videos, as follows:
High concurrency environment to build graphic tutorial and demo videos, one after another on-line:
Middleware | link address |
---|---|
Linux Redis installed (with video) | Linux Redis installed (with video) |
Linux Zookeeper installation (with video) | Linux Zookeeper installation with video |
Windows Redis installed (with video) | Windows Redis installed (with video) |
RabbitMQ offline installation (video tape) | RabbitMQ offline installation (video tape) |
ElasticSearch installation with video | ElasticSearch installation with video |
Nacos installation (video tape) | Nacos installation (video tape) |
Crazy maker culture circle classic books: "Netty Zookeeper Redis high concurrency real" must-interview + interview + interview essential prerequisite
1 windows openresty major command
Considering the ease of operation, it has proposed the establishment of a bat file into the system directory.
Bat script file is as follows, has been through many times use.
openresty startup script
openresty 启动: openresty-start.bat
@echo off
set flag=0
set installPath="E:\tool\openresty-1.15.8.2-win64"
set configPath="E:\tool\openresty-1.15.8.2-win64"
tasklist|find /i "nginx.exe" > nul
if %errorlevel%==0 (
echo "openresty/nginx already running ! "
exit /b
) else set flag=1
cd /d %installPath%
if %flag%==1 (
start nginx.exe -p %configPath%
ping localhost -n 2 > nul
)
tasklist /fi "imagename eq nginx.exe"
tasklist|find /i "nginx.exe" > nul
if %errorlevel%==0 (
echo "openresty/nginx starting succeced!"
)
The main changes:
1: installPath for the installation directory;
2: configPath to include web project directory nignx configuration path / config and other paths. Default and the same can be installPath.
openresty stop script
openresty startup script openresty-stop.bat
@echo off
tasklist|find /i "nginx.exe" > nul
if %errorlevel%==0 (
taskkill /f /t /im nginx.exe > nul
echo "openresty/nginx stoped!"
)else echo "openresty/nginx not running!"
Examples performed are as follows:
openresty state script
openresty-status.bat
@echo off
tasklist|find /i "nginx.exe" > nul
if %errorlevel%==0 (
tasklist /fi "imagename eq nginx.exe"
echo "openresty/nginx is running!"
exit /b
) else echo "openresty/nginx is stoped!"
openresty 重启脚本
openresty-restart.bat
@echo off
call openresty-stop.bat
call openresty-start.bat
可以提前从疯狂创客圈的网盘,下载以上的脚本。
2 windows openresty 的安装
前面提到,OpenResty 的依赖库有: perl 5.6.1+, libreadline, libpcre, libssl。
2.1 下载安装 openresty
打开openresty的中文官网,下载网站为:http://openresty.org/cn/download.html 。具体如下图
下载合适的版本, 然后解压即可。
解压到要安装的目录,这里我选择e:/tool目录,你可以根据自己的喜好选择位置。
使用 openresty-start.bat 启动,然后,在浏览器的地址栏输入 http://localhost:80/,理论上,会有 nginx 的欢迎页面。
但是,也有可能启动失败,如下图:
在浏览器的地址栏输入 localhost,加载 nginx 的欢迎页面。成功加载说明 nginx 正在运行。如下图:
可能的原因是,缺少依赖包。
2.2:需要安装 perl
前面提到,OpenResty 的依赖库有: perl 5.6.1+, libreadline, libpcre, libssl。
首先要安装Perl。 Perl 是 Practical Extraction and Report Language 的缩写,可翻译为 "实用报表提取语言"。Perl 是高级、通用、直译式、动态的程序语言。
如果没有安装perl,启动会报如下错误:
PS E:\tool\openresty-1.15.8.2-win64\conf> resty.bat
'perl' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
You do not have Perl in your PATH.
PS E:\tool\openresty-1.15.8.2-win64\conf>
打开浏览器在搜索栏里面输入: http://strawberryperl.com/ 进入到 perl 官网进行下
双击打开下载好的 perl安装文件,安装到自己喜欢的目录。这里使用了 e:/tool
使用快捷键 win + r 打开 windows 应用程序, 输入 cmd 来查看是否安装成功
In which enter cmd: perl -version View installed version
PS E:\tool\openresty-1.15.8.2-win64\conf> perl -version
This is perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x64-multi-thread
Copyright 1987-2019, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Note: If you can not already open before installing the cmd window, after installation, you need to open a new window cmd
3 officially launched openresty
3.1 modify the script and start
Openresty talked about earlier start: openresty-start.bat
Modify the path in which to install their own path, and then start
Script, the tasklist /fi "imagename eq nginx.exe"
output nginx process, one of which is the master process, the other is a worker process
View 3.2 browser interface
Go to http input in the browser address bar: // localhost: 80 /, you can see the results after a successful start:
In particular, please pay attention to Java concurrency high learning community [ blog park entrance total ]
Finally, tell us about the crazy maker culture circle: Crazy maker culture circle, a highly concurrent Java learning community [ blog park entrance total ]
Crazy maker culture circle, a commitment to delivering: interview + interview must-must-must-interview + base + actual principle books " Netty Zookeeper Redis combat high concurrency "
Crazy maker culture circles Java Sike series
Java (Netty) chat program [traffic] one hundred million real open source project combat
- Netty source, principle, JAVA NIO principle
Java questions face clean sweep
Crazy maker culture circle [blog] Park entrance total
gvMTQ4NTM5OC0yMDE5MDgyMjIyNTE1NjQyNy05NTY0MjQxMjQuanBn? X-oss-process = image / format, png)