On RedHat6, how do I set the user running Tomcat 6 to be consistent with httpd?

Source: Internet
Author: User
Problem description: 1. On RedHat6, tomcat & amp; httpd has been installed using yuminstall. 2. The default user and group of tomcat are tomcat, and the default user and group of httpd are apache. 3. Now I want to run tomcat & amp; a... as an apache user:
1. On RedHat6, tomcat & httpd has been installed using yum install.
2. The default user and group of tomcat are tomcat, and the default user and group of httpd are apache.
3. Now I want to run tomcat & apache simultaneously as an apache user.
4. How can I set it?

Cause:
In the old system, the configuration file is uploaded through the php screen of httpd, and then imported to the system through the java background (running in tomcat.
The specific process is:
1. Select the configuration file to be imported from the php screen.
2. The uploaded configuration file php will automatically generate a temporary file under the/tmp/directory.
3. php will pass the generated temporary file name (/tmp/***) as a parameter to the java background.
4. Because my httpd users are inconsistent with tomcat users, the java background cannot read php temporary files.

Reply content:

Problem description:
1. On RedHat6, tomcat & httpd has been installed using yum install.
2. The default user and group of tomcat are tomcat, and the default user and group of httpd are apache.
3. Now I want to run tomcat & apache simultaneously as an apache user.
4. How can I set it?

Cause:
In the old system, the configuration file is uploaded through the php screen of httpd, and then imported to the system through the java background (running in tomcat.
The specific process is:
1. Select the configuration file to be imported from the php screen.
2. The uploaded configuration file php will automatically generate a temporary file under the/tmp/directory.
3. php will pass the generated temporary file name (/tmp/***) as a parameter to the java background.
4. Because my httpd users are inconsistent with tomcat users, the java background cannot read php temporary files.

  • -# You can change the configuration.

jsvc -user username

Remember to have an xml configuration file.

In this case, you need to get rid of all the permissions of the log file to ensure normal operation. Generally, the read permission should be available, which is simple to change to httpd, /etc/httpd/conf/httpd. modify the user and group of conf.

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.