Nginx配置手册64.docx

上传人:b****8 文档编号:28863617 上传时间:2023-07-20 格式:DOCX 页数:11 大小:183.16KB
下载 相关 举报
Nginx配置手册64.docx_第1页
第1页 / 共11页
Nginx配置手册64.docx_第2页
第2页 / 共11页
Nginx配置手册64.docx_第3页
第3页 / 共11页
Nginx配置手册64.docx_第4页
第4页 / 共11页
Nginx配置手册64.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

Nginx配置手册64.docx

《Nginx配置手册64.docx》由会员分享,可在线阅读,更多相关《Nginx配置手册64.docx(11页珍藏版)》请在冰豆网上搜索。

Nginx配置手册64.docx

Nginx配置手册64

Nginx配置手册

Nginx酉己置手册1

1前言2

1.1配置说明2

1.2所需软件及文件2

2搭建nginx月艮务器3

2.1安装环境3

2.2安装Mysql4

2.3安装Oracle8

2.4安装依赖库8

2.5安装PHP10

2.6安装扩展11

2.7安装Nginx15

3编译参数说明16

3.1Yum配置的环境参数详解17

3.2Mysql编译参数详解18

3.3Php编译参数详解18

3.4Nginx编译参数详解18

3.5扩展库详解22

—、r4

1刖曰

1.1配置说明

本配置手册仅限于Nginx-0.8.54,Oraclell,Mysql5.1.49,PHP-5.3.2以及32位操作系统Cent0S_5.5。

1.1.1有关文件目录

安装程序源代码存放目录:

/usr/local/src

软件安装目录:

1)Nginx安装目录:

/usr/local/webserver/nginx

2)PHP安装目录:

/usr/local/webserver/php

3)Mysql安装目录:

/usr/local/webserver/mysql

网站程序存放目录:

/data/htdocs/html

Mysql数据库存放目录:

/data/mysql/3306/data/

Nginx日志存放目录:

/data/logs

扩展文件存放目录:

/usr/lib64/extensions/no-debug-non-zts-20090626/

1.1.2文件拥有者,拥有组

Mysql用户

/data/mysql/

1)

2)

/usr/local/webserver/mysql

/data/logs

/data/htdocs/html

 

3)

/data/php/session

4)

/data/php/upload

 

 

1.2所需软件及文件

1)eaccelerator-0.9.6.1.tar.bz2

2)fpm.gz

3)ImagMagick.tar.gz

4)Imagick-2.3.0.tgz

5)oracle-instantclient11.2-sdk-11.2.0.1.0-1.x86_64.ziplibevent-1.4.14b-stable

6)libiconv-1.13.1.tar.gz

7)libmcrypt-2.5.8

8)mcrypt-2.6.8.tar.gz

9)memcached-1.4.5.tar.gz

10)memcache-2.2.5.tgz

11)mhash-0.9.9.9.tar.gz

12)mysql-5.1.49.tar.gz

13)nginx-0.8.54.tar.gz

14)oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm

15)oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm

16)pcre-8.10.tar.gz

17)PDO_MYSQL-1.0.2.tgz

18)php-5.3.2.tar.gz

19)

suhosin-0.9.32.1.tar.gz

20)

suhosin-patch-5.3.2-0.9.9.1.patch.gz

21)

libxls.so.0.0.0

22)

bise.so

23)

libpdf_php.so

24)

ZendGuardLoader.so

以下为文档

25)

nginx.conf

26)

php-fpm.conf

27)

f

28)

mysql

2搭建nginx服务器

2.2安装Mysql

#创建MySQL数据库存放目录

 

Mysql文件代码如下

2.3安装Oracle

#查看oracle是否安装成功

#cd/etc

#vild.so.conf.d

#vioracle.conf

#cd../

2.4安装依赖库#安装libevent1.4.14b-stable

 

2.5安装PHP

 

#安装eaccelerator扩展

 

#修改php.ini文件

中的extension_dir="./

#查找/usr/local/webserver/php/etc/php.ini

#修改为

 

2.7安装Nginx

 

#创建Nginx日志目录

3修改防火墙规则

 

4编洋参数说明

4.1Yum配置的环境参数详解

autoconf.noarch:

用来自动配置源码的GNU工具。

autoconf213.noarch:

用来自动配置源码的GNU工具。

bzip2.i386:

文件压缩工具。

bzip2-devel.i386:

开发使用bzip2的应用程序所需的头文件和库。

curl.i386:

从远程服务器(FTP、HTTP、及其它)中获取文件的工具。

curl-devel.i386:

用libcurl建构程序所需的文件。

e2fsprogs.i386:

Utilitiesformanagingthesecondandthirdextended(ext2/ext3)filesystems

e2fsprogs-devel.i386:

Ext2/3filesystem-specificstaticlibrariesandheaders

freetype.i386:

Afreeandportablefontrenderingengine

freetype-devel.i386:

FreeType的开发库和头文件

gcc.i386:

各类编译器(C、C++、Objective-C、Java,...)

gcc-c++.i386:

GCC的C++支持

glibc.i386:

GNUlibc库。

glibc-devel.i386:

使用标准C函数库进行开发所需的目标文件。

glib2.i386:

Alibraryofhandyutilityfunctions

glib2-devel.i386:

GIMP工具包(GTK+)和GIMP绘图包(GDK)支持库。

gzip.i386:

GNU数据压缩程序。

krb5-devel.i386:

编译Kerberos5程序所需的开发文件。

libjpeg.i386:

操作JPEG图像格式文件的库。

libjpeg-devel.i386:

使用libjpeg库的程序的开发库。

libpng.i386:

AlibraryoffunctionsformanipulatingPNGimageformatfileslibpng-devel.i386:

开发处理PNG图像格式文件程序的开发工具。

libxml2.i386:

提供XML和HTML支持的库

libxml2-devel.i386:

开发XML和HTML程序所需的库、包含文件等等。

libidn.i386:

国际化域名支持库

libidn-devel.i386:

libidn库的开发文件。

libtool-ltdl.i386:

GNULibtool动态模块加载程序的运行时库函数

libtool-ltdl-devel.i386:

开发使用GNULibtoolDynamicModuleLoader所需的工具

libaio.i386:

Linux-自然不对称I/O存取库

ncurses.i386:

Aterminalhandlinglibrary

ncurses-devel.i386:

Developmentfilesforthencurseslibrary

nss_ldap.i386:

LDAP的NSS库和PAM模块。

openssl.i386:

TheOpenSSLtoolkit

openssl-devel.i386:

FilesfordevelopmentofapplicationswhichwilluseOpenSSL

openldap.i386:

OpenLDAP的配置文件、库和文档

openldap-devel.i386:

OpenLDAP的开发库和头文件。

openldap-clients.i386:

OpenLDAP的客户程序。

openldap-servers:

OpenLDAP的服务器程序。

patch.i386:

修改/升级文件的GNUpatch命令。

unzip.i386:

为zip文件解压的工具。

zlib.i386:

zlib压缩和解压库。

zlib-devel.i386:

Zlib开发的头文件和库。

4.2Mysql编译参数详解

4.3Php编译参数详解

4.4Nginx编译参数详解

--prefix=-Nginx安装路径。

如果没有指定,默认为/usr/local/nginx。

--sbin-path=-Nginx可执行文件安装路径。

只能安装时指定,如果没有指定,默认为/sbin/nginx。

--conf-path=-在没有给定-c选项下默认的nginx.conf的路径。

如果没有指定,默认为

/conf/nginx.conf。

--pid-path=-在nginx.conf中没有指定pid指令的情况下,默认的nginx.pid的路径。

如果没有指定,默认为/logs/nginx.pid。

--lock-path=-nginx.lock文件的路径。

--error-log-path=-在nginx.conf中没有指定error_log指令的情况下,默认的错误日志

的路径。

如果没有指定,默认为/logs/error.log。

--http-log-path=-在nginx.conf中没有指定access_log指令的情况下,默认的访问日志

--user=-在nginx.conf中没有指定user指令的情况下,默认的nginx使用的用户。

果没有指定,默认为nobody。

--group=-在nginx.conf中没有指定user指令的情况下,默认的nginx使用的组。

如果没有指定,默认为nobody。

--builddir=DIR-指定编译的目录

--with-rtsig_module-启用rtsig模块

--with-select_module--without-select_module-Whetherornottoenabletheselectmodule.Thismoduleisenabledbydefaultifamoresuitablemethodsuchaskqueue,epoll,rtsigor/dev/poll

isnotdiscoveredbyconfigure.

//允许或不允许开启SELECT模式,如果configure没有找到更合适的模式,比如:

kqueue(sun

os),epoll(linuxkenel2.6+),rtsig(实时信号)或者/dev/poll(一种类似select的模式,底层实现与

SELECT基本相同,都是采用轮训方法)SELECT模式将是默认安装模式

--with-poll_module--without-poll_module-Whetherornottoenablethepollmodule.This

moduleisenabledbydefaultifamoresuitablemethodsuchaskqueue,epoll,rtsigor/dev/poll

isnotdiscoveredbyconfigure.

--with-http_ssl_module-Enablengx_http_ssl_module.EnablesSSLsupportandtheabilityto

handleHTTPSrequests.RequiresOpenSSL.OnDebian,thisislibssl-dev.

//开启HTTPSSL模块,使NGINX可以支持HTTPS请求。

这个模块需要已经安装了OPENSSL,

在DEBIAN上是libssl

--with-http_realip_module-

--with-http_addition_module-

--with-http_sub_module-

--with-http_dav_module-

--with-http_flv_module-

启用ngx_http_realip_module

启用ngx_http_addition_module

启用ngx_http_sub_module

启用ngx_http_dav_module

启用ngx_http_flv_module

--with-http_perl_module-启用ngx_http_perl_module--with-perl_modules_path=PATH-指定perl模块的路径

--with-perl=PATH-指定perl执行文件的路径

--http-log-path=PATH-Setpathtothehttpaccesslog--http-client-body-temp-path=PATH-Setpathtothehttpclientrequestbodytemporaryfiles

--http-proxy-temp-path=PATH-Setpathtothehttpproxytemporaryfiles--http-fastcgi-temp-path=PATH-Setpathtothehttpfastcgitemporaryfiles

--without-http-禁用HTTPserver

--with-mail-启用IMAP4/POP3/SMTP代理模块

--with-mail_ssl_module-启用ngx_mail_ssl_module

--with-cc=PATH-指定C编译器的路径

--with-cpp=PATH-指定C预处理器的路径

--with-cc-opt=OPTIONS-AdditionalparameterswhichwillbeaddedtothevariableCFLAGS.WiththeuseofthesystemlibraryPCREinFreeBSD,itisnecessarytoindicate--with-cc-opt="-I/usr/local/include".Ifweareusingselect()anditisnecessarytoincreasethenumberoffile

descriptors,thenthisalsocanbeassignedhere:

--with-cc-opt="-DFD_SETSIZE=2048”.

--with-ld-opt=OPTIONS-Additionalparameterspassedtothelinker.WiththeuseofthesystemlibraryPCREinFreeBSD,itisnecessarytoindicate--with-ld-opt="-L/usr/local/lib".

--with-cpu-opt=CPU-为特定的CPU编译,有效的值包括:

pentium,pentiumpro,pentium3,

pentium4,athlon,opteron,amd64,sparc32,sparc64,ppc64

--without-pcre-禁止PCRE库的使用。

同时也会禁止HTTPrewrite模块。

在"location"配

置指令中的正则表达式也需要PCRE。

--with-pcre=DIR-指定PCRE库的源代码的路径。

--with-pcre-opt=OPTIONS-SetadditionaloptionsforPCREbuilding.

--with-md5=DIR-Setpathtomd5librarysources.

--with-md5-opt=OPTIONS-Setadditionaloptionsformd5building.

--with-md5-asm-Usemd5assemblersources.

--with-sha1=DIR-Setpathtosha1librarysources.

--with-sha1-opt=OPTIONS-Setadditionaloptionsforsha1building.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1