版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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
1前言
1.1配置说明
本配置手册仅限于Nginx-0.8.54,Oradell,,
以及32位操作系统CentOS_5.5o
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/mysql330&data/
Nginx日志存放书目:/data/logs
扩展文件存放书目:/usr/lib64/extensions/no-debug-non-zts-2024062^
1.1.2文件拥有者,拥有组
Mysql用户
/data/mysql/
/usr/local/webserver/mysql
WWW用户
1)/data/logs
2)/data/htdocs/html
3)/data/php/session
4)/data/php/upload
1.2所需软件及文件
1)
2)fpm.gz
3)
4)I
5)
6)
7)
8)
9)
10)
11)
12)
13)nginx-0.8.54.tar.gz
14)
15)
16)
17)
18)
19)
20)
21)
22)bise.so
23)libpdf_php.so
24)ZendGuardLoader.so
以下为文档
25)nginx.conf
26)php-fpm.conf
27)myf
28)mysql
2搭建nginx服务器
2.1安装环境
#建立所需书目
[root@localhostsrc]#mkdir-p/usr/local/webserver
[root@IocaIhostsrc]#chmod755/usr/local/webserver
#升级所需的程序库
[root@localhostsrc]#yum-yinstallgccgcc-c++autoconflibjpeglibjpeg-devellibpnglibpng-devel
freetypefreetype-develIibxml2Iibxml2-develzlibzlib-develglibcglibc-develglib2glib2-devel
bzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5
krb5-devellibidnlibidn-developensslopenssl-developenldapopenldap-develnssjdap
openldap-clientsopenldap-serverspatchautoconf213.noarchunzipgziplibtool-ltdl
libtool-ltdl-devellibaio
#这个文件记录了编译时运用的动态链接库的路径。
#默认状况下,编译器只会运用/lib和/usr/lib这两个书目下的库文件
[root@localhostsrc]#
includeld.so.conf.d/*.conf
/usr/lib
/usr/local/lib
/usr/lib64
“/etc/ld.so.conf"3L,52C
#将列出的路径下的库文件缓存到/etc/ld.so.cache以供运用
#修改增加新的库路径后,须要运行一下/sbin/ldconfig
#在任何书目下运行都可以
[root@localhostsrc]#/sbin/ldconfig
2.2安装Mysql
#安装MySql
[root@localhostsrc]#yuminstall-ylibtool
[root@localhostsrc]#mkdir/usr/local/webserver/mysql
[root@localhostsrc]#
[root@localhostsrc]#
#优化执行MySql时间
#假如是Inter处理器,运用pgcc提高1%性能
[root@localhost/usr/local/src/mysql-5.1.49]#CFLAGS="-O3"CXX=gccCXXFLAGS="-O3
-felide-constructors-fno-exceptions-fno-rtti-fomit-frame-pointer-ffixed-ebp"
[root@localhost/usr/local/src/mysql-5.1.49]#./configure-prefix=/usr/local/webserver/mysql
-enable-assembler-with-extra-charsets=complex-enable-thread-safe-client-with-big-tables
--with-readline-with-embedded-server-with-collation=utf8_general_ci-enable-local-infile
-with-charset=utf8-with-extra-charsets=all-with-ssl-with-unix-socket-path=/tmp/mysql.sock
-with-client-ldflags=-all-static-with-mysqld-user=mysql-with-mysqld-ldflags=-all-static
-with-innodb
#编译时出现以下提示,表示编译胜利
ThankyouforchoosingMySQL!
[root@localhost/usr/local/src/mysql-5.1.49]#make
[root@localhost/usr/local/src/mysql-5.1.49]#makeinstall
[root@localhost/usr/local/src/mysql-5.1.49]#cd../
#增加用户组,超级用户mysql
[root@localhost/usr/local/src/mysql-5.1.49]#groupaddmysql
[root@localhost/usr/local/src/mysql-5.1.49]#useradd-gmysqlmysql
#mysql增加可写权限并将用户改成mysql拥有
(root@localhostsrc]#chmod+w/usr/local/webserver/mysql
[root@localhostsrc]#chown-Rmysqkmysql/usr/local/webserver/mysql
#创建MySQL数据库存放书目
[root@localhostsrc]#mkdir-p/data/mysql/530^data/
[root@localhostsrc]#chown-Rmysqkmysql/data/mysql/
#以mysql用J1账户的身份建立数据表
[root@localhostsrc]#/usr/local/webserver/mysql/bin/mysql_install_db
-basedir=/usr/local/webserver/mysql-datadir=/data/mysql/330^data-user=mysql
#复制my.conf配置文件
[root@localhostsrc]#cp-fmyf/data/mysql^30^myf
my.conf文件代码如下
[client]
default-character-set=utf8
port=3306
socket=/tmp/mysql.sock
[mysql]
no-auto-rehash
[mysqld]
default-character-set=utf8
user=mysql
port=3306
socket=/tmp/mysql.sock
basedir=/usr/local/webserver/mysqI
datadir=/data/mysql^30^data
open_files_limit=10240
back_log=600
max_connections=3000
max_connect_errors=6UUU
table_cache=614
external-locking=FALSE
max_allowed_packet=32M
sort_buffer_size=2M
join_buffer_size=2M
thread_cache_size=300
thread_concurrency=8
query_cache_size=32M
query_cache_limit=2M
query_cache_min_res_unit=2k
default-storage-engine=MylSAM
default_table_type=MylSAM
thread_stack=192K
transaction_isolation=READ-COMMITTED
tmp_table_size=246M
max_heap_table_size=246M
long_query_time=1
log_long_format
log-bin=/data/mysql^306/binlog
binlog_cache_size=4M
binlog_format=MIXED
max_binlog_cache_size=8M
max_binlog_size=512M
expire_logs_days=7
key_buffer_size=256M
read_buffer_size=IM
read_rnd_buffer_size=16M
bulk_insert_buffer_size=64M
myisam_sort_buffer_size=128M
myisam_max_sort_file_size=10G
myisam_max_extra_sort_file_size=10G
myisam_repair_threads=1
myisam_recover
skip-name-resolve
master-connect-retry=10
slave-skip-errors=1032,1062,126,1114,1146,1048,1396
server-id=1
innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=32M
innodb_data_file_path=ibdatal:1024M:autoextend
innodb_file_io_threads=4
innodb_thread_concurrency=8
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=16M
innodb_log_file_size=128M
innodb_log_files_in_group=3
innodb_max_dirty_pages_pct=90
innodb_lock_wait_timeout=120
innodb_file_per_table=0
[mysqldump]
quick
max_allowed_packet=32M
#及制管理MySQL数据库的shell脚本
(root@localhostsrc]#cp-fmysql/data/mysql/33O6/mysql
Mysql文件代码如下
#!/bin/sh
mysql_port=3306
mysql_username="admin"
mysql_password="123456"
function_start_mysqI()
{
printf"StartingMySQL...\n"
/bin/sh/usr/local/webserver/mysql/bin/mysqld_safe
--defaults-file=/data/mysql/${mysql_port}/myf2>&1>/dev/null&
)
function_stop_mysql()
{
printf"StopingMySQL...\n"
/usr/local/webserver/mysql/bin/mysqladmin-u${mysql_username}-p${mysql_password}-S
/tmp/mysql.sockshutdown
)
function_restart_mysql()
(
printf"RestartingMySQL...\n"
function_stop_mysql
sleep5
function_start_mysql
)
function_kill_mysql()
(
kill-9$(ps-ef|grep'bin/mysqld_safe'|grep${mysql_port}|awk'{printf$2)*)
kill-9$(ps-ef|grep'libexec/mysqld'|grep${mysql_port}|awk'{printf$2}')
)
if["$1"="start"];then
function_start_mysql
elif["$1"="stop"];then
function_stop_mysql
elif["$1"="restart"];then
function_restart_mysql
elif["$1"="kill"];then
function_kill_mysql
else
printf"Usage:/data/mysql/${mysql_port}/mysql{start|stop|restart|kill}\n"
fi
#给予shell脚本可执行权限:
[root@localhostsrc]#chmod+x/data/mysql/3306/mysql
#启动MySQL:
[root@localhostsrc]#/data/mysql^30^mysqlstart
23安装Oracle
#安装oracle客/1端
[root@IocaIhostsrc]#
[root@localhostsrc]#[root@localhostsrc]#
[root(8)localhostsrc]#cp-rfinstantclient_ll_?/sdk//usr/include/
#在shell中执行程序时,shell会供应••组环境变量。export可新增,修改或删除环境变量,
供后续执行的程序运用。export的效力仅及于该此登陆操作
[root@localhostsrc]#exportORACLE_HOME=/usr/lib/oracle/ll.^/client64/
[root@localhostsrc]#exportLD_LIBRARY_PATH=/usr/lib/oracle/ll.^client64:$LD_LIBRARY_PATH
#在当刖bash环境下读取并执行FileName中的吩咐
[root@localhostsrc]#source/etc/profile
[root@IocaIhostsrc]#echo/usr/lib/oracle/ll.?/client/lib64
(root@localhostsrc]#/sbin/ldconfig
#查看oracle是否安装胜利
#cd/etc
#vi
#vioracle.conf
#cd../
2.4安装依靠库
#安装libevent
[root@IocaIhostsrc]#
[root@localhostsrc]#
[root@localhostlibevent-1.4.14b-stable]#./configure-prefix=/usr/local
[root@localhostlibevent-1.4.14b-stable]#make
[root@localhostlibevent-1.4.14b-stable]#makeinstall
(root@localhostlibevent-1.4.14b-stable]#cd../
#安装
[root@localhostsrc]#
[root@localhostsrc]#
[root@IocaIhost]#./configure-pre*ix=/usr
(root@localhost]#make
[root@localhost]#makeinstall
[root@IocaIhost]#cd../
#安装
[root@localhostsrc]#
[root@localhostsrc]#
[root@localhost]#./configure--pre'ix=/usr
[root@localhost]#make
[root@localhost]#makeinstall
(root@localhost]#/sbln/ldconflg
[root@localhost]#cdlibltdl/
[root@localhostlibltdl]#./configure-prefix=/usr-enable-ltdl-install
[root@localhostlibltdl]#make
[root@localhostlibltdl]#makeinstall
[root@localhostlibltdl]#cd
#安装
[root@localhostsrc]#
[root@localhostsrc]#
[root@localhost]#./configure--prefix=/usr
[root@localhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#安装
[root@localhostsrc]#
[root@IocaIhostsrc]#
[root@localhost]#/sbin/ldconfig
[root@localhost]#,/configure-prefix=/usr
[root@localhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#安装ImageMagick
[root@localhostsrc]#
[root@localhostsrc]#cdI
[root@IocaIhost]#./configure
[root@localhost]#make
[root@localhost]#makeinstall
(root@localhost]#cd../
[root@localhostsrc]#/sbin/ldconfig
2.5安装PHP
#正式安装php
[root@IocaIhostsrc]#mkdir/usr/local/webserver/php
[root@localhostsrc]#
#suhosin针对php进行平安加固的补丁程序
[root@localhostsrc]#gzip-cdsuhosin-patch-5.3.2-.patch.gz|patch-dphp-5.3.2-pl
[root@IocaIhostsrc]#
(root@localhostsrc]#
[root@localhostsapi]#tar-zxvffpm.gz
[root@localhosts叩i]#cd
(root@localhostsrc]#
[root@localhost]#exportPHP_AUTOCONF=/usr/bin/autoconf-2.13
[root@IocaIhost]#exportPHP_AUTOHEADER=/usr/bin/autoheader-2.13
[root@localhost]#./buildconf-force
[root@localhost]#./configure-prefix=/usr/local/webserver/php
--with-config-file-path=/usr/local/webserver/php/etc-with-mysql=/usr/local/webserver/mysql
-with-mysqli=/usr/local/webserver/mysql/bin/mysql_config-enable-pdo
-with-pdo-mysql=/usr/local/webserver/mysql--with-iconv-dir--with-freetype-dir--with-jpeg-dir
-with-png-dir-with-zlib-with-libxml-dir-enable-xml-disable-rpath-enable-discard-path
-enable-safe-mode-enable-bcmath-enable-shmop-enable-sysvsem-enable-sysvshm
-enable-inline-optimization-with-curl-with-curlwrappers-enable-mbregex-enable-fastcgi
-enable-fpm--enable-force-cgi-redirect-enable-mbstring-with-mcrypt-with-gd
-enable-gd-native-ttf--with-openssl-with-mhash-enable-sockets-with-xmlrpc-enable-zip
-enable-soap-with-pear-disable-debug-enable-pcntl-disable-ipv6-enable-ftp
-with-zend-vm=GOTO-enable-json--with-bz2--with-pcre-regex-enable-calendar-with-gettext
-enable-dba-enable-exif-with-mime-magic-enable-dom-Iibdir=/usr/lib64
—with-libevent-dir=/usr/local/lib
#出现以下提示表示编译胜利
ThankyouforusingPHP
[root@localhost]#makeZEND_EXTRA_UBS='-liconv'
[root@localhost]#makeinstall
[root@localhost]#cpphp.ini-production/usr/local/webserver/php/etc/php.ini
(root@localhost)#cd../
2.6安装扩展
#安装suhosin扩展
[root@localhostsrc]#
[root@IocaIhostsrc]#
[root@localhost]#/usr/local/webserver/php/bin/phpize
[root@localhost]#./configure-with-php-config=/usr/local/webserver/php/bin/php-config
[root@localhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#memcache基于libevent构建,在装memcache之前须要安装libevent
#用于缓存sql查询,对于降低数据库压力,提升查询速度有很大好处
#安装memcache扩展
[root@localhostsrc]#mkdir/usr/local/webserver/memcache
(root@localhostsrc]#
[root@localhostsrc]#
[root@localhost)#/usr/local/webserver/php/bin/phpize
[root@localhost]#./configure-with-php-config=/usr/local/webserver/php/bin/php-config
-enable-memcache--with-zlib-dir
[root@localhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#安装memcached扩展性能上比memcache优越
[root@localhostsrc]#
[root@localhostsrc]#cd
[root@localhost]#./configure-prefix=/usr/local/webserver/memcached
-with-libevent=/usr/local
[root@IocaIhost]#make
[root@localhostmemcached-1.4.5]#makeinstall
[root@localhost]#cd../
#PHPscripts的缓存,对于提高PHP程序执行速度很有帮助
#安装eaccelerator扩展
[root@localhostsrc]#
[root@localhostsrc]#
[root@localhost]#/usr/local/webserver/php/bin/phpize
[root@localhost]#./configure-enable-eaccelerator=shared
-with-php-config=/usr/local/webse,ver/php/bin/php-config
[root@localhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#安装imagick扩展
#先安装ImageMagic
[root@localhostsrc]#
[root@localhostsrc]#
[root@IocaIhost]#/usr/local/webserver/php/bin/phpize
[root@localhost]#./configure-with-php-config=/usr/local/webserver/php/bin/php-config
[root@IocaIhost]#make
[root@localhost]#makeinstall
[root@localhost]#cd../
#安装Excel导出文件
[root^plocalhostsrc]#cd/usr/local/lib
[root@localhostsrc]#cplibpdf_php.so/usr/lib64/extensions/no-debug-non-zts-20240626/
[root@IocaIhostsrc]#cpbise.so/us7lib6Vextensions/no-debug-non-zts-2024062^
[root@localhostsrc]#cplibxls.so.0.0.0/usr/lib64/extensions/no-debug-non-zts-20240626/
[root@localhostlib]#mv/usr/lib64/usr/local/lib/libxls.so
(root@localhostlib]#
[root@localhostlib]#
[root@localhostlib]#In-slibxls.so.C/usr/local/lib/libxls.so.0.0.0
[root@localhostlib]#
[root@localhostlib]#chmod+xlibxls.so.0.0.0
[root@localhostlib]#In-s/usr/local/lib/libxls.so.O/usr/local/lib/libxls.so
[root@localhostlib]#/sbin/ldconfig
#修改php.im义件
[root@localhostsrc]#vi/usr/local/v/ebserver/php/etc/php.ini
#查找/usr/local/webservei7Php/etc/php.ini中的extension_dir=
#修改为
;Directoryinwhichtheloadableextensions(modules)reside.
;:///extension-dir
extension_dir="/usr/lib64/extensions/no-debug-non-zts-20240626"
;Onwindows:
;extension_dir="ext"
#并在extension下增加以下几行,然后保存:
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
extension=suhosin.so
extension=memcache.so
extension=imagick.so
#以下是关于excel导出扩展
extension=bise.so
extension=libpdf_php.so
#配置eAccelerator力U速PHP
[root@localhostsrc]#mkdir-p/usr/local/webserver/eaccelerator_cache
#配置php.ini文件
[root@localhostsrc]#vi/usr/local/v/ebserver/php/etc/php.ini
#按shift+g键跳到配置文件的最末尾,加上以下配置信息
[ZendGuardLoader]
Zend_extension="/usr/lib6Vextensi3ns/no-debug-non-zts-2024062^ZendGuardLoader.so"
Zend_loader.enable=l
;许可信息,关闭提升少许信息
;默认值为0,关闭
Zend_loader.disable_licensing=0
;模糊处理支持
;默认值为3
Zend_loader.obfuscation_level_support=3
Zend_loader.license_path=""
[eaccelerator]
zend_extension="/usr/lib64/extensions/no-debug-non-zts-2024062^eaccelerator.so"
;共享的内存数量。单位MB
;默认值为0,操作系统默认
eaccelerator.shm_size="64"
;用户磁盘缓存的书目
;在该书目中存储预编译代码、session数据、内容等
eaccelerator.cache_dir="/usr/local/\vebserver/eaccelerator_cache"
eaccelerator.enable="l"
;开启或关闭内部优化器
;默认值为1,开启
eaccelerator.optimizer="l"
;开启或关闭PHP文件改动检查
;默认值为1,检查
eaccelerator.check_mtime="l"
;开启或关闭调试日志记录
;默认值为0,关闭
eaccelerator.debug="0"
;推断哪些php文件必需缓存
;可以指定缓存文件类型(如*.Php、等)
;选择不被缓存,参数前加!
;默认全部php被缓存
eaccelerator.filter=""
;该参数指定允许存储的最大值,单位:字节
;默认为0,不限制
eaccelerator.shm_max="0"
;获得新脚本的共享内存大小失败时,它将从共享内存中删除全部在最终"shm_ttl"秒内无
法存取的脚本缓存
;默认值为0,不从共享内存里删除任何缓存
eaccelerdtor.shm_ttl="3600"
;获得新脚本的共享内存大小失败时,它将从共享内存中删除早于"shm_prune_period"秒
的脚本缓存
;默认值为0,不从共享内存里删除任何缓存
eaccelerator.shm_prune_period="3600"
;是否将已编译脚本缓存在磁盘上。该选项对session数据和内容缓存无效。
;默认值为"0",运用磁盘和共享内存进行缓存。
eaccelerator.shm_only="0"
;是否进行压缩
;默认值为T,允许压缩
eacceleratorpress="l"
;指定内容缓存的压缩等级。
;默认值为"9",为最高等级。
eacceleratorpress_level="9"
#增加新的超级用户组以及对应的超级用户WWW
[root@localhostsrc]#/usr/sbin/groupaddwww
[root@localhostsrc]#/usr/sbin/useradd-gwwwwww
#创建网页文件书目,并将权限给www
■[root@IocaIhostsrc]#mkdir-p/data/htdocs/html
[root@localhostsrc]#chmod+w/data/htdocs/html
[root@localhostsrc]#chown-Rwww:www/data/htdocs/html
#创建session文件书目,并将权限给www
[root@localhostsrc]#mkdir-p/data/php/session
[root@localhostsrc]#chmod+w/data/php/session
[root@IocaIhostsrc]#chown-Rwww:www/data/php/session
#创建upload文件书目,并将权限给www
[root@localhostsrc]#mkdir-p/data/php/upload
[root@IocaIhostsrc]#chmod+w/data/php/upload
[root@localhostsrc]#chown-Rwww:www/data/php/upload
[root@localhostsrc]#cpphp-fpm.conf/usr/local/webserver/php/etc/php-fpm.conf
#启动php-cgi进程
[root@localhostsrc]#/usr/local/weoserver/php/sbin/php-fpm
2.7安装Nginx
#安装Nginx0.8.54
#安装Nginx所需的pcre库(支持正则):
[root@localhostsrc]#
(root@localhostsrc]#cdpcre-8.10/
[root@localhostsrc]#./configure
[root@localhostsrc]#make
[root@localhostsrc]#makeinstall
(root@localhostsrc]#cd../
#女装Nginx
[root@localhostsrc]#mkdir/usr/local/webserver/nginx
[root@IocaIhostsrc]#tarzxvfnginx-O.8.54.tar.gz
[root@localhost]#cd/
[root@localhost]#./configure-u$er=www--group=www-prefix=/usr/local/webserver/nginx
-with-_stub_status_module-with-_ssl_module
[root@localhost]#make
[root@IocaIhost]#makeinstall
[root@localhost]#cd../
#创建Nginx日志书目
[root@IocaIhostsrc]#mkdir-p/data/logs
[root@localhostsrc]#chmod+w/data/logs
[root@localhostsrc]#chown-Rwww:www/data/logs
#创建Nginx配置文件
#ffi/usr/local/webserver/nginx/conf/45§中创建nginx.conf文件:
[root@localhostsrc]#cpnginx.conf/usr/local/webserver/nginx/conf/
#启动nginx
[root@localhostsrc]#/usr/local/weoserver/nginx/sbin/nginx
#开启memcached
(root@localhostsrc]#/usr/local/webserver/memcached/bin/memcached-d-m256-uroot-p
11211-c1024-p/tmp/memcahed_l.pic
#参数详解
-p监听的端口
-I连接的ip地址,默认是本机
-dstart
-drestart
-dstop|shutdown
-dinstall
-duninstall
-u以用户的身份运行(仅在以root运行的时候有效)
-m最大内存运用,单位MB,默认64MB
-M内存耗尽时返回错误,而不是删除项
-C最大同时连接数,默认是1024
-f块大小增长因子,默认是1.25
-n最小安排空间,默认是1.25・n最小安排空间
-h显示帮助
3修改防火墙规则
[root@localhostsrc]#vi/etc/sysconfig/iptables
-ARH-Firewall-l-INPUT-jREJECT-reject-withicmp-host-prohibited
#Firewallconfigurationwrittenbysystem-config-securitylevel
#Manualcustomizationofthisfileisnotrecommended.
*filter
:INPUTACCEPT[0:0]
:FORWARDACCEPT[0:0]
:OUTPUTACCEPT[0:0]
:RH-Firewall-l-INPUT-[0:0]
-AINPUT-jRH-Firewall-l-INPUT
-AFORWARD-jRH-Firewall-l-INPUT
-ARH-Firewall-l-INPUT-iIo-jACCEPT
-ARH-Firewall-l-INPUT-picmp-icmp-typeany-jACCEPT
-ARH-Firewall-l-INPUT-p50-jACCEPT
-ARH-Firewall-l-INPUT-p51-jACCEPT
-ARH-Firewall-l-INPUT-ptcp-dport80-jACCEPT
-ARH-Firewall-l-INPUT-pudp-dport5353-d51-jACCEPT
-ARH-Firewall-l-INPUT-pudp-mudp-dport631-jACCEPT
-ARH-Firewall-l-INPUT-ptcp-mtcp-dport631-jACCEPT
-ARH-Firewall-l-INPUT-mstate--StateESTABLISHED,RELATED-jACCEPT
-ARH-Firewall-l-INPUT-mstate--stateNEW-mtcp-ptcp-dport22-jACCEPT
-ARH-Firewall-l-INPUT-jREJECT-reject-withicmp-host-prohibited
COMMIT
[root@localhostsrc]#serviceiptablesrestart
4编译参数说明
4.1Yum配置的环境参数详解
autoconf.noarch:用来自动配置源码的GNU工具。
autoconf213.noarch:用来自动配置源码的GNU工具。
bzip2.i386:文件压缩工具。
bzip2-devel.i386:开发运用bzip2的应用程序所需的头文件和库。
curl.i386:从远程服务器(FTP、、及其它)中获得文件的工具。
curl-devel.i386:用libcurl建构程序所需的文件。
e2fsprogs.i386:Utilitiesformanagingthesecondandthirdextended(extVext3)filesystems
e2fsprogs-devel.i386:Ext羽filesystem-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程序所需的开发文件。
Iibjpeg.i386:操作JPEG图像格式文件的库。
Iibjpeg-devel.i386:运用libjpeg库的程序的开发库。
Iibpng.i386:AlibraryoffunctionsformanipulatingPNGimageformatfiles
Iibpng-devel.i386:开发处理PNG图像格式文件程序的开发工具。
Iibxml2.i386:供应XML和HTML支持的库
Iibxml2-devel.i386:开发XML和HTML程序所需的库、包含文件等等。
Iibidn.i386:国际化域名支持库
Iibidn-devel.i386:libidn库的开发文件。
Iibtool-ltdl.i386:GNULibtool动态模块加载程序的运行时库函数
Iibtool-ltdl-devel.i386:开发运用GNULibtoolDynamicModuleLoader所需的工具
Iibaio.i386:Linux-自然不对称I/O存取库
ncurses.i386:Aterminalhandlingliorary
ncurses-devel.i386:Developmentfilesforthencurseslibrary
nss_ldap.l386: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=<path>-Nginx安装路径。假如没有指定,默认为/usr/local/nginx。
--sbin-path=<path>-Nginx可执行文件安装路径。只能安装时指定,假如没有指定,默认为
<prefix>/sbin/nginxo
-conf-path=<path>-在没有给定-c选项下默认的nginx.conf的路径。假如没有指定,默认为
<prefix>/conf/nginx.confa
-pid-path=<path>-在nginx.conf中没有指定pid指令的状况下,默认的nginx.pid的路径。
假如没有指定,默认为<prefix>/logs/nginx.pid
-lock-path=<path>-nginx.lock文件的路径。
-error-log-path=<path>-在nginx.conf中没有指定error_log指令的状况下,默认的错误日志
的路径。假如没有指定,默认为<prefix>/logs/error.logo
--Iog-path=<path>-在nginx.conf中没有指定access_log指令的状况下,默认的访问日
志的路径。假如没有指定,默认为<prefix>/logs/access.logo
-user=<user>-在nginx.conf中没有指定user指令的状况下,默认的nginx运用的用户。假
如没有指定,默认为nobody<.
-group=<group>-在nginx.conf中没有指定user指令的状况下,默认的nginx运用的组。假
如没有指定,默认为nobodyo
-builddir=DIR-指定编译的书目
-with-rtsig_module-启用rtsig模块
-with-select_module-without-select_module-Whetherornottoenabletheselectmodule.
Thismoduleisenabledbydefaultifamoresuitablemethodsuchaskqueue,epoll,rtsigor
/dev/pollisnotdiscoveredbyconfigure.
〃允许或不允许开启SELECT模式,假如configure没有找到更合适的模式,比如:kqueue(sun
(实时信号)或者(一种类似的模式,底层实现与
os)zepoll(linuxkenel2.6+),rtsig/dev/pollselect
SELECT基本相同,都是采纳轮训方法)SELECT模式将是默认安装模式
—with-poll_module-without-poll_module-Whetherornottoenablethepollmodule.This
moduleisenabledbydefaultifamoresuitablemethodsuchaskqueue,epoll,rtsigor/dev/pollis
notdiscoveredbyconfigure.
-with-_ssl_module-Enablengx__ssl_module.EnablesSSLsupportandtheabilityto
handleSrequests.RequiresOpenSSL.OnDebian,thisislibssl-dev.
〃开启SSL模块,使NGINX可以支持S恳求。这个模块须要已经安装了OPENSSL,
在DEBIAN上是libssl
-with-_realip_module-启用ngx__realip_module
-with-_addition_module-启用ngx__addition_module
-with-_sub_module-启用ngx__sub_module
--with-_dav_module-启用ngx__dav_module
-with-_flv_module-启用ngx__flv_module
-with-_stub_status_module-启用"serverstatus"页
-without-_charset_module-禁用ngx__charset_module
-without-_gzip_module-禁用ngx__gzip_module.假如启用,须要zlib。
-without-_ssi_module-禁用ngx__ssi_module
-without-_userid_module-禁用ngx__userid_module
-without-_access_module-禁用ngx__access_module
-without-_auth_basic_module-禁用ngx__auth_basic_module
—without-_autoindex_module-禁用ngx__autoindex_module
-without-_geo_module-禁用ngx__geo_module
-without-_map_module-禁用ngx__map_module
-without-_referer_module-禁用ngx__referer_module
-without-_rewrite_module-禁用ngx__rewrite_module.假如启用须要PCRE。
-without-_proxy_module-禁用ngx__
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年垃圾分类桶项目合作计划书
- 2024年远传燃气表项目建议书
- 2024年云数融合项目合作计划书
- 人教版九年级上册化学期末考试试卷附答案
- 2024年电视节目自动播出设备项目发展计划
- 2024年智能卡制作发行机项目建议书
- 2024年电主轴精密零配件项目合作计划书
- 幼儿园大班主题课件
- 2024年苦参凝胶项目建议书
- 2024年水解弹性蛋白合作协议书
- QC080000有害物质管理评审报告
- 人教版六年级上册数学第四单元《比》单元分析(定稿)
- (完整word版)家长学校课程表
- 离职证明(标准模版)
- 《赶圩归来啊哩哩》音乐PPT课件(5篇)
- QFD质量功能展开资料95页ppt课件
- 压疮常见知识(课堂PPT)
- 医院人员年度考核表参考模板
- 长距离蒸汽输送
- (完整版)家长会-课件PPT
- 八年级上册历史复习提纲
评论
0/150
提交评论