installing the JDK and configuring environment variables
1. Download JDK
2. Decompression
Tar xzf jdk-7u79-linux-x64.tar.gz
3. Configure environment variables (reboot required after configuration is complete)
Open/etc/profile with a text editor
add at the end of profile:
export java_home=/usr/share/jdk1.7.0_79
export path= $JAVA _home/ Bin: $PATH
export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Install Tomcat
Just copy it in.
Install Nginx
http://blog.csdn.net/gaojinshan/article/details/37603157
After the installation is complete, access to the 80 port of this machine, can come out welcome to nginx! description of successful Installation
Installing the Telnet service side
http://jingyan.baidu.com/article/9f63fb91ac7ebcc8400f0e94.html shutdown Firewall
There are 3 different ways
1) Open after reboot
: Chkconfig iptables
on close: chkconfig iptables off
2) immediate effect, reboot failure
open: Service iptables start
Shutdown: Service iptables stop
needs to explain that for other services under Linux you can use the above command to perform open and close operations.
when the firewall is turned on, make the following settings, open the relevant port,
modify the/etc/sysconfig/iptables file, add the following:
-A rh-firewall-1-input-m State--state NEW -M tcp-p tcp--dport 80-j ACCEPT
-A rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 22-j
nginx Configuration
Http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html
Post a configuration that you have configured successfully
#user nobody;
Worker_processes 1;
#error_log Logs/error.log;
#error_log Logs/error.log Notice;
#error_log Logs/error.log Info;
#pid Logs/nginx.pid;
Events {worker_connections 1024;}
HTTP {include mime.types;
Default_type Application/octet-stream; #log_format Main ' $remote _addr-$remote _user [$time _local] "$request" ' # ' $status $body _bytes_sen
T "$http _referer" "$http _user_agent" "$http _x_forwarded_for";
#access_log Logs/access.log Main;
Sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
Keepalive_timeout 65;
#gzip on;
Upstream Mysvr {server 127.0.0.1:31080 weight=2;
Server 127.0.0.1:32080 weight=6;
} server {Listen 80;
server_name localhost;
#charset Koi8-r;
#access_log Logs/host.access.log Main;
Location/{root HTML; Index index.html INDex.htm; } location ~ \.
(do|jsp)? $ {Proxy_set_header Host $host;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
Proxy_pass Http://mysvr;
} #error_page 404/404.html;
# REDIRECT Server error pages to the static page/50x.html # Error_page 502 503 504/50x.html;
Location =/50x.html {root html; # Proxy The PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ {#
Proxy_pass http://127.0.0.1;
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ {
# root HTML;
# Fastcgi_pass 127.0.0.1:9000;
# Fastcgi_index index.php;
# Fastcgi_param Script_filename/scripts$fastcgi_script_name; # include fastcgi_params;
#} # Deny access to. htaccess files, if Apache ' s document Root # concurs with Nginx ' s one #
#location ~/\.ht {# deny all; #}} # Another virtual host using mix of ip-, name-, and port-based configuration # #server {# l
Isten 8000;
# Listen somename:8080;
# server_name somename alias Another.alias;
# location/{# root HTML;
# index index.html index.htm;
#} # HTTPS Server # #server {# listen 443 SSL;
# server_name localhost;
# ssl_certificate Cert.pem;
# Ssl_certificate_key Cert.key;
# Ssl_session_cache shared:ssl:1m;
# ssl_session_timeout 5m; # ssl_ciphers high:!anull:!
MD5;
# ssl_prefer_server_ciphers on;
# location/{# root HTML;
# index index.html index.htm;
# }
#}
}
Redis Configuration
Install Redis
Copy redis-2.8.18.tar.gz to a Linux directory, unzip the boot Redis
CD redis-2.8.18/src/
./redis-server Configure Redis in Tomcat
1. Introduction of 3 Dependency packs in Tomcat's Lib
Tomcat-redis-session-manager-1.2-tomcat-6.jar
Tomcat-redis-session-manager-1.2-tomcat-7.jar
Commons-pool-1.6.jar
Jedis-2.1.0.jar
2. Configure Redis configuration information in Tomcat's Context.xml file
<valve classname= "Com.radiadesign.catalina.session.RedisSessionHandlerValve"/>
<manager classname= " Com.radiadesign.catalina.session.RedisSessionManager "
host=" 127.0.0.1 "
port=" 6379 "
database=" "0"
maxinactiveinterval= "/>"