Tag Info

Hot answers tagged

77

This should do the trick: Open terminal (Ctrl + Alt + T) and enter the following command: sudo update-rc.d tomcat disable Basically update-rc.d will modify existing runlevel links for the script /etc/init.d/tomcat by renaming start links to stop links.


42

You can try this: Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below. gksudo gedit /etc/default/tomcat7 When the file opens, uncomment the line that sets the JAVA_HOME variable. Save and restart tomcat7 server.


34

There are three important directories for Tomcat: /etc/tomcat6 for configuration /etc/tomcat6 for runtime, called CATALINA_HOME /usr/share/tomcat6-root for webapps The alternative path to Tomcat, called CATALINA_BASE, is /var/lib/tomcat6


28

After installing tomcat by apt-get on Ubuntu 12.04, tomcat create and use this directories: /etc/tomcat6/ /etc/tomcat6/ ├── Catalina │   └── localhost │   ├── ROOT.xml │   └── solr.xml -> ../../../solr/solr-tomcat.xml ├── catalina.properties ├── context.xml ├── logging.properties ├── policy.d │   ├── 01system.policy │   ├── 02debian.policy │   ...


23

The disable|enable API is not stable and might change in the future. I suggest you use the following command to remove all the symlinks in /etc/rc?.d/: update-rc.d -f tomcat remove


22

Both are stored and can be set in /etc/default/tomcat6. By default, CATALINA_HOME is /usr/share/tomcat6, and CATALINA_BASE is /var/lib/tomcat6.


22

You can run the command dpkg -L package to list all the files in the package. For example dpkg -L ubuntu-minimal will only list a couple of small files related to packaging, as it is only an empty meta-package that depends on other packages. dpkg -L tomcat7 is probably what you want.


22

Yes, it is possible to install Tomcat 7.0.42, but you'll have to do it "manually".Here are steps on how to do so: Note: visit this question if you want to know why it's not in the repositories: Why don't the Ubuntu repositories have the latest versions of software? Prerequisite: you need to have Java installed, and we need its path. Java is ...


20

Create the init script in /etc/init.d/tomcat7 with the contents as per below (your script should work too but I think this one adheres more closely to the standards). This way Tomcat will start only after network interfaces have been configured. Init script contents: #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # ...


19

More generic and more visual, with a nice UI: sysv-rc-conf Uncheck the boxes for tomcat7 (runlevels 2 to 5), quit and that's it.


9

Why are these two variables separated? catalina.home points to the location of the common information. catalina.base points to the directory where all the instance specific information are held. So you have 1 home and can have more than 1 base. When should they be separated? When should these two variables be the same? If you have 1 tomcat you ...


9

This is because the package tomcat6-common is still residing in the system. do this sudo apt-get remove tomcat6-common This will remove the conflicting package. Installing Tomcat7 Should work fine now


8

For upstart jobs, you need to disable service like this (e.g. mysql): $ sudo -s # echo "manual" > /etc/init/mysql.override


7

You can use sudo apt-get install tomcat7 to install Tomcat. To disable autostarting, run the following command after installing: sudo update-rc.d tomcat7 disable


7

There is a help in catalina.sh. I will quote it here # Do not set the variables in this script. Instead put them into a script # setenv.sh in CATALINA_BASE/bin to keep your customizations separate. # # JAVA_HOME Must point at your Java Development Kit installation. # Required to run the with the "debug" argument. # Ensure ...


6

You do not own the files, neither do you have the permission to write to /usr/share/tomcat6/webapps. The following command will change the ownership of the webapps folder and files recursively to yourusername. That enables user yourusername to write to that directory. sudo chown -R yourusername /usr/share/tomcat6/webapps


5

If you do want to create your own start up script for whatever reason. Then to run tomcat under another user use su -c "$TOMCAT_HOME/bin/tomcat.sh start" nobody when starting tomcat. (nobody is the user in this case that tomcat will start under) http://www.jguru.com/faq/view.jsp?EID=455567


5

11.10 or later sudo apt-get install tomcat7 or the really easy way:


5

Run following command to find out the tomcat process ps auxwww | grep -v grep | grep tomcat From there you will find out the tomcat process and from there you can see which user is starting this. For eg see the following output vidyadhar@ubuntu:~$ ps auxwww | grep -v grep | grep tomcat root 1941 0.2 1.7 419224 35208 ? Sl Aug12 0:06 ...


5

Here's the way I did it, it keeps the system tomcat and your own personal tomcat instance separate. Install tomcat as per normal: sudo apt-get install tomcat7 Install private instance support: sudo apt-get install tomcat7-user Create local instance in your home folder: tomcat7-instance-create -p 10080 -c 10005 mytomcat Note: -p sets the port number ...


5

sudo ./startup.sh command will execute the startup.sh script in your current directory. This you should do: Add this line to /etc/profile for setting path while booting( Permanent change) export CATALINA_HOME=/opt/apache-tomcat-8.0.24 To set path temporarily execute above command in the current shell. and excute this: sudo ...


4

Two issues: You also need to export the variable into the environment as follows: export CATALINA_HOME=/opt/apache-tomcat-8.0.24 Since you are using /etc/profile, it won't take effect in X again, until you logout and in again of your xsession, not just your shell. Also sudo cannot find ./startup.sh. You need to be in the same directory as this ...


4

You can just sudo apt-get install apache2 or sudo apt-get install apache2.2 If Tomcat is working on 80 port, than you might need more configurations, like default port etc... Hope it helps.


4

I think that answer is not complete (it doesn't say anything about the maximum limit of files open on the system). There are two limits regarding the maximum number of open files: Maximum limit of files open per process. You can see which is the value of this limit using: ulimit -n You can change this limit using: ulimit -n new_limit_number Here is a ...


4

The "Permission denied" error for the logs directory most likely means that the OS user running the Tomcat process does not have write permission on that directory. Assuming you are running Tomcat with user "tomcat7", try setting the ownership and filesystem permissions of the logs directory, e.g.: sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7/logs sudo ...


4

Yes it has been removed. If you issue the removal command again you will see an error stating that Tomcat is not installed. ureadahead is a mechanism whereby anything that is required to be loaded at boot time is marked as such and the location is noted. This speeds up boot time because the filesystem doesn't have to go searching for the files before ...


4

Since tomcat6 depends on openjdk-6-jre, when you install tomcat6, you will also install openjdk. Afterwards, you can choose to either remove or keep it, but to make sure that tomcat6 uses Oracle JAVA, you just need to: sudo vi /etc/default/tomcat6 and set JAVA_HOME: JAVA_HOME=/usr/lib/jvm/java-7-oracle If you want to keep both Oracle an OpenJDK, you can ...


4

Short answer: Using pinning, you can select which packages come from maverick, and automatically get their dependencies, and keep them up-to-date through your package manager. https://help.ubuntu.com/community/PinningHowto Long answer copied from http://askubuntu.com/a/103338/42024: You would be much better off exploring apt pinning, see man ...


3

Finding the user running tomcat If you currently have tomcat running, then you can run ps and see what user a program is running as. ps auxw | grep tomcat This should list the processes that have the name tomcat (and the grep process, but ignore that). The first column of data is the user under which the command is run. For example, finding apache on my ...


3

If you're considering upgrading your Ubuntu to 11.10 soon, then you can just do this now - Oneiric has Eclipse 3.7 (not 3.6 though - but supposedly better, huh?) and Tomcat 7 in repositories. So you'll be able to install everything with sudo apt-get install eclipse tomcat7 Alternatively, downloading any version of eclipse from its website and running it ...



Only top voted, non community-wiki answers of a minimum length are eligible