注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Computer Science

I Pressed My Words Here. Will You Read ?

 
 
 

日志

 
 

Resin 3.19 + JDK/JRE under Ubuntu 10.10  

2011-01-25 14:32:44|  分类: With Ubuntu |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |



参考文章:
http://computerscience.blog.163.com/blog/static/174962343201010194551593/
http://caucho.com/resin-4.0/admin/starting-resin.xtp
http://unix-cd.com/vc/www/22/2008-07/10259.html
http://lavafree.javaeye.com/blog/796590
irc #ubuntu-cn

先,下载JDK(Java Development Kit)安装,JDK包含有JRE。

JDK/JRE下载页面:http://java.sun.com/javase/downloads/index.jsp

最近的版本是Java 6(也被称作Java 1.6) Update 21 。http://java.sun.com/javase/downloads/widget/jdk6.jsp

顺便说下,大多较老版本的JDK/JRE已经无法从官网上下载了。

我将jdk-6u21-linux-i586.bin下载到~/Download 文件夹下。

在终端中输入:

chmod +x jdk-6u21-linux-i586.bin

sudo ./jdk-6u21-linux-i586.bin

然后你会在终端中看到这样的文字:

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in
the JDK installation directory) in a browser.

For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....

输入

ls

可以看到多了个jdk1.6.0_21文件夹。在终端输入:

sudo mv jdk1.6.0_21/ /usr/local/

将jdk1.6.0_21文件夹移动到/usr/local/(仅此路径,请勿改动。)

继续输入:

sudo -i

echo "export JAVA_HOME=/usr/local/jdk1.6.0_21/" >> /etc/profile  (如果JAVA_HOME=/usr/local/jdk16.0_21,resin在configure的时候会找不到有效的JAVA_HOME)
echo "export PATH=$PATH:/usr/local/jdk1.6.0_21/bin" >> /etc/profile

echo "export JRE_HOME=/usr/local/jdk1.6.0_21" >> /etc/profile
exit

终端记录:

Done.
will@will-HP-Compaq-6520s:~/Downloads$ ls
081201134343.pdf  jdk1.6.0_21  jdk-6u21-linux-i586.bin  UDownloads
will@will-HP-Compaq-6520s:~/Downloads$ sudo mv jdk
jdk1.6.0_21/             jdk-6u21-linux-i586.bin 
will@will-HP-Compaq-6520s:~/Downloads$ sudo mv jdk1.6.0_21/ /usr/local
will@will-HP-Compaq-6520s:~/Downloads$ ls
081201134343.pdf  jdk-6u21-linux-i586.bin  UDownloads
will@will-HP-Compaq-6520s:~/Downloads$ sudo -i
root@will-HP-Compaq-6520s:~# echo "export JAVA_HOME=/usr/local/jdk1.6.0_21/bin/java" >> /etc/profile
root@will-HP-Compaq-6520s:~# echo "export PATH=$PATH:/usr/local/jdk1.6.0_21/bin" >> /etc/profile
root@will-HP-Compaq-6520s:~# echo "export JRE_HOME=/usr/local/jdk1.6.0_18" >> /etc/profile
root@will-HP-Compaq-6520s:~# exit
logout



将变量写入系统环境中的/etc/profile.此文件在系统启动时加载。这里的exit不能舍去。故,一定重启下,以便系统能够加载这些信息~

由于这里选择的是在系统启动时加载,故请重新启动操作系统再继续后面的操作。若要选择其他情况下加载,比如每次启动终端时加载一次,或者每次登录时加载一次,请参考:

[Tutorial] Manually installing the JDK 6 Update 13 | http://ubuntuforums.org/showthread.php?t=1113039



着,安装resin。
先到 http://www.caucho.com/download/  页面找到Resin Pro 3.1.9,下载,默认下载文件应该在~/Downloads中。
cd ~/Downloads
ls

will@will-HP-Compaq-6520s:~/Downloads$ ls
081201134343.pdf  jdk-6u21-linux-i586.bin  resin-pro-3.1.9.tar.gz  UDownloads
tar zxvf resin-pro-3.1.9.tar.gz (解压缩resin包)
will@will-HP-Compaq-6520s:~/Downloads$ tar zxvf resin-pro-3.1.9.tar.gz
will@will-HP-Compaq-6520s:~/Downloads$ ls
081201134343.pdf         resin-pro-3.1.9         UDownloads
jdk-6u21-linux-i586.bin  resin-pro-3.1.9.tar.gz

sudo mv resin-pro-3.1.9/ /opt (将解压缩得到的包移动到/opt下面,个人习惯)
也可以将/opt(传统方二进制文件的地方)改为/usr/local/(就和弄Java一样)

will@will-HP-Compaq-6520s:~/Downloads$ sudo mv resin-pro-3.1.9/ /opt
will@will-HP-Compaq-6520s:~/Downloads$ ls
081201134343.pdf  jdk-6u21-linux-i586.bin  resin-pro-3.1.9.tar.gz  UDownloads
will@will-HP-Compaq-6520s:~/Downloads$ cd /opt
will@will-HP-Compaq-6520s:/opt$ ls
Dict  image  lost+found  resin-pro-3.1.9  VirtualBox 

cd resin-pro-3.1.9/ (到/opt/resin-pro-3.1.9文件夹目录下)
./configure (执行注册配置)

will@will-HP-Compaq-6520s:/opt$ cd resin-pro-3.1.9/

will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for egrep... (cached) /bin/grep -E
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for JAVA_HOME... /usr/local/jdk1.6.0_21
checking if Java is 64-bit... no
checking for JNI in /usr/local/jdk1.6.0_21/include/linux ... found
Using JVMTI for class reloading
Openssl library was not found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating modules/c/src/Makefile
config.status: creating modules/c/src/common/Makefile
config.status: creating modules/c/src/apache1/Makefile
config.status: creating modules/c/src/apache2/Makefile
config.status: creating modules/c/src/resin_os/Makefile
config.status: creating contrib/init.resin
config.status: executing depfiles commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating modules/c/src/Makefile
config.status: creating modules/c/src/common/Makefile
config.status: creating modules/c/src/apache1/Makefile
config.status: creating modules/c/src/apache2/Makefile
config.status: creating modules/c/src/resin_os/Makefile
config.status: creating contrib/init.resin
config.status: creating modules/c/src/resin/Makefile
config.status: creating modules/c/src/resinssl/Makefile
config.status: executing depfiles commands

ls /usr/local (显示/usr/local文件夹下目录,resin没有装到那里)
ls /usr (resin也没有在/usr下)
will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ ls /usr/local
bin  etc  games  include  jdk1.6.0_21  lib  man  sbin  share  src
will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ ls /usr
bin  games  include  lib  local  sbin  share  src
暂时不管上面的问题,问题将在后面执行resin.jar时得到解决。
make

will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ make
(cd modules/c/src; make)
make[1]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src'
for dir in common resin resinssl resin_os resin_os; do (cd $dir; make); done
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/common'
gcc -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI stream.c
gcc -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI config.c
gcc -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI memory.c
/usr/bin/ld -r -o common.o stream.o config.o memory.o
/opt/resin-pro-3.1.9/libtool --silent --mode=compile gcc -o stream.lo -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI stream.c
/opt/resin-pro-3.1.9/libtool --silent --mode=compile gcc -o config.lo -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI config.c
/opt/resin-pro-3.1.9/libtool --silent --mode=compile gcc -o memory.lo -c  -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI memory.c
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/common'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o std.o std.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o memory.o memory.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o jni_vfs.o jni_vfs.c
jni_vfs.c: In function ‘Java_com_caucho_server_port_JniSelectManager_initNative’:
jni_vfs.c:1246: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result
jni_vfs.c: In function ‘Java_com_caucho_server_port_JniSelectManager_addNative’:
jni_vfs.c:1303: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
jni_vfs.c: In function ‘Java_com_caucho_server_port_JniSelectManager_removeNative’:
jni_vfs.c:1349: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
jni_vfs.c: In function ‘Java_com_caucho_server_port_JniSelectManager_closeNative’:
jni_vfs.c:1751: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
jni_vfs.c: In function ‘Java_com_caucho_vfs_JniFilePathImpl_nativeChangeOwner’:
jni_vfs.c:2245: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o java.o java.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o boot.o boot.c
boot.c: In function ‘Java_com_caucho_boot_JniProcess_exec’:
boot.c:302: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result
boot.c:334: warning: ignoring return value of ‘chroot’, declared with attribute warn_unused_result
boot.c:350: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o profile.o profile.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o heap.o heap.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o lru.o lru.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I. -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic   -c -o symbol.o symbol.c
/usr/bin/ld -shared -o libresin.so std.o memory.o jni_vfs.o java.o boot.o profile.o heap.o lru.o symbol.o crc64.o -lpthread -lc
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resinssl'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -I../resin -DCPU=\"i386\" -DOS=  -D_FILE_OFFSET_BITS=64 -fpic    -c -o ssl_stub.o ssl_stub.c
/usr/bin/ld -shared -o libresinssl.so ssl_stub.o ../resin/memory.o ../resin/std.o ../resin/java.o -lpthread -lc
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resinssl'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI  -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -DCPU=\"i386\" -DOS=   -c -o jni_os.o jni_os.c
jni_os.c: In function ‘Java_com_caucho_server_boot_ResinBoot_execDaemon’:
jni_os.c:257: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI  -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -DCPU=\"i386\" -DOS=   -c -o jni_jvmti.o jni_jvmti.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI  -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/opt/resin-pro-3.1.9\" -I/usr/local/jdk1.6.0_21/include -I/usr/local/jdk1.6.0_21/include/linux -I../common -DCPU=\"i386\" -DOS=   -c -o jni_jvmdi.o jni_jvmdi.c
/usr/bin/ld -shared -o libresin_os.so jni_os.o jni_jvmti.o jni_jvmdi.o -lpthread -lc
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
make[1]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src'

make instasll

will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ make install
make[1]: Entering directory `/opt/resin-pro-3.1.9'
make[1]: Nothing to be done for `install-exec-am'.
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/opt/resin-pro-3.1.9'
(cd modules/c/src; make install)
make[1]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src'
for dir in common resin resinssl resin_os resin_os; do (cd $dir; make install); done
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/common'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/common'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin'
mkdir /opt/resin-pro-3.1.9/libexec
mkdir: cannot create directory `/opt/resin-pro-3.1.9/libexec': File exists
make[2]: [install] Error 1 (ignored)
cp libresin.so /opt/resin-pro-3.1.9/libexec
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resinssl'
mkdir /opt/resin-pro-3.1.9/libexec
mkdir: cannot create directory `/opt/resin-pro-3.1.9/libexec': File exists
make[2]: [install] Error 1 (ignored)
cp libresinssl.so /opt/resin-pro-3.1.9/libexec
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resinssl'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
mkdir /opt/resin-pro-3.1.9/libexec
mkdir: cannot create directory `/opt/resin-pro-3.1.9/libexec': File exists
make[2]: [install] Error 1 (ignored)
cp libresin_os.so /opt/resin-pro-3.1.9/libexec
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
make[2]: Entering directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
mkdir /opt/resin-pro-3.1.9/libexec
mkdir: cannot create directory `/opt/resin-pro-3.1.9/libexec': File exists
make[2]: [install] Error 1 (ignored)
cp libresin_os.so /opt/resin-pro-3.1.9/libexec
make[2]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src/resin_os'
make[1]: Leaving directory `/opt/resin-pro-3.1.9/modules/c/src'
if test /opt/resin-pro-3.1.9 != `pwd`; then \
      mkdir -p /opt/resin-pro-3.1.9/lib; \
      mkdir -p /opt/resin-pro-3.1.9/libexec; \
      cp -r libexec/* /opt/resin-pro-3.1.9/libexec; \
      cp lib/*.jar /opt/resin-pro-3.1.9/lib; \
      mkdir -p /opt/resin-pro-3.1.9/bin; \
      cp bin/* /opt/resin-pro-3.1.9/bin; \
      mkdir -p /opt/resin-pro-3.1.9/webapps; \
      cp -r webapps/* /opt/resin-pro-3.1.9/webapps; \
      mkdir -p /opt/resin-pro-3.1.9/php; \
      cp -r php/* /opt/resin-pro-3.1.9/php; \
      mkdir -p /opt/resin-pro-3.1.9/plugins; \
      cp -r php/* /opt/resin-pro-3.1.9/plugins; \
      mkdir -p /opt/resin-pro-3.1.9/ext-webapp-lib; \
      cp -r php/* /opt/resin-pro-3.1.9/ext-webapp-lib; \
      mkdir -p /opt/resin-pro-3.1.9/conf; \
      cp conf/resin.conf /opt/resin-pro-3.1.9/conf/resin.conf.orig; \
      cp conf/app-default.xml /opt/resin-pro-3.1.9/conf/app-default.xml.orig; \
      if test ! -r /opt/resin-pro-3.1.9/conf/resin.conf; then \
        cp conf/resin.conf /opt/resin-pro-3.1.9/conf/resin.conf; \
        cp conf/app-default.xml /opt/resin-pro-3.1.9/conf/app-default.xml; \
      fi; \
    fi
will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$

到此,Resin算是安装完成。
接着按照官网的步骤执行resin.jar

will@will-HP-Compaq-6520s:/opt/resin-pro-3.1.9$ java -jar lib/resin.jar
Jan 25, 2011 2:04:46 PM com.caucho.boot.WatchdogProcess run
INFO: WatchdogProcess[Watchdog[],1] starting Resin
[14:04:46.264] {watchdog-} WatchdogProcess[Watchdog[],1] starting Resin
Jan 25, 2011 2:04:46 PM com.caucho.boot.WatchdogProcess createProcess
WARNING:   Resin Professional has not found any valid licenses.
  Licenses belong in /opt/resin-pro-3.1.9/licenses.
  See http://www.caucho.com/sales for licensing information.
[14:04:46.275] {watchdog-}   Resin Professional has not found any valid licenses.
[14:04:46.275] {watchdog-}   Licenses belong in /opt/resin-pro-3.1.9/licenses.
[14:04:46.275] {watchdog-}   See http://www.caucho.com/sales for licensing information.
Resin-3.1.9 (built Mon, 13 Apr 2009 11:09:12 PDT)
Copyright(c) 1998-2008 Caucho Technology.  All rights reserved.

  Resin Professional has not found any valid licenses.
  Licenses belong in /opt/resin-pro-3.1.9/licenses.
  See http://www.caucho.com/sales for licensing information.

Using Resin Open Source under the GNU Public License (GPL).

  See http://www.caucho.com for information on Resin Professional.

Starting Resin on Tue, 25 Jan 2011 14:04:47 +0800 (CST)

[14:04:49.457] {main}
[14:04:49.476] {main} Linux 2.6.35-24-generic i386
[14:04:49.476] {main} Java(TM) SE Runtime Environment 1.6.0_21-b06, UTF-8, en
[14:04:49.476] {main} Java HotSpot(TM) Server VM 17.0-b16, 32, mixed mode, Sun Microsystems Inc.
[14:04:49.477] {main} user.name: will
[14:04:49.477] {main} resin.home = /opt/resin-pro-3.1.9/
[14:04:49.477] {main} resin.root = /opt/resin-pro-3.1.9/
[14:04:49.477] {main} resin.conf = /opt/resin-pro-3.1.9/conf/resin.conf
[14:04:49.477] {main}
[14:04:49.826] {main} WebApp[http://localhost:8080] active
[14:04:49.999] {main} WebApp[http://localhost:8080/resin-admin] active
[14:04:50.000] {main} expanding /opt/resin-pro-3.1.9/webapps/resin-doc.war to /opt/resin-pro-3.1.9/webapps/resin-doc
[14:04:50.848] {main} WebApp[http://localhost:8080/resin-doc] active
[14:04:50.849] {main} Host[] active
[14:04:50.853] {main} com.caucho.config.ConfigException:   Resin Professional has not found any valid licenses.
[14:04:50.853] {main}   Licenses belong in /opt/resin-pro-3.1.9/licenses.
[14:04:50.853] {main}   See http://www.caucho.com/sales for licensing information.
[14:04:50.876] {main} hmux listening to localhost.localdomain:6800
[14:04:50.881] {main} http listening to *:8080
[14:04:50.890] {main} Server[id=,cluster=app-tier] active
[14:04:50.891] {main} Resin started in 3322ms
瞧,信息里写道:
[14:04:49.477] {main} user.name: will
[14:04:49.477] {main} resin.home = /opt/resin-pro-3.1.9/
[14:04:49.477] {main} resin.root = /opt/resin-pro-3.1.9/
[14:04:49.477] {main} resin.conf = /opt/resin-pro-3.1.9/conf/resin.conf (配置文件,在这里改写配置文件信息)
至此,启动完成。
通过浏览器访问http://localhost:8080
便是resin的界面。

---------------------------------------------
接下来可以做些什么?
可以参考 http://caucho.com/resin-4.0/admin/http-server.xtp



resin web server


http

virtual hosts

This document describes how to install and run Resin "standalone" (without Apache or IIS).

Resin provides a reliable, fast Web server which can also be used as a load balancer. In our benchmarks, it serves static pages faster than Apache. For most sites, Resin is ideal because of its performance, security and reliability.

Resin 3.19 + JDK/JRE under Ubuntu 10.10 - WillMill - Computer Science

Unix (including Linux and MacOS-X)

Getting Started

The following steps will start Resin for development:

  1. Install JDK 1.5 or later and link /usr/java to your Java home or set environment variable JAVA_HOME.
  2. tar -vzxf resin-3.2.0.tar.gz in /usr/local/share
  3. (Optional) Link /usr/local/share/resin to the resin-3.2.0 directory.
  4. ./configure; make; make install
  5. Run java -jar resin/lib/resin.jar
    • Or run resin/bin/resin.sh
  6. Browse http://localhost:8080
Successful Foreground Startup Output
unix> java -jar resin/lib/resin.jar
Resin Professional 3.2.0 (built Wed, 06 Aug 2008 12:49:30 PDT)
Copyright(c) 1998-2008 Caucho Technology. All rights reserved.

001111.license - 1 Resin server Hogwarts School

Starting Resin on Thu, 07 Aug 2008 19:11:52 -0700 (PDT)

[21:22:21.282] Proxy Cache disk-size=1024M memory-size=8M
[21:22:21.477] Server[id=,cluster=app-tier] starting
[21:22:21.477]
[21:22:21.477] Mac OS X 10.4.7 ppc
[21:22:21.477] Java 1.5.0_06-64, 32, mixed mode, sharing, MacRoman, en, "Apple Computer, Inc."
[21:22:21.477] resin.home = /usr/local/share/resin
[21:22:21.478] resin.root = /var/www
[21:22:21.478]
[21:22:21.492] Loaded Socket JNI library.
[21:22:21.595] hmux listening to localhost:6800
[21:22:21.696] http listening to *:8080
[21:22:21.842] Host[] starting
[21:22:22.089] WebApp[] starting

Deployment Directories

When deploying, it's a good idea to create a bit of structure to make Resin and website upgrades easier and more maintainable.

  1. Create a user to run Resin (e.g. resin or another non-root user)
  2. Link /usr/local/share/resin to the current Resin directory. This is $RESIN_HOME.
  3. Create a deployment root, e.g. /var/www, owned by the resin user. This is $RESIN_ROOT.
  4. Put the modified resin.xml in /etc/resin/resin.conf
  5. Put the site documents in /var/www/hosts/default/webapps/ROOT.
  6. Put any .war files in /var/www/hosts/default/webapps.
  7. Put any virtual hosts in /var/www/hosts/www.foo.com.
  8. Output logs will appear in /var/www/log.
  9. Create a startup script and configure the server to start it when the machine reboots.

Startup Script

You can create your own startup script which will start and stop the ResinWatchdog, and will pass any command-line arguments. The script might typically do a number of things:

  1. Configure the location of Java in JAVA_HOME
  2. Configure the location of Resin in RESIN_HOME
  3. Configure your web site directory in RESIN_ROOT
  4. Select a server and pid file if you have multiple Resin servers.
  5. Start and stop the ResinWatchdog.

The start script might look like:

Example start.sh script
#!/bin/sh

JAVA_HOME=/usr/java
RESIN_HOME=/usr/local/share/resin
RESIN_ROOT=/var/www

java=$JAVA_HOME/bin/java

export JAVA_HOME
export RESIN_HOME
export RESIN_ROOT

$java -jar $RESIN_HOME/lib/resin.jar \
-root-directory $RESIN_ROOT \
-conf /etc/resin/resin.xml \
-server a \
$*

This script would be called as ./start.sh start to start and ./start.sh stop to stop.

The -server argument is only necessary if you have multiple servers (JVM instances) either on different machines or the same machine. The load balancing and distributed sessions pages describe when you might use -server.

  评论这张
 
阅读(3424)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017