Install resin401, download wgethttp: wwwcauchocomdownloadresin-4035targz2, unzip sudotar-vzxfresin-4035targz3, compile cdresin-4035sudoconfigure -- enable-install resin4.0
1. Download # wget http://www.caucho.com/download/resin-4.0.35.tar.gz
2. unzip # sudo tar-vzxf resin-4.0.35.tar.gz
3. compile # cd resin-4.0.35
# Sudo./configure -- enable-64bit -- with-java-home = $ JAVA_HOME
Resin Configuration Summary:
RESIN: 4.0.35
Home:/usr/local/share/resin-4.0.35
Root:/var/resin
Conf:/etc/resin
Log:/var/log/resin
Plugins: common resin_ OS
Init:/etc/init. d/resin
JAVA_HOME:/usr/lib/jvm/jdk1.7.0 _ 13
JNI: 64-bit
Include:-I/usr/lib/jvm/jdk1.7.0 _ 13/include-I/usr/lib/jvm/jdk1.7.0 _ 13/include/linux
CFLAGS:
Cflags_shlib:-fpic
Ld_shlib: gcc
Ldflags_shlib:-shared-fPIC-m64
Libs_shlib:
Epoll () for keepalives
# Make
# Sudo make install
4. start resin # sudo resinctl start
Or
# Sudo java-jar lib/resin. jar start
Or
# Sudo/etc/init. d/resin start
5. test whether the startup is successful # curl http: // localhost: 8080
Resin® Default Home PageResin® Default Home PageThis is the default page for the Resin web server.Documentation is available at /resin-doc.
Administration is available at /resin-admin.
6. stop resin # sudo resinctl stop
Or
# Sudo java-jar lib/resin. jar stop
Or
# Sudo/etc/init. d/resin stop
7. modify the firewall policy and enable common ports such as 8080 # sudo vi/etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
-A input-m state -- state ESTABLISHED, RELATED-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-I lo-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT # Add A row
-A input-m state -- state NEW-m tcp-p tcp -- dport 8080-j ACCEPT # Add A row
-A input-j REJECT -- reject-with icmp-host-prohibited
-A forward-j REJECT -- reject-with icmp-host-prohibited
COMMIT
Restart firewall
# Sudo/etc/init. d/iptables restart
Iptables: clear firewall rules: [OK]
Iptables: Set the chain to policy ACCEPT: filter [OK]
Iptables: uninstalling module: [OK]
Iptables: application firewall rules: [OK]
8. add the resin to the system service to check whether the system service already exists.
# Chkconfig -- list resin
Add resin service
# Chkconfig -- add resin
Restart to check whether resin has been started.
# Reboot
# Service resin status
Resin/4.0.35 status for watchdog at 127.0.0.1: 6600
Watchdog:
Watchdog-pid: 1189
Server 'app-0': ACTIVE
Password: missing
Watchdog-user: root
User: root
Root:/var/resin
Conf:/etc/resin. xml
Pid: 1231
Uptime: 0 days 00h00
Appendix 1: fixed the problem that the JAVA_HOME RESIN configuration cannot be identified and the alternatives command is invalid in CentOS5.8.
Check if the environment variable contains/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin
Add the above to PATH
# Sudo vi/etc/profile