Ubuntu Server Guide Changes, errors and bugs


Download 1.27 Mb.
Pdf ko'rish
bet218/286
Sana20.12.2022
Hajmi1.27 Mb.
#1035308
1   ...   214   215   216   217   218   219   220   221   ...   286
Bog'liq
ubuntu-server-guide

Changing JVM used
By default Tomcat will run preferably with OpenJDK JVMs, then try the Sun JVMs, then try some other
JVMs. You can force Tomcat to use a specific JVM by setting JAVA_HOME in /etc/default/tomcat7:
JAVA_HOME=/u s r / l i b /jvm/ java −6−sun
265


Declaring users and roles
Usernames, passwords and roles (groups) can be defined centrally in a Servlet container. This is done in the
/etc/tomcat7/tomcat−users.xml file:


Using Tomcat standard webapps
Tomcat is shipped with webapps that you can install for documentation, administration or demo purposes.
Tomcat documentation
The tomcat7-docs package contains Tomcat documentation, packaged as a webapp that you can access by
default at http://yourserver:8080/docs. You can install it by entering the following command in the terminal
prompt:
sudo apt i n s t a l l tomcat7−d o c s
Tomcat administration webapps
The tomcat7-admin package contains two webapps that can be used to administer the Tomcat server using
a web interface. You can install them by entering the following command in the terminal prompt:
sudo apt i n s t a l l tomcat7−admin
The first one is the manager webapp, which you can access by default at http://yourserver:8080/manager/html.
It is primarily used to get server status and restart webapps.
Note
Access to the manager application is protected by default: you need to define a user with the
role “manager-gui” in /etc/tomcat7/tomcat−users.xml before you can access it.
The second one is the host-manager webapp, which you can access by default at http://yourserver:8080/host-
manager/html. It can be used to create virtual hosts dynamically.
Note
Access to the host-manager application is also protected by default: you need to define a user
with the role “admin-gui” in /etc/tomcat7/tomcat−users.xml before you can access it.
For security reasons, the tomcat7 user cannot write to the /etc/tomcat7 directory by default. Some features
in these admin webapps (application deployment, virtual host creation) need write access to that directory.
If you want to use these features execute the following, to give users in the tomcat7 group the necessary
rights:
sudo chgrp −R tomcat7 / e t c / tomcat7
sudo chmod −R g+w / e t c / tomcat7
266



Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   214   215   216   217   218   219   220   221   ...   286




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling