Als erstes installieren wir den Apache und Apache dev, sollte das noch nicht geschehen sein:
Code: Select all
apt-get install apache apache-dev
Code: Select all
groupadd resin
useradd -s /bin/false resin
http://java.sun.com/
Ich musste es erst lokal speichern und dann auf den Server laden.
Nun schieben wir das jdk nach /usr/local/src: ( :!: java... soll der Name der Datei sein, bitte anpassen!!)
Code: Select all
mv java... /usr/local/src
Code: Select all
chmod 700
Code: Select all
./java...
Code: Select all
mv java... java
mv java /usr/local/bin
Code: Select all
ln -s /usr/local/bin/java /usr/java
Erstmal laden wir uns den Resin mal runter:
Code: Select all
cd /usr/local/src
wget http://www.caucho.com/download/resin-3.0.4.tar.gz
Code: Select all
tar xzvf resin-3.0.4.tar.gz
mv resin-3.0.4 resin
mv resin /usr/local/bin
ln -s /usr/local/bin/resin /usr/resin
Code: Select all
cd /etc/apache
whoami (wenn root, dann gut, sonst werden!)
editor httpd.conf
Code: Select all
LoadModule caucho_module /usr/lib/apache/1.3/mod_caucho.so
Code: Select all
AddModule mod_caucho.c
Code: Select all
<IfModule mod_caucho.c>
ResinConfigServer localhost 6802
<Location /caucho-status>
SetHandler caucho-status
</Location>
</IfModule>
Code: Select all
cd /usr/resin
whoami [wenn root dann gut, sonst werden]
./configure -with-apache-include=/usr/include/apache-1.3/
-with-apache-libexec=/usr/lib/apache/1.3/
--with-apache-conf=/etc/apache/httpd.conf
make
make install
Code: Select all
<document-directory>doc</document-directory>
wird zu:
<document-directory>/var/www</document-directory>
Code: Select all
whoami (wenn root, dann gut, sonst werden)
cd /var/www
mkdir resin-doc
mkdir WEB-INF
mkdir resin
chown resin.resin resin-doc
chown resin.resin WEB-INF
chown resin.resin resin
Code: Select all
cd /var/www/resin
su - m resin
echo "2 + 2 = <%= 2 + 2 %>" > test.jsp
Code: Select all
su root
cd /usr/local/bin
chown -R resin.resin resin
Code: Select all
su root
/etc/init.d/apache stop
/etc/init.d/apache start
cd /usr/resin/bin
su -m resin (whoami resin)
./httpd.sh start
Code: Select all
http://deinedomain.tld/caucho-status
Jetzt rufen wir mal unsere test Datei auf:
Code: Select all
http://deinedomain.tld/resin/test.jsp
Hierzu installiert Ihr das von CaptainCrunch zur Verfügung gestellte chpax deb, zu finden unter:
http://linux.roothell.org/kernel/chpax/
Dann installieren mit:
Code: Select all
dpkg -i chpax_x.x-x_i386.deb
chpax -sp /usr/java/bin/java
Code: Select all
cd /usr/resin/bin
./httpd.sh start >> log.txt 2>&1
Code: Select all
http://domain.tld/caucho-status
Sollte das alles bis hier geklappt haben, ist der resin mit apache auf debian installiert.
Jedoch ist noch nix optimiert, bitte postet fleißig Optimierungen und besser mach Tipps.
Mfg,
Bodo [hrhr mein erstes HowTo
