In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Download jdk and resin
[root@mylinux4 ~] # mkdir / opt/tools [root@mylinux4 ~] # cd / opt/tools/ [root@mylinux4 tools] # wget http://www.caucho.com/download/resin-3.1.13.tar.gz [root@mylinux4 tools] # lltotal 80384 Mustang Rafael-1 root root 72036348 Oct 2 18:35 jdk-6u34-linux-x64.bin-rw-r--r-- 1 root root 10273075 Oct 2 19:13 resin-3.1.13.tar.gz
(because jdk needs to be downloaded from the oracle official website and needs to log in to the oracle account, so the download process will no longer be described.)
2. Install jdk
[root@mylinux4 tools] # chmod + x jdk-6u34-linux-x64.bin [root@mylinux4 tools] #. / jdk-6u34-linux-x64.bin [root@mylinux4 tools] # lltotal 87592 Rwmuri-1 root root 7374712 Oct 2 19:30 httpd-2.2.23.tar.gzdrwxr-xr-x 8 root root 4096 Oct 2 19:34 jdk1.6.0_34-rwxr-xr-x 1 root root 72036348 Oct 2 18:35 jdk-6u34-linux-x64. Bin-rw-r--r-- 1 root root 10273075 Oct 2 19:13 resin-3.1.13.tar.gz [root@mylinux4 tools] # mkdir-p / usr/local/jdk [root@mylinux4 tools] # cp-a jdk1.6.0_34/* / usr/local/jdk/ [root@mylinux4 tools] # cd / usr/local/jdk [root@mylinux4 jdk] # lsbin jre README.html src.zipCOPYRIGHT lib register.html THIRDPARTYLICENSEREADME.txtdb LICENSE register_ja.htmlinclude man register_zh_ CN.hml [root @ mylinux4 jdk] # / usr/local/jdk/bin/java-versionjava version "1.6.0mm 34" Java (TM) SE Runtime Environment (build 1.6.0_34-b04) Java HotSpot (TM) 64-Bit Server VM (build 20.9-b04) Mixed mode)
3. Configure java environment variables
[root@mylinux4 jdk] # echo'# Add java env below' > > / etc/profile
[root@mylinux4 jdk] # echo 'export JAVA_HOME=/usr/local/jdk' > > / etc/profile
[root@mylinux4 jdk] # echo 'export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib' > > / etc/profile
[root@mylinux4 jdk] # echo 'export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin' > > / etc/profile
[root@mylinux4 jdk] # echo 'export RESIN_HOME=/usr/local/resin' > > / etc/profile
[root@mylinux4 jdk] # echo'# java env ended' > > / etc/profile
[root@mylinux4 jdk] # tail-6 / etc/profile
# Add java env below
Export JAVA_HOME=/usr/local/jdk
Export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
Export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
Export RESIN_HOME=/usr/local/resin
# java env ended
[root@mylinux4 jdk] # source / etc/profile
After the processing is complete, perform the following tests:
[root@mylinux4 jdk] # java-version
Java version "1.6.034"
Java (TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot (TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
[root@mylinux4 jdk] # which java
/ usr/local/jdk/bin/java
[root@mylinux4 jdk] # echo $JAVA_HOME
/ usr/local/jdk
4. Install resin
[root@mylinux4 jdk] # cd / opt/tools/ [root@mylinux4 tools] # tar-zxf resin-3.1.13.tar.gz [root@mylinux4 tools] # lltotal 87596 httpd-2.2.23.tar.gzdrwxr-xr-x 7374712 Oct 2 19:30 httpd-2.2.23.tar.gzdrwxr-xr-x 8 root root 4096 Oct 2 19:34 jdk1.6.0_34-rwxr-xr-x 1 root root 72036348 Oct 2 18:35 jdk-6u34-linux-x64.bindrwxr- Xr-x 14 root root 4096 Oct 2 20:01 resin-3.1.13-rw-r--r-- 1 root root 10273075 Oct 2 19:13 resin-3.1.13.tar.gz [root@mylinux4 tools] # cp-a resin-3.1.13 / usr/local/resin
If resin does not work with apache to generate modules, it does not need to be compiled.
5. Configure resin
[root@mylinux4 tools] # cd / usr/local/resin/conf [root@mylinux4 conf] # lltotal 48 root root 12216 Nov 9 2012 app-default.xml-rw-r--r-- 1 root root 3007 Nov 9 2012 development.conf-rw-r--r-- 1 root root Nov 9 2012 fine.conf-rw-r--r-- 1 root root 641 Nov 9 2012 minimal.conf-rw-r--r-- 1 root root 9970 Nov 9 2012 resin.conf-rw-r--r-- 1 root root 9970 Nov 9 2012 resin.conf.orig
Take a look at the server tag in the default configuration:
[root@mylinux4 conf] # sed-n '88146p' resin.conf-Xmx256m-Xss1m-Xdebug-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote 6600 1m 256 65s 128 15s
Then reconfigure the label:
[root@mylinux4 conf] # sed-I '88146d' resin.conf [root@mylinux4 conf] # vi resin.conf [root@mylinux4 conf] # sed-n' 87 98 p 'resin.conf-Xmx256m # maximum heap size-Xss1m # set stack size per thread-Xdebug-Dcom.sun.management.jmxremote 1m # when jvm memory is less than this specified value, the resin service will restart graceful To free leaked memory space 256 # maximum number of threads 65 s # maximum read and write socket timeout 128 # maximum number of long connections 15s # long connection timeout
6. Start resin
[root@mylinux4 conf] # / usr/local/resin/bin/httpd.sh-server test startResin/3.1.13 started-server 'test' for watchdog at 127.0.0.1 server 6921 [root@mylinux4 conf] # [root@mylinux4 conf] # netstat-lntup | egrep "6911 | 6921 | 8080" tcp 0: 8080: * LISTEN 1528/java tcp 00:: ffff:192.168.100.182:6911: * LISTEN 1528/java tcp 00: ffff:127.0.0.1:6921:: * LISTEN 1499/java
7. Browsers visit the web page
This is the default web page, and the default path for web files is webapps/ROOT. Net in the installation directory.
[root@mylinux4 contrib] # ll / usr/local/resin/webapps/ROOT/
Total 8
-rw-r--r-- 1 root root 1507 Nov 9 2012 index.jsp
Drwxr-xr-x 5 root root 4096 Oct 2 21:35 WEB-INF
The first link that opens is the resin documentation page, which contains a lot of documentation about resin installation and configuration.
The second link is the administration page of resin, where resin provides a status monitoring page similar to haproxy.
To log in to this page, you can register here, generate account information, insert the code into resin's configuration file, and restart the service.
1) sign up for an account first
Enter your user name and password, and then submit.
Here you will generate a piece of code, insert it into resin.conf, and then modify a configuration in resin.conf.
2) modify resin configuration
# change the false here to true
# delete the true here and change it to empty
# this is the code generated in the first step above. Only this line can be added. There is already a tag by default.
3) restart the resin service, and then enter the user name and password to log in.
8. Resin startup script
Under the conrtib under the installation directory of resin, there are init.resin.in and init.resin-iptables files by default, one is the startup script template for resin, and the other is the configuration of the firewall, which can be used with a little modification.
[root@mylinux4 contrib] # ll / usr/local/resin/contrib/total 12When RWMurray Rafael-1 root root 2678 Nov 9 2012 build.xml-rw-r--r-- 1 root root 1792 Nov 9 2012 init.resin.in-rw-r--r-- 1 root root 1079 Nov 9 2012 init.resin-iptables [root@mylinux4 contrib] # vi / usr/local/resin/contrib/init.resin.in [root@mylinux4 contrib] # cp init.resin.in / etc/init. D/resin [root@mylinux4 contrib] # chmod + x / etc/init.d/resin [root@mylinux4 contrib] # / etc/init.d/resin restartStopping resin: .starting resin:. [root@mylinux4 contrib] # netstat-lntup | egrep "6911 | 6921 | 8080" tcp 0: 8080: * LISTEN 1665/java tcp 0 0:: ffff : 192.168.100.182 LISTEN 1640/java 6911: * LISTEN 1665/java tcp 00:: ffff:127.0.0.1:6921:: * LISTEN 1640/java
Here is the adjusted script:
[root@mylinux4 contrib] # cat / etc/init.d/resin #! / bin/sh## Linux startup script for Resin# chkconfig: 345 85 15# description: Resin is a Java Web server.# processname: wrapper.pl## To install, configure this file as needed and copy init.resin# to / etc/rc.d/init.d as resin. Then use "# / sbin/chkconfig resin reset" # JAVA_HOME=/usr/local/jdkRESIN_HOME=/usr/local/resinexport JAVA_HOME RESIN_HOMEJAVA=$JAVA_HOME/bin/java## If you want to start the entire Resin process as a different user,# set this to the user name. If you need to bind to a protected port,# e.g. Port 80, you can't use USER, but will need to use bin/resin.#USER=## Set to the server id to start#SERVER= "- server test" # ARGS= "- resin-home $RESIN_HOME $SERVER" if test-r / lib/lsb/init-functions; then. / lib/lsb/init-functionselse log_daemon_msg () {if [- z "$1"]; then return 1 fi if [- z "$2"]; then echo-n "$1:" return fi echo-n "$1: $2"} log_end_msg () {[- z "$1"] & & return 1 if [$1-eq 0] Then echo "." Else echo "failed!" Fi return $1} ficase "$1" in start) log_daemon_msg "Starting resin" if test-n "$USER"; then su $USER-c "$JAVA-jar $RESIN_HOME/lib/resin.jar $ARGS start" 1 > / dev/null 2 > / dev/nullelse $JAVA-jar $RESIN_HOME/lib/resin.jar $ARGS start 1 > / dev/null 2 > / dev/null filog_end_msg $?; stop) log_daemon_msg "Stopping resin" if test-n "$USER" Then su $USER-c "$JAVA-jar $RESIN_HOME/lib/resin.jar $ARGS stop" 1 > / dev/null 2 > / dev/nullelse $JAVA-jar $RESIN_HOME/lib/resin.jar $ARGS stop 1 > / dev/null 2 > / dev/null filog_end_msg $?;; restart) $0 stop$0 start;; *) echo "Usage: $0 {start | stop | restart}" exit 1esacexit 0
9. Resin adds boot entry
[root@mylinux4 contrib] # chkconfig-- add resin [root@mylinux4 contrib] # chkconfig resin on [root@mylinux4 contrib] # chkconfig-- list resinresin 0:off1:off2:on3:on4:on5:on6:off
10. Resin log settings
The log of resin is saved in logs/access.log under the installation directory by default in the following format:
Here is an example of a resin log:
[root@mylinux4 contrib] # tail-f.. / logs/access.log
192.168.100.1-[02/Oct/2016:21:36:30 + 0800] "GET / resin-admin HTTP/1.1" 30278 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:36:30 + 0800] "GET / resin-admin/ HTTP/1.1" 2786 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:46:48 + 0800] "GET / resin-doc HTTP/1.1" 30276 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:46:48 + 0800] "GET / resin-doc/ HTTP/1.1" 15227 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:46:52 + 0800] "GET / resin-doc/doc/install.xtp HTTP/1.1" 6778 "http://192.168.100.182:8080/resin-doc/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:47:30 + 0800] "GET / resin-admin HTTP/1.1" 30278 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:47:30 + 0800] "GET / resin-admin/ HTTP/1.1" 2786 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:48:01 + 0800] "GET / resin-admin HTTP/1.1" 30278 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:21:48:01 + 0800] "GET / resin-admin/ HTTP/1.1" 2786 "http://192.168.100.182:8080/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
192.168.100.1-[02/Oct/2016:22:15:55 + 0800] "POST / resin-admin/j_security_check?j_uri=status.php HTTP/1.1" 2861 "http://192.168.100.182:8080/resin-admin/"" Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko "
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.