JSP, PHP, and JAVA integrated development environment 2

Source: Internet
Author: User
JSP, PHP, and JAVA integrated development environment 2-General Linux technology-Linux programming and kernel information, the following is a detailed description. Development Environment Integrating JSP, PHP, and JAVA 1
Author: XiaoYu

7. install Tomcat

1. Execute the following command

# Cd * jk2 */jk/native2 // enter the connector compilation directory

#./Buildconf. sh // run the configuration script

#./Configure -- with-apxs2 =/usr/local/apache/bin/apxs -- enable-jni -- enable-EAPI

# Make // compilation Module

# Cd ~ Jim/src/* jk2 */jk/build/jk2/apache2 // enter the directory of the compiled Module

# Cp *. so/usr/local/apache/modules // copy the module to the Apache directory

# Cp-R jakarta-tomcat-5.0.19/usr/local/tomcat // install Tomcat

# Touch/usr/local/apache/logs/shm. file // create a shared memory file

When I first started to install Tomcat, I always failed. Then I ran to the Apache website and read a two-page English description. I soon configured it. I found that Chinese authors always like to learn more about it. They make complicated things and make them easy to understand.

2. Edit the following files

/Usr/local/apache/conf/httpd. conf
LoadModule jk2_module modules/mod_jk2.so
JkSet config. file/usr/local/apache/conf/workers2.properties
DocumentRoot "/usr/local/tomcat/webapps"


/Usr/local/tomcat/webapps/jsp-examples/for. jsp
<%
Int I;
For (I = 1; I <100; I ++)
{
Out. println (" Hello World! ");
}
%>

/Usr/local/tomcat/conf/jk2.propertie
Handler. list = request, container, channelSocket
ChannelSocket. port = 8009
ChannelSocket. address = 127.0.0.1
ChannelSocket. maxPort = port + 10

/Usr/local/apache/conf/workers2.properties
[Shm]
File =/usr/local/apache/logs/shm. file
Size = 1048576
[WorkerEnv:]
Info = Global server options
Timing = 1
Debug = 0
[Channel. socket: localhost: 8009]
Port = 8009
Host = 127.0.0.1
[Ajp13: localhost: 8009]
Channel = channel. socket: localhost: 8009
[Uri:/*. jsp]
Worker = ajp13: localhost: 8009

/Etc/rc. d/init. d/httpd
#! /Bin/sh

# Chkconfig: 2345 92 12
# Description: Starting Apache and Tomcat Server

LD_LIBRARY_PATH =/usr/java/j2sdk1.4.2 _ 04/jre/lib/i386:/usr/java/j2sdk1.4.2 _ 04/jre/lib/i386/server
Export LD_LIBRARY_PATH

CATALINA_BASE =/usr/local/tomcat
Export CATALINA_BASE

CATALINA_HOME =/usr/local/tomcat
Export CATALINA_HOME

APACHE_HOME =/usr/local/apache
Export APACHE_HOME

JAVA_HOME =/usr/java/j2sdk1.4.2 _ 04
Export JAVA_HOME

PROFILEDIR =/var/run

Case "$1" in
Start)

If [-f $ PROFILEDIR/Tomcat5_Apache2]; then
Echo "Running Tomcat5_Apache2"
Else
If [-f $ CATALINA_HOME/bin/startup. sh]; then
If [-f $ APACHE_HOME/bin/apachectl]; then
"$ CATALINA_HOME/bin/startup. sh"
Echo "Startting Tomcat5"
Sleep 3
Echo "Startting Apache2"
$ APACHE_HOME/bin/apachectl start
Echo "."
Touch $ PROFILEDIR/Tomcat5_Apache2
Else
Echo "Apache File Not Founds"
Fi
Else
Echo "Tomcat File Not Founds"
Fi
Fi
;;

Stop)
If [-f $ PROFILEDIR/Tomcat5_Apache2]; then
If [-f $ CATALINA_HOME/bin/shutdown. sh]; then
If [-f $ APACHE_HOME/bin/apachectl]; then
"$ CATALINA_HOME/bin/shutdown. sh"
Echo "Stopping Tomcat5"
Sleep 3
Echo "Stopping Apache2"
$ APACHE_HOME/bin/apachectl stop
Rm $ PROFILEDIR/Tomcat5_Apache2
Else
Echo "Apache File Not Founds"
Fi
Else
Echo "Tomcat File Not Founds"
Fi
Else
Echo "Not Running Tomcat5_Apache2"
Fi
;;
*)
Echo "Usage; 'basename $ 0' {start | stop}" 1> & 2
Exit 1
;;
Esac
Exit 0



3. Set automatic start

# Chmod u + x/etc/rc. d/init. d/httpd // modify the File Execution permission
#/Sbin/chkconfig -- add httpd // add httpd to the system startup list



8. Install CVS

1. Edit the following files

/Etc/xinetd. d/cvspserver
Service cvspserver
{
Socket_type = stream
Wait = no
User = root
Server =/usr/bin/cvs
Server_args =-f -- allow-root =/usr/local/cvsroot pserver
Log_on_failure + = USERID
}



2. Run the following command:

#/Usr/sbin/useradd-d/usr/local/cvsroot cvs // create a CVS management user.
# Passwd cvs // create and manage user passwords.
# Chmod 771/usr/local/cvsroot // modify the CVS root directory permission.
# Su cvs // use the identity of the CVS user.
$ Cvs-d/usr/local/cvsroot init // initialize the CVS repository.
$ Exit // exit the CVS user identity.
# Chmod 644/etc/xinetd. d/cvspserver // modify the CVS Service Startup File Permission.
#/Etc/rc. d/init. d/xinetd restart // restart the xinetd super server.
# Netstat-lnp | grep 2401 // check whether the CVS service has been started.
#/Usr/sbin/useradd cvspub // create a CVS equivalent system user cvspub.
#/Usr/sbin/usermod-G cvs cvspub // Add cvspub users to the cvs group.
# Cd/home/tets1 // enter the project directory for testing.
# Cvs import-m' this is a test only 'test1 v_0_0_1 start // import the files of the current project to the CVS repository.



Note:

The password of CVS is different in the past. Some of them are programmed to generate the password, and some are copied using the so-called soil method. In fact, I can tell beginners the simplest and most convenient way to add a CVS user using Webmin, And it will generate a password for you.

3. Edit the following files

/Usr/local/cvsroot/CVSROOT/passwd
Test1: NXWxabrVe7z/w: cvspub
Test2: FZTxeAWW. ySIA: cvspub



Note:

The User Name cvspub is added at the end to allow the System user cvspub to replace test1 and test2 to read and write the CVS repository.

/Usr/local/cvsroot/CVSROOT/readers
Test1
/Usr/local/cvsroot/CVSROOT/writers
Cvs
Test2



Conclusion

So far, the entire system configuration is complete. Many errors have occurred in the system configuration process. Unfortunately, the solution is found through the English site. I hope the technical level of our domestic site can be improved as soon as possible. Although this article strives to be concise and clear, it may not be satisfactory in many places due to time constraints. If you do not understand anything, please contact me and I will accept your comments, modify obscure places. Many excellent articles have been referenced in the configuration process. Thank you for choosing here! Finally, I would like to explain that the system was originally built on the FreeBSD platform, but the JAVA environment on the FreeBSD platform is not complete yet, finally, I had to give up the best operating system on the INTEL Platform and choose RedHat Linux with average performance and stability.
Related Article

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.