nginx的安裝配置檔案

2021-10-05 21:55:46 字數 2579 閱讀 5373

nginx 安裝配置

nginx 安裝

系統平台:centos release 6.6 (final) 64位。

一、安裝編譯工具及庫檔案

yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

二、首先要安裝 pcre

2、解壓安裝包:

[root@bogon src]# tar zxvf pcre-8.35.tar.gz

3、進入安裝包目錄

[root@bogon src]# cd pcre-8.35

4、編譯安裝

[root@bogon pcre-8.35]# ./configure

[root@bogon pcre-8.35]# make && make install

5、檢視pcre版本

[root@bogon pcre-8.35]# pcre-config --version

安裝 nginx

2、解壓安裝包

[root@bogon src]# tar zxvf nginx-1.6.2.tar.gz

3、進入安裝包目錄

[root@bogon src]# cd nginx-1.6.2

4、編譯安裝

5、檢視nginx版本

[root@bogon nginx-1.6.2]# /usr/local/webserver/nginx/sbin/nginx -v

到此,nginx安裝完成

nginx 配置建立 nginx 執行使用的使用者 www:[root@bogon conf]# /usr/sbin/groupadd www

[root@bogon conf]# /usr/sbin/useradd -g www www配置nginx.conf ,將/usr/local/webserver/nginx/conf/nginx.conf替換為以下內容[root@bogon conf]# cat /usr/local/webserver/nginx/conf/nginx.confem

#limit_zone crawler katex parse error: expected 'eof', got '#' at position 26: …ote_addr 10m; #̲下面是server虛擬主機的配…

access_log off;}檢查配置檔案nginx.conf的正確性命令: [root@bogon conf]# /usr/local/webserver/nginx/sbin/nginx -t

啟動 nginx

nginx 啟動命令如下:

MySQL Archive 版安裝配置檔案

mysql 設定mysql客戶端預設字符集 default character set utf8 mysqld 設定3306埠 port 3306 設定mysql的安裝目錄 basedir d mysql 5.7 20 winx64 設定mysql資料庫的資料的存放目錄 datadir d mysq...

Nginx Nginx 安裝 配置檔案分析

目錄 1.yum 安裝 2.基於 docker 安裝以及目錄掛載 3.nginx.conf 配置檔案 3.1 基本配置 3.2 events 配置 3.3 http 配置 3.4 location對映 ngx http core module 預設情況 centos7 中沒有 nginx 的源,ng...

nginx安裝配置

主服務端 192.168.233.128 客戶端 192.168.233.131 192.168.233.132 192.168.233.134 主服務端和客戶端配置相同部分 yum y install zlib zlib devel yum y install pcre pcre devel yu...