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.