完整+nginx-http-concat
./configure \
--prefix=/usr/local/webserver/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--add-module=/opt/nginx-http-concat-master
只安装nginx
./configure \
--prefix=/usr/local/webserver/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_stub_status_module
./configure \
--prefix=/usr/local/webserver/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--add-module=/opt/nginx-http-concat-master \
--add-module=/opt/openresty-1.11.2.4/bundle/ngx_devel_kit-0.3.0 \
--add-module=/opt/lua-nginx-module-0.10.10
./configure \
--with-bzlib=yes \
--with-autotrace=yes \
--with-djvu=yes \
--with-dps=yes \
--with-fftw=yes \
--with-flif=yes \
--with-fpx=yes \
--with-fontconfig=yes \
--with-freetype=yes \
--with-gslib=no
--with-gvc=yes \
--with-jbig=yes \
--with-jpeg=yes \
--with-lcms=yes \
--with-lqr=yes \
--with-ltdl=yes \
--with-lzma=yes \
--with-magick-plus-plus=yes \
--with-openexr=yes \
--with-openjp2=yes \
--with-pango=yes \
--with-perl=no
--with-png=yes \
--with-raqm=yes \
--with-raw=yes \
--with-rsvg=no
--with-tiff=yes \
--with-webp=yes \
--with-wmf=yes \
--with-x=
--with-xml=yes \
--with-zlib=yes
#创建有所有权限的用户(慎用)
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
basedir = /usr/local/webserver/mysql
datadir = /data/mysql3306/data
port = 3306
# server_id = .....
#socket = /data/mysql3306/mysql3306.sock
pid-file = /data/mysql3306/mysql.pid
max_connections=200
key_buffer_size=200M
low_priority_updates=1
table_open_cache = 8000
back_log=1500
query_cache_type=0
table_open_cache_instances=16
innodb_buffer_pool_size=4000M
innodb_buffer_pool_instances=32
innodb_log_buffer_size=64M
join_buffer_size=32K
sort_buffer_size=32K
innodb_file_per_table=1
innodb_checksums=0
innodb_doublewrite=0
innodb_support_xa=0
innodb_thread_concurrency=0
innodb_flush_log_at_trx_commit=2
innodb_max_dirty_pages_pct=50
innodb_use_native_aio=1
innodb_stats_persistent=1
slow_query_log = 1
slow_query_log_file = /data/logs/mysql3306_slow_query.log
long_query_time = 5
log_queries_not_using_indexes = ON
server-id = 1
log-bin=mysql-bin
expire_logs_days=15
sql_mode=NO_ENGINE_SUBSTITUTION
vi /etc/ld.so.conf.d/local.conf # 编辑库文件
/usr/local/lib # 添加该行
/usr/local/lib64 # 添加该行
:wq # 保存退出
ldconfig -v
./configure \
--prefix=/usr/local/webserver/php5.6 \
--with-config-file-path=/usr/local/webserver/php5.6/etc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-soap \
--enable-gd-native-ttf \
--enable-ftp \
--enable-mbstring \
--enable-exif \
--enable-pdo \
--enable-mbstring \
--enable-opcache \
--enable-sockets \
--enable-pcntl \
--enable-zip \
--enable-calendar \
--enable-bcmath \
--enable-intl \
--with-pdo-mysql \
--with-mysql \
--with-mysqli \
--with-libxml-dir \
--with-pcre-dir \
--with-gd \
--with-vpx-dir \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-xpm-dir \
--with-iconv-dir \
--with-zlib-dir \
--with-mcrypt \
--with-zlib \
--with-curl \
--with-openssl \
--with-gettext \
--with-mhash \
--with-ldap \
--with-libdir=lib64 \
--without-pear \
--disable-phar
zend_extension= /usr/local/webserver/php5.6/lib/php/extensions/no-debug-non-zts-20131226/ZendGuardLoader.so
zend_loader.enable=3
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
include /usr/local/webserver/nginx/conf/vhost/*.conf;
user www www;
worker_processes 8;
#worker_cpu_affinity auto;
error_log /data/logs/nginx_error.log;
pid /usr/local/webserver/nginx/nginx.pid;
worker_rlimit_nofile 65535;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 16m;
sendfile on;
tcp_nopush on;
keepalive_timeout 10;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
log_format combined_hx '$remote_addr - $server_addr [$time_local] $request_method $http_host $request_uri $request_time $status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for';
log_not_found off;
#access_log off;
access_log /data/logs/nginx_access.log combined_hx;
#server{
# listen 80;
# root /data/www/test/;
# index index.php index.html;
# include php_ci.conf;
#}
include vhosts/*.conf;
}
-创建配置文件目录/usr/local/webserver/nginx/conf/vhosts
mkdir /usr/local/webserver/nginx/conf/vhosts
location ~ ^(.*)\/\.svn\/
{
deny all;
}
location ~ .*\.php?
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
if ($request_filename ~* (.*)\.php) {
set $php_url $1;
}
if (!-e $php_url.php) {
return 403;
}
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
}
location ~ .*\.(gif|jpg|ico|png)$
{
expires 7d;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 6h;
access_log off;
}
server
{
listen 80;
server_name erp.domain.com;
index index.html index.php;
root /data/www/erp_doraemon/webapp;
include php_ci.conf;
include extra.conf;
location /static/ {
location ~ .*\.(php)?$
{
deny all;
}
}
location /static_m/ {
location ~ .*\.(php)?$
{
deny all;
}
}
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
access_log /data/logs/web/erp_doraemon.log combined_hx;
}