Erinevus lehekülje "Apache Tomcat" redaktsioonide vahel
11. rida: | 11. rida: | ||
cd /usr/ports/www/jakarta-tomcat5 | cd /usr/ports/www/jakarta-tomcat5 | ||
make install clean | make install clean | ||
+ | |||
+ | Installation settings: | ||
+ | Destination directory: /usr/local/jakarta-tomcat5.0 | ||
+ | Location of JDK: /usr/local/diablo-jdk1.6.0 | ||
+ | Location of Java port: java/diablo-jdk16 | ||
+ | Running as (user/group): www/www | ||
+ | HTTP port: 8180 | ||
+ | Shutdown listener port: 8005 | ||
+ | AJP 1.3 connector port: 8009 | ||
+ | Logfile stdout: /usr/local/jakarta-tomcat5.0/logs/stdout.log | ||
+ | Logfile stderr: /usr/local/jakarta-tomcat5.0/logs/stderr.log | ||
+ | |||
Palutakse tirida seejärel seoses litsentsitingimustega java ning paigutada see /usr/ports/distfiles | Palutakse tirida seejärel seoses litsentsitingimustega java ning paigutada see /usr/ports/distfiles |
Redaktsioon: 17. juuni 2009, kell 13:05
Sisukord
Sissejuhatus
Apache Tomcat on praktiliselt iseseisev veebiserver ja servletide käivitaja.
Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
Install
Installime tomcat serveri
cd /usr/ports/www/jakarta-tomcat5 make install clean
Installation settings: Destination directory: /usr/local/jakarta-tomcat5.0 Location of JDK: /usr/local/diablo-jdk1.6.0 Location of Java port: java/diablo-jdk16 Running as (user/group): www/www HTTP port: 8180 Shutdown listener port: 8005 AJP 1.3 connector port: 8009 Logfile stdout: /usr/local/jakarta-tomcat5.0/logs/stdout.log Logfile stderr: /usr/local/jakarta-tomcat5.0/logs/stderr.log
Palutakse tirida seejärel seoses litsentsitingimustega java ning paigutada see /usr/ports/distfiles
seejärel apache paigaldus
cd /usr/ports/www/apache2 make with_PROXY_MODULES=yes install clean
Seadistus
avame /etc kaustas rc.conf ja lisame
apache2_enable="YES" tomcat50_enable="YES"
Stardime java serveri
/usr/local/etc/rc.d/tomcat50 start
seadistame nüüd apache. Läheme lihtsamat teed ja kasutame mod_proxy't mod_jk asemel.
Loome virtualhost httpd.conf'i
<VirtualHost *:80> ServerName www.mingine.ee ProxyPass / http://localhost:8180/ ProxyPassReverse / http://localhost:8180/ </VirtualHost>
selleks ,et wad failide lisamine toimiks tuli minul vähemalt kasutada veel käsku
chown -R www:www /usr/local/jakarta-tomcat5.0/webapps/
Seame ka veebi administraatorile parooli
avame kaustas /usr/local/jakarta-tomcat5.0/conf faili tomcat-users.xml
ja muudame selle sisu selliseks
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <role rolename="manager"/> <user username="kasutaja" password="salasona341" roles="manager"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> </tomcat-users>
avades nüüd veebi
www.mingine.ee
tervitab meid jakarta avaleht kus saame manager alla logida enda kasutaja ja parooliga ja lisada wad'e ehk java koodi konteinereid.