CentOS

From Resin 3.0

Revision as of 23:43, 22 June 2010 by Emil (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installation

To install Resin on CentOS, you may need to install gcc and Java. To install gcc, use

sudo yum install gcc

To install Java, you can either install OpenJDK using yum or download the JDK RPM binary from the Oracle Java website. If you chose to install the Sun/Oracle JDK, make sure to set your JAVA_HOME environment variable to /usr/java/default.

If you plan to use OpenSSL with Resin Professional, you'll need to install openssl-devel:

sudo yum install openssl-devel

Once you've installed at least gcc and Java, you can build the JNI portions of Resin using

./configure; make; make install

in the unpacked Resin directory.

Before starting Resin, make sure that you have created a user for Resin. By default, Resin uses the "www-data" user. This user typically doesn't exist on CentOS, so you'll need to create it:

sudo /usr/sbin/adduser -M -s /bin/false www-data

If you choose another user, edit /etc/resin/resin.xml before starting Resin.

Once you have created the user under which you will run Resin, change the owner /var/www directory to that user. For www-data, you could do this with:

sudo chown -R www-data:www-data /var/www

Now you can start Resin:

sudo /etc/init.d/resin start

To run Resin on startup, add it to the startup list using ntsysv or the following command:

sudo /sbin/chkconfig --add resin

SELinux

When using Resin with Apache HTTPD on CentOS, SELinux may block the Apache process from connecting to Resin. To allow Apache to make these connections, run:

setsebool -P httpd_can_network_connect on 

Take note that this command will allow Apache to make any outbound network connections. Check with your local security policies.

Personal tools