x213212
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
![](https://i.imgur.com/ulQwzkj.png) # centos install openresty sudo yum-config-manager --add-repo https://openresty.org/yum/cn/centos/OpenResty.repo sudo yum install openresty yum install readline-devel pcre-devel openssl-devel perl ![](https://i.imgur.com/5ULJ4iA.jpg) 原來改名字了叫做 在 ubuntu 裡面要切換到 nginx... 下指令現在要改成 openresty ... 來下指令 所以下在只要下換成openresty 就可了 # 設置靜態地址 [root@localhost etc]# cd sysconfigg -bash: cd: sysconfigg: No such file or directory [root@localhost etc]# cd sysconfig [root@localhost sysconfig]# cd network-scripts/ [root@localhost network-scripts]# ls -all ![](https://i.imgur.com/NpPFcEd.png) 改成動態的 ![](https://i.imgur.com/QxtM19Q.png) ![](https://i.imgur.com/ZpBrVMS.png) IPADDR=192.168.37.11 NETMASK=255.255.255.0 NM_CONTROLLED=no [root@localhost network-scripts]# systemctl stop network.service [root@localhost network-scripts]# systemctl start network.service 套句大學老師說的沒消息就是好消息 ![](https://i.imgur.com/qmbLf6g.png) ![](https://i.imgur.com/VgL2TE9.png) 可以看到我們這邊已經設為靜態地址 我們來ping 看看 [root@localhost network-scripts]# vim ifcfg-ens33 [root@localhost network-scripts]# systemctl stop network.service [root@localhost network-scripts]# systemctl start network.service [root@localhost network-scripts]# linux ping 外網行得通 , windows ping vm 怎麼不行? 在這邊除了這邊必須要查看,只需要設置為同網段就ping 的到了 ![](https://i.imgur.com/ST7WU0p.png) ![](https://i.imgur.com/Cux9dkz.png) 那我的nginx 設置額外端口 怎麼 ping 的通呢 ,我們只需要添加這行, 不過這是暫時的指令 [root@localhost network-scripts]# iptables -I INPUT -p tcp --dport 6699 -j ACCEPT or 防火牆開啟 https://webcache.googleusercontent.com/search?q=cache:qa96uVpp8b0J:https://blog.csdn.net/zx110503/article/details/78787483+&cd=1&hl=zh-TW&ct=clnk&gl=tw 那麼我們就成功 ping 到我們的 openrestry囉? ![](https://i.imgur.com/FHBUdOF.png) # ubuntu 篇 有些相關指令可以參考下面的 大致上是沒用到 windows 子系統 ![](https://i.imgur.com/GrOcwZx.png) wget https://openresty.org/download/openresty-1.15.8.1.tar.gz wget https://openresty.org/download/openresty-1.15.8.1.tar.gz.asc apt-get install zlib1g-dev apt-get install libgeoip-dev sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential ./configure --prefix=/opt/openresty\ --sbin-path=/usr/sbin/nginx \ --conf-path=/etc/nginx/nginx.conf \ --error-log-path=/var/log/nginx/error.log \ --http-client-body-temp-path=/var/lib/nginx/body \ --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ --http-log-path=/var/log/nginx/access.log \ --http-proxy-temp-path=/var/lib/nginx/proxy \ --http-scgi-temp-path=/var/lib/nginx/scgi \ --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ --lock-path=/var/lock/nginx.lock \ --pid-path=/var/run/nginx.pid \ --with-luajit \ --with-http_dav_module \ --with-http_flv_module \ --with-http_geoip_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_sub_module \ --with-ipv6 \ --with-sha1=/usr/include/openssl \ --with-md5=/usr/include/openssl \ --with-http_stub_status_module \ --with-http_secure_link_module \ --with-http_sub_module \ --with-http_postgres_module lua openresty-test x213212@x213212-PC-w10:~$ nginx -p ~/openresty-test x213212@x213212-PC-w10:~$ ps -ef | grep nginx x213212 75 1 0 15:44 ? 00:00:00 nginx: master process nginx -p /home/x x213212 76 75 0 15:44 ? 00:00:00 nginx: worker process x213212 78 11 0 15:44 tty1 00:00:00 grep --color=auto nginx x213212@x213212-PC-w10:~$ curl http://localhost:6699 -i HTTP/1.1 200 OK Server: openresty/1.15.8.1 Date: Wed, 03 Jul 2019 07:45:10 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive HelloWorld x213212@x213212-PC-w10:~$ ps -ef | grep nginx x213212 75 1 0 15:44 ? 00:00:00 nginx: master process nginx -p /home/x x213212 76 75 0 15:44 ? 00:00:00 nginx: worker process x213212 82 11 0 15:46 tty1 00:00:00 grep --color=auto nginx x213212@x213212-PC-w10:~$ kill -p 75 bash: kill: p: invalid signal specification x213212@x213212-PC-w10:~$ kill -9 75 x213212@x213212-PC-w10:~$ ps -ef | grep nginx x213212 76 1 0 15:44 ? 00:00:00 nginx: worker process x213212 84 11 0 15:46 tty1 00:00:00 grep --color=auto nginx x213212@x213212-PC-w10:~$ kill -9 76 # 安裝壓力測試工具 ab 安装压力测试工具ab yum -y install httpd-tools 压力测试 -c:每次并发数为10个 -n:共发送50000个请求 ab -c10 -n50000 http://localhost:8080/ ![](https://i.imgur.com/VLi8ZNd.png) ![](https://i.imgur.com/8nr5Wtd.png) ![](https://i.imgur.com/KkGG8aA.png) ![](https://i.imgur.com/yrascrh.png) ![](https://i.imgur.com/4MfMPuM.png) http://www.ttlsa.com/nginx/nginx-lua-redis/ https://blog.csdn.net/lk142500/article/details/82778165 https://blog.csdn.net/lk142500/article/details/82778165

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully