How to reinstall tomcat in Ubuntu

Source: Internet
Author: User

Today, I tried to set up tomcat in Ubuntu, because some things were deleted in the middle, and then I wanted to reinstall it.

chmod: cannot access `/etc/tomcat7/tomcat-users.xml‘: No such file or directory

As a result, the installation could not be properly performed. Later, Google found a solution. Original: http://askubuntu.com/questions/228888/installing-tomcat-7-using-apt-get-fails

In fact, some dependency packages are not deleted when you use the built-in apt-GET command to delete them.

Dpkg-L | grep-I <package name> # command to check whether any dependency packages have been deleted dpkg-P <package name> # Delete the dependent packages above

After deletion, you can install it through apt-Get normally.

In addition, do not forget the apt-Get installation method.

 

1. Download and unzip Tomcat

2. Set Environment Variables

$ echo "export CATALINA_HOME=\"/<YOURPATH>/tomcat7\"" >> ~/.bashrc$ source ~/.bashrc

3. Start and access Tomcat

In the Tomcat directory

cd binsudo ./startup.sh

 

4. Add a user account

Edit the Tomcat directoryConf/tomcat-users.xml and add according to commentsFor accounts with Manager-Gui and admin-Gui permissions, see:

<Tomcat-users> <User Username = "admin" Password = "admin" roles = "Manager-Gui, admin-Gui"/> </tomcat-users>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.