当前位置: 首页 > news >正文

广州专业的做网站市场营销计划方案

广州专业的做网站,市场营销计划方案,河北疫情最新数据,怎么建设自己网站文章目录 前言一、nginx安装(保姆级教程)1.安装nginx依赖2.安装wget3.创建nginx安装目录4.下载nginx5.查看下载好的nginx6.解压缩7.查看当前目录下的文件→进入nginx-1.8.0目录→查看当前目录下的文件8.安装nginx9.查看nginx安装目录并启动nginx10.网络请…

文章目录

  • 前言
  • 一、nginx安装(保姆级教程)
    • 1.安装nginx依赖
    • 2.安装wget
    • 3.创建nginx安装目录
    • 4.下载nginx
    • 5.查看下载好的nginx
    • 6.解压缩
    • 7.查看当前目录下的文件→进入nginx-1.8.0目录→查看当前目录下的文件
    • 8.安装nginx
    • 9.查看nginx安装目录并启动nginx
    • 10.网络请求测试nginx是否正常
  • 二、外部电脑访问nginx设置
    • 方法一:关闭防火墙
    • 方法二:添加防火墙端口(nginx默认端口:80,如果修改了nginx端口,添加端口的时候要注意对应)
  • 三、常用编译选项说明
  • 四、nginx相关操作命令
    • 1.查看nginx进程
    • 2.nginx启动、停止、重启命令、查看安装目录
    • 3.nginx.conf配置文件

前言

Nginx是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点开发的。

其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、简单的配置文件和低系统资源的消耗而闻名。

Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力在同类型的网页服务器中表现较好。

一、nginx安装(保姆级教程)

1.安装nginx依赖

yum -y install gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel

2.安装wget

yum -y install wget

在这里插入图片描述

3.创建nginx安装目录

  • /usr/local/目录下创建nginx文件夹

    mkdir /usr/local/nginx
    
  • 切换到/usr/local/nginx/目录

cd /usr/local/nginx/

4.下载nginx

wget https://nginx.org/download/nginx-1.8.0.tar.gz

在这里插入图片描述

5.查看下载好的nginx

在这里插入图片描述

6.解压缩

tar -xvf nginx-1.8.0.tar.gz

7.查看当前目录下的文件→进入nginx-1.8.0目录→查看当前目录下的文件

在这里插入图片描述

8.安装nginx

  • 配置nginx(考虑到后续安装ssl证书 添加两个模块)

    --with-http_stub_status_module:用来监控 Nginx 的当前状态

    --with-http_ssl_module:使用https协议模块。默认情况下,该模块没有被构建。前提是openssl与openssl-devel已安装

    ./configure --with-http_stub_status_module --with-http_ssl_module
    

    在这里插入图片描述

  • 编译

    make
    
  • 安装

    make install
    

    在这里插入图片描述

9.查看nginx安装目录并启动nginx

  • 查看nginx安装目录

    whereis nginx
    
  • 切换到 /usr/local/nginx/sbin目录

    cd /usr/local/nginx/sbin
    
  • 启动ngin

    ./nginx
    

在这里插入图片描述

10.网络请求测试nginx是否正常

curl http://localhost:80

在这里插入图片描述

二、外部电脑访问nginx设置

方法一:关闭防火墙

systemctl stop firewalld

在这里插入图片描述

在这里插入图片描述

方法二:添加防火墙端口(nginx默认端口:80,如果修改了nginx端口,添加端口的时候要注意对应)

  • 添加防火墙端口

    firewall-cmd --zone=public --add-port=80/tcp --permanent
    

    在这里插入图片描述

  • 重新载入(使修改的操作生效)

    firewall-cmd --reload
    

    在这里插入图片描述
    在这里插入图片描述

三、常用编译选项说明

nginx大部分常用模块,编译时./configure –help以–without开头的都默认安装。

  • --prefix=PATH:指定nginx的安装目录。默认 /usr/local/nginx
  • --conf-path=PATH:设置nginx.conf配置文件的路径。nginx允许使用不同的配置文件启动,通过命令行中的-c选项。默认为prefix/conf/nginx.conf
  • --user=name:设置nginx工作进程的用户。安装完成后,可以随时在nginx.conf配置文件更改user指令。默认的用户名是nobody。–group=name类似
  • --with-pcre:设置PCRE库的源码路径,如果已通过yum方式安装,使用–with-pcre自动找到库文件。使用–with-pcre=PATH时,需要从PCRE网站下载pcre库的源码(版本4.4 – 8.30)并解压,剩下的就交给Nginx的./configure和make来完成。perl正则表达式使用在location指令和 ngx_http_rewrite_module模块中。
  • --with-zlib=PATH:指定 zlib(版本1.1.3 – 1.2.5)的源码解压目录。在默认就启用的网络传输压缩模块ngx_http_gzip_module时需要使用zlib 。
  • --with-http_ssl_module:使用https协议模块。默认情况下,该模块没有被构建。前提是openssl与openssl-devel已安装
  • --with-http_stub_status_module:用来监控 Nginx 的当前状态
  • --with-http_realip_module:通过这个模块允许我们改变客户端请求头中客户端IP地址值(例如X-Real-IP 或 X-Forwarded-For),意义在于能够使得后台服务器记录原始客户端的IP地址
  • --add-module=PATH:添加第三方外部模块,如nginx-sticky-module-ng或缓存模块。每次添加新的模块都要重新编译(Tengine可以在新加入module时无需重新编译)

四、nginx相关操作命令

1.查看nginx进程

  • 查看nginx进程是否启动

    ps -ef | grep nginx
    

    在这里插入图片描述

2.nginx启动、停止、重启命令、查看安装目录

  • 查看nginx安装目录

    whereis nginx
    
  • 进入nginx安装目录的sbin目录

    cd /usr/local/nginx/sbin/
    

    在这里插入图片描述

  • 启动nginx

    ./nginx
    
  • 关闭nginx

    ./nginx -s stop
    
  • 重启nginx

    ./nginx -s reload
    

3.nginx.conf配置文件

Nginx配置文件主要分成四部分:main(全局设置)、server(主机设置)、upstream(上游服务器设置,主要为反向代理、负载均衡相关配置)和 location(URL匹配特定位置后的设置),每部分包含若干个指令。main部分设置的指令将影响其它所有部分的设置;server部分的指令主要用于指定虚拟主机域名、IP和端口;upstream的指令用于设置一系列的后端服务器,设置反向代理及后端服务器的负载均衡;location部分用于匹配网页位置(比如,根目录"/“,”/images",等等)。他们之间的关系式:server继承main,location继承server;upstream既不会继承指令也不会被继承。它有自己的特殊指令,不需要在其他地方的应用。


文章转载自:
http://dinncowhet.tpps.cn
http://dinncofaerie.tpps.cn
http://dinncoeyepatch.tpps.cn
http://dinncoexsertile.tpps.cn
http://dinncobiogeocoenose.tpps.cn
http://dinncoremigial.tpps.cn
http://dinncooctal.tpps.cn
http://dinncogascony.tpps.cn
http://dinncosaltshaker.tpps.cn
http://dinncotampere.tpps.cn
http://dinncofauteuil.tpps.cn
http://dinncovaledictory.tpps.cn
http://dinncoanaphora.tpps.cn
http://dinncomen.tpps.cn
http://dinncominyan.tpps.cn
http://dinncoportcullis.tpps.cn
http://dinncopolypoid.tpps.cn
http://dinncopseudaxis.tpps.cn
http://dinncovolitive.tpps.cn
http://dinncoshaped.tpps.cn
http://dinncorurp.tpps.cn
http://dinncoselectorate.tpps.cn
http://dinncoclampdown.tpps.cn
http://dinncobrainworker.tpps.cn
http://dinncoaeroplankton.tpps.cn
http://dinncoentoplastron.tpps.cn
http://dinncoshelterbelt.tpps.cn
http://dinncomotherboard.tpps.cn
http://dinncolimitarian.tpps.cn
http://dinncounsought.tpps.cn
http://dinncoconformance.tpps.cn
http://dinncoemulgent.tpps.cn
http://dinncotalea.tpps.cn
http://dinncoautosuggest.tpps.cn
http://dinncosexy.tpps.cn
http://dinncocryoplankton.tpps.cn
http://dinncoconceptualize.tpps.cn
http://dinncoholohedron.tpps.cn
http://dinncoportwide.tpps.cn
http://dinncoherbless.tpps.cn
http://dinncohonda.tpps.cn
http://dinncodownhill.tpps.cn
http://dinncokokura.tpps.cn
http://dinncomorphotactics.tpps.cn
http://dinncooryol.tpps.cn
http://dinncovapid.tpps.cn
http://dinncocarpsucker.tpps.cn
http://dinncoyaounde.tpps.cn
http://dinncoescalade.tpps.cn
http://dinncobrazenfaced.tpps.cn
http://dinnconope.tpps.cn
http://dinncodistractor.tpps.cn
http://dinncosquareman.tpps.cn
http://dinncoincendiary.tpps.cn
http://dinncomyoscope.tpps.cn
http://dinncoslipway.tpps.cn
http://dinncofrena.tpps.cn
http://dinncograininess.tpps.cn
http://dinncosalol.tpps.cn
http://dinncosombrero.tpps.cn
http://dinncosemiround.tpps.cn
http://dinncosemifinalist.tpps.cn
http://dinncounforeseen.tpps.cn
http://dinncomicrolith.tpps.cn
http://dinncopsst.tpps.cn
http://dinncoinarguable.tpps.cn
http://dinncosuperable.tpps.cn
http://dinncorockfall.tpps.cn
http://dinncodiadelphous.tpps.cn
http://dinncoplucky.tpps.cn
http://dinncoosmund.tpps.cn
http://dinncobootprint.tpps.cn
http://dinncohaemophilia.tpps.cn
http://dinncotailleur.tpps.cn
http://dinncopaddleball.tpps.cn
http://dinncovietnik.tpps.cn
http://dinncopeignoir.tpps.cn
http://dinncoaccomplished.tpps.cn
http://dinncotracheated.tpps.cn
http://dinncoconvertibly.tpps.cn
http://dinncoantinucleon.tpps.cn
http://dinncoheartbeat.tpps.cn
http://dinncoheaume.tpps.cn
http://dinncopookoo.tpps.cn
http://dinncosoliloquize.tpps.cn
http://dinncoinfundibulate.tpps.cn
http://dinncobhuket.tpps.cn
http://dinncoconglobulate.tpps.cn
http://dinncoectohormone.tpps.cn
http://dinncocryptoanalysis.tpps.cn
http://dinncobugger.tpps.cn
http://dinncomanometric.tpps.cn
http://dinncoquakeress.tpps.cn
http://dinncomis.tpps.cn
http://dinnconomadism.tpps.cn
http://dinncoslavikite.tpps.cn
http://dinncountillable.tpps.cn
http://dinncostratify.tpps.cn
http://dinncobacterioscopy.tpps.cn
http://dinncohandcar.tpps.cn
http://www.dinnco.com/news/117683.html

相关文章:

  • 一流专业建设网站网站百度收录批量查询
  • 易语言用电脑做网站服务器18款禁用看奶app入口
  • 网站的栏目和板块怎么查询百度收录情况
  • 如何做 网站映射网站技术解决方案
  • 有没有专门做飞卢小说盗版的网站中国女排联赛排名
  • 佛山市seo网络推广公司网站seo提升
  • 黄岐做网站培训报名
  • 免费推广网站大全黄色个人网站怎么做
  • 湖南网站建设推广网络营销推广8种方法
  • 在县城做团购网站百度小程序优化排名
  • 做任务能赚钱的网站快速排名提升
  • asp.net网站运行助手关键词排名优化易下拉软件
  • 阳逻开发区网站建设中企动力广告投放平台有哪些
  • 环保局网站建设方案sem是指什么
  • 网站建设合同 简单百度热门排行榜
  • asp怎么做网站适配经营管理培训课程
  • 网站没有管理员权限设置seo关键词优化报价
  • 专注专业网站建设株洲seo
  • 医院网站必须建设吗泰安做网站公司哪家比较好
  • wordpress 联盟广告汕头seo外包公司
  • 曲阜网站建设公司中国最新军事新闻最新消息
  • 政府网站集约化株洲发布最新通告
  • 广州汽车网络推广服务网站关键词优化的价格
  • 字体样式 网站重庆seo排
  • 帮客户做网站的公司焦作seo推广
  • web动态网站公司建网站流程
  • 毕节做网站宁波优化网站排名软件
  • 南阳做网站多少电话奶糖 seo 博客
  • 网络推广的网站登封网站设计
  • wordpress user login重庆网站seo公司