linux 安装 nginx
2013-10-10 09:38
316 查看
安装 tcmalloc 1、安装标准库 #wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz wget http://192.168.1.150:33333/s/libunwind-1.1.tar.gz tar zxvf libunwind-1.1.tar.gz cd libunwind-1.1 CFLAGS=-fPIC ./configure make CFLAGS=-fPIC make CFLAGS=-fPIC install /sbin/ldconfig cd .. 2、安装优化库 #wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz wget http://192.168.1.150:33333/s/gperftools-2.0.tar.gz tar zxvf gperftools-2.0.tar.gz cd gperftools-2.0 ./configure make make install /sbin/ldconfig cd .. 3、配置库路径 echo "/usr/local/lib" > /etc/ld.so.conf.d/local_lib.conf /sbin/ldconfig ---------------------- 安装nginx 1、编译 pcre #wget http://downloads.sourceforge.net/project/pcre/pcre/8.31/pcre-8.31.tar.gz wget http://192.168.1.150:33333/s/pcre-8.31.tar.gz tar zxvf pcre-8.31.tar.gz cd pcre-8.31 ./configure make make install /sbin/ldconfig cd .. 2、编译 nginx 1、安装库(可选) #wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz wget http://192.168.1.150:33333/s/GeoIP.tar.gz tar zxvf GeoIP.tar.gz cd GeoIP-1.4.8 ./configure make make install /sbin/ldconfig cd .. 2、安装 #wget http://nginx.org/download/nginx-1.2.5.tar.gz wget http://192.168.1.150:33333/s/nginx-1.2.5.tar.gz tar zxvf nginx-1.2.5.tar.gz cd nginx-1.2.5 ./configure --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-google_perftools_module --with-http_geoip_module --with-pcre=../pcre-8.31 make make install /sbin/ldconfig cd .. 3、创建线程目录 mkdir /tmp/tcmalloc chmod 0777 /tmp/tcmalloc -------------- worker_processes 8; events { worker_connections 4096; } http { client_max_body_size 128m; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server_tokens off; gzip on; gzip_min_length 4096; gzip_buffers 4 8k; gzip_types text/* text/css application/javascript application/x-javascript; gzip_comp_level 1; gzip_vary on; gzip_http_version 1.1; server { listen 8089; server_name localhost; root /usr/local/tomcat/webapps; access_log /dev/null; error_log /dev/null; index index.jsp; error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.(jsp|action|servlet)$ { proxy_pass http://192.168.100.252:8087; } location ~ \.(js|htm|html|jpg|png|gif|css|ico)$ { expires 1h; } } }
相关文章推荐
- Linux下安装nginx
- 在Linux里安装、启动nginx
- 9、linux上安装nginx
- 9、linux上安装nginx
- VPS 快速安装 Linux+Nginx+MySQL+PHP 环境
- linux下nginx的安装与配置
- linux下nginx(反向代理服务器)安装步骤
- LNMP一键安装Linux系统下Nginx+MySQL+PHP这种网站服务器架构
- 在linux下面安装反向代理功能的NGINX
- linux下安装nginx
- linux系统安装nginx服务器——0基础linux安装web服务器6
- Linux操作系统安装nginx
- linux下安装 nginx 支持ssl
- Linux 安装Nginx
- linux上安装nginx
- CentOS下安装LNMP(LINUX+NGINX+MYSQL+PHP)环境
- Linux下安装Nginx详细图解教程(推荐阅读)
- 挺好用的Linux下安装配置php5.5和nginx
- Linux安装Nginx
- CentOS 7 Linux 安装Nginx - yum方式(咋个办呢 zgbn)