JSP, PHP and Java integration of the development environment 2

Source: Internet
Author: User
Tags exit chmod copy php and sleep socket touch file permissions
JS Seven. Install Tomcat

1. Execute the following command

#cd *jk2*/jk/native2//Enter Connector compilation directory

#./buildconf.sh//Run Configuration Scripts

#./configure--with-apxs2=/usr/local/apache/bin/apxs--enable-jni--enable-eapi

#make//Compilation module

#cd ~jim/src/*jk2*/jk/build/jk2/apache2//into the directory of compiled modules

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

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

Create a shared memory file #touch/usr/local/apache/logs/shm.file//

I just started to install Tomcat, always unsuccessful, then I ran to the Apache website, read a only two-page English instructions, and soon it was ready. I found that the domestic author always like to trick, the original is very simple things make very complex, so that people can not understand, to show their brilliant.

2. Edit the following file

/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"
<directory "/usr/local/tomcat/webapps" >

/usr/local/tomcat/webapps/jsp-examples/for.jsp
<%
int i;
for (i=1;i<100;i++)
{
Out.println ("}
%>

/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 "$" 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 $ ' {start|stop} ' 1>&2
Exit 1
;;
Esac
Exit 0



3. Set Auto Start

#chmod u+x/etc/rc.d/init.d/httpd//modify File Execution permissions
#/sbin/chkconfig--add httpd//Add httpd to the System launch list



Eight. Install CVS

1. Edit the following file

/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. Execute the following command

#/usr/sbin/useradd-d/usr/local/cvsroot CVS//create CVS Admin user.
#passwd CVS//create Admin user password.
# chmod 771/usr/local/cvsroot//Modify CVS root permissions.
# su CVS//Use the identity of the CVS user.
$ cvs-d/usr/local/cvsroot init//Initialize CVS repository.
$exit//Quit the CVS user identity.
#chmod 644/etc/xinetd.d/cvspserver//Modify CVS service boot file permissions.
#/etc/rc.d/init.d/xinetd Restart//reboot XINETD Super server.
# Netstat-lnp|grep 2401//See if the CVS service has been started.
#/usr/sbin/useradd cvspub//create CVS equivalent system user cvspub.
#/usr/sbin/usermod-g CVS cvspub//cvspub users into the CVS group.
#cd/home/tets1//Enter the test project directory.
#cvs Import-m ' This are a test only ' test1 v_0_0_1 start//To import the files for the current project into the CVS repository.



Description

CVS password problem, the previous opinions, some program to generate a password, and some use the so-called soil method to copy shadow password. In fact, I can tell beginners one of the simplest and easiest way is to use Webmin to add CVS users, it will help you generate the password.

3. Edit the following file

/usr/local/cvsroot/cvsroot/passwd
Test1:nxwxabrve7z/w:cvspub
Test2:FZTxeAWW.ySIA:cvspub



Description

Mainly in the end with the user name Cvspub, so that the system users cvspub instead of Test1 and test2 to read and write CVS warehouse.

/usr/local/cvsroot/cvsroot/readers
Test1
/usr/local/cvsroot/cvsroot/writers
Cvs
Test2



Conclusion

At this point, the entire system configuration is complete. In this system configuration process, there have been many errors, unfortunately, through the English site to find solutions, I really hope that the technical level of our domestic site can be raised as soon as possible. Although this article seeks to be concise and clear, but due to time constraints, many places may not be satisfactory, such as you do not understand the place, please contact me, I will adopt your views, will be difficult to understand the place to change. In the configuration process, the reference to a lot of excellent articles, here thank you to the author! Finally, I would like to say that this system was supposed to be built on the FreeBSD platform, but because the Java environment on the FreeBSD platform is not yet complete, I finally have to regret abandoning the best operating system on the Intel platform, choosing the performance and stability of the general Redhat Linux.


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.