Managing Resin on CentOS/Amazon Linux

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
 
Line 213: Line 213:
  
 
<pre>
 
<pre>
 +
$ sudo yum install java-1.6.0-openjdk-devel
 
$ sudo ln -s /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/include/ /usr/lib/jvm/jre/include
 
$ sudo ln -s /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/include/ /usr/lib/jvm/jre/include
 
</pre>
 
</pre>

Latest revision as of 00:00, 24 May 2012

This should work for RedHat and Fedora.

Working with yum....

http://prefetch.net/articles/yum.html

See if Resin is installed and what version:

$ yum list | grep resin

Output

resin-pro.x86_64                       4.0.27-1                     @/resin-pro-4.0.27-1.x86_64

Show some details about resin-pro install.

$ yum list resin-pro

Output

Loaded plugins: fastestmirror, priorities, security, update-
              : motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-east-1.amazonaws.com
 * amzn-updates: packages.us-east-1.amazonaws.com
Installed Packages
resin-pro.x86_64      4.0.27-1      @/resin-pro-4.0.27-1.x86_64

More information about Resin install:

$ yum info resin-pro


Output


Loaded plugins: fastestmirror, priorities, security, update-
              : motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-east-1.amazonaws.com
 * amzn-updates: packages.us-east-1.amazonaws.com
Installed Packages
Name        : resin-pro
Arch        : x86_64
Version     : 4.0.27
Release     : 1
Size        : 29 M
Repo        : installed
From repo   : /resin-pro-4.0.27-1.x86_64
Summary     : Resin Professional application server
License     : Caucho
Description : 


Show files that are in this install using rpm (sans the www/doc which is long):

$ rpm -ql resin-pro | grep -v "/www/doc"

Output

/etc/init.d/resin
/etc/resin
/etc/resin/app-default.xml
/etc/resin/cluster-default.xml
/etc/resin/health.xml
/etc/resin/resin-inf
/etc/resin/resin.properties
/etc/resin/resin.xml
/usr/bin
/usr/bin/resinctl
/usr/local/share
/usr/local/share/resin
/usr/local/share/resin-4.0.27
/usr/local/share/resin-4.0.27/bin
/usr/local/share/resin-4.0.27/bin/resin.sh
/usr/local/share/resin-4.0.27/bin/resinctl
/usr/local/share/resin-4.0.27/bin/resinctl.in
/usr/local/share/resin-4.0.27/bin/start.bat
/usr/local/share/resin-4.0.27/bin/stop.bat
/usr/local/share/resin-4.0.27/endorsed
/usr/local/share/resin-4.0.27/lib
/usr/local/share/resin-4.0.27/lib/activation.jar
/usr/local/share/resin-4.0.27/lib/eclipselink-2.3.0.jar
/usr/local/share/resin-4.0.27/lib/javaee-16.jar
/usr/local/share/resin-4.0.27/lib/javamail-141.jar
/usr/local/share/resin-4.0.27/lib/jsf-mojarra-2.1.3.jar
/usr/local/share/resin-4.0.27/lib/pro.jar
/usr/local/share/resin-4.0.27/lib/resin-eclipselink.jar
/usr/local/share/resin-4.0.27/lib/resin.jar
/usr/local/share/resin-4.0.27/lib/validation-api-1.0.0.GA.jar
/usr/local/share/resin-4.0.27/lib/webservices-api.jar
/usr/local/share/resin-4.0.27/lib/webservices-extra-api.jar
/usr/local/share/resin-4.0.27/lib/webutil.jar
/usr/local/share/resin-4.0.27/libexec64
/usr/local/share/resin-4.0.27/libexec64/libresin.so
/usr/local/share/resin-4.0.27/libexec64/libresin_os.so
/usr/local/share/resin-4.0.27/libexec64/libresinssl.so
/usr/local/share/resin-4.0.27/webapp-jars
/usr/local/share/resin-4.0.27/webapp-jars/hibernate-validator-4.0.2.GA.jar
/usr/local/share/resin-4.0.27/webapp-jars/slf4j-api-1.6.1.jar
/var/log/resin
/var/www
/var/www/keys
/var/www/licenses
/var/www/project-jars
/var/www/project-jars/resin-cxf-4.0.27.jar
/var/www/project-jars/resin-xwork2-4.0.27.jar
/var/www/webapps
/var/www/webapps/ROOT
/var/www/webapps/ROOT/index.jsp

Under Ubuntu and Debian I need to do an apt-get purge, but there is no purge options for yum because yum remove does a purge by default.

http://serverfault.com/questions/41502/yum-equivalent-of-apt-get-purge


$ sudo yum remove resin-pro

Output

Loaded plugins: fastestmirror, priorities, security, update-motd
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package resin-pro.x86_64 0:4.0.27-1 will be erased
--> Finished Dependency Resolution
amzn-main                                                                                                                                                         | 2.1 kB     00:00     
amzn-updates                                                                                                                                                      | 2.3 kB     00:00     

Dependencies Resolved

=========================================================================================================================================================================================
 Package                                  Arch                                  Version                                 Repository                                                  Size
=========================================================================================================================================================================================
Removing:
 resin-pro                                x86_64                                4.0.27-1                                @/resin-pro-4.0.27-1.x86_64                                 29 M

Transaction Summary
=========================================================================================================================================================================================
Remove        1 Package(s)

Installed size: 29 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : resin-pro-4.0.27-1.x86_64                                                                                                                                             1/1 
warning: /etc/resin/resin.xml saved as /etc/resin/resin.xml.rpmsave
warning: /etc/resin/resin.properties saved as /etc/resin/resin.properties.rpmsave
warning: /etc/init.d/resin saved as /etc/init.d/resin.rpmsave

Removed:
  resin-pro.x86_64 0:4.0.27-1                                                                                                                                                            

Complete!

At this point there are some stray files:

$ sudo rm -rf /var/www/*


Setting up development environment:

#Internal
$ sudo yum install svn
$ sudo yum install ant
#Everyone
$ sudo yum groupinstall "Development Tools"


Use these configure option to install from source.

$ ./configure --enable-64bit --enable-ssl

I get this error. I have got this before (thus the notes).

Output

PRO: . resin
configure: error:

    *** Can't find JNI directory in JAVA_HOME=/usr/lib/jvm/jre
    *** JNI is expected in /usr/lib/jvm/jre/include/linux

The workaround to that is

$ sudo yum install java-1.6.0-openjdk-devel
$ sudo ln -s /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/include/ /usr/lib/jvm/jre/include

Then I get this error.

Output

checking if Java is 64-bit... yes
checking if /bin/cp accepts -u... yes
PRO: . resin
checking for JNI in /usr/lib/jvm/jre/include/linux ... found
Using JVMTI for class reloading
configure: error: Can't find valid OpenSSL include in 

Install open-ssl-devel.

$ sudo yum install openssl-devel

Success looks like this:

Resin Configuration summary:

  RESIN_HOME  : /usr/local/share/resin-4.0.s120520
      root    : /var/www
      conf    : /etc/resin
      log     : /var/log/resin
      plugins : common resin_os  resin
      init    : /etc/init.d/resin
  JAVA_HOME: /usr/lib/jvm/jre

    + 64-bit JNI in -I/usr/lib/jvm/jre/include -I/usr/lib/jvm/jre/include/linux
    + JNI CFLAGS: 
    + epoll() for keepalives
    + 
        OpenSSL include: /usr/include
        OpenSSL lib: 
        OpenSSL libraries:  -lssl -lcrypto
$ make
$ make install
Personal tools
TOOLBOX
LANGUAGES