INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
安装上面几个包即可解决!!!!!!!!!!!
四、配置nginx
在192.168.8.10服务器上操作
所以环境都搭建好,下面开始配置!
1.创建 nginx 配置文件 cd /usr/local/nginx/conf/ mv nginx.conf nginx.conf.bak vi nginx.conf 加入如下内容: user www www; worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; error_log /usr/local/nginx/logs/nginx_error.log crit; pid /usr/local/nginx/nginx.pid; worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http { include mime.types; default_type application/octet-stream; charset utf-8; server_names_hash_bucket_size 128; client_header_buffer_size 2k; large_client_header_buffers 4 4k; client_max_body_size 8m; sendfile on; tcp_nopush on; keepalive_timeout 60; open_file_cache max=204800 inactive=20s; open_file_cache_min_uses 1; open_file_cache_valid 30s; tcp_nodelay on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; upstream tomcats { server 192.168.8.11:8009 srun_id=jvm1; server 192.168.8.12:8009 srun_id=jvm2; #jvm_route $cookie_JSESSIONID reverse; keepalive 10; } server { listen 80 default_server; server_name _; index index.htm index.html; root /data/www/; location / { ajp_pass tomcats; } location /status { stub_status on; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } } log_format access '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for'; access_log /usr/local/nginx/logs/access.log access; }五、配置tomcat集群
在11、12服务器操作