Article Title: Configure apache, php, jdk, and resin in centos. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
At present, there are many versions of this configuration on the Internet. In general, the basic steps are correct, but there are more or less discrepancies in some details. Here, I will write a basic outline based on today's configuration process: According to this outline, it should be able to be installed normally.
1. modules required for system installation:
[Root @ cathysky81 ~] # Vi install. sh
Yum install gcc
Yum install cpp
Yum install gcc-c ++
Yum install ncurses
Yum install ncurses-devel
Yum install gd-devel php-gd
Yum install gd-devel
Yum install gcc
Yum install cpp
Yum install gcc-c ++
Yum install ncurses
Yum install ncurses-devel
Yum install gd-devel php-gd
Yum install gd-devel
Yum install zlib-devel
Yum install freetype-devel freetype-demos freetype-utils
Yum install libpng-devel libpng10 libpng10-devel
Yum install libjpeg-devel
Yum install ImageMagick
Yum install php-gd
Yum install flex
Yum install ImageMagick-devel
[Root @ cathysky81 ~] # Sh install. sh
Modules required by the system are installed
2. The installation of mysql, apache, and php is the same as the previous installation. If you have not correctly configured a combination of mysql + apache + php, for more information, see the installation documentation in the php documentation.
3. Install jdk.
The jdk installation process is as follows:
1) to begin.
2) chmod a + x j2sdk-1_4_2_11-linux-i586.bin
3)./j2sdk-1_4_2_11-linux-i586.bin
Decompress the package in the current directory to generate a directory named j2sdk_rj4xxxxx,
Mv j2sdk_rj4xxxxx/usr/local/jdk
4) Modify/etc/profile
Add the following content:
JAVA_HOME =/usr/local/jdk
RESIN_HOME =/usr/local/resin
CLASSPATH =.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib: $ RESIN_HOME/lib:/usr/local/jdbc
Export RESIN_HOME JAVA_HOME CLASSPATH
Note: export must be written. If you do not specify whether to enable resin, an error will occur !!
5) Save/etc/profile
4. install resin:
1) download resin-3.0.18.tar.gz to the http://www.caucho.com. This is the latest version.
2) decompress and generate the directory resin-3.0.18.
3) execute mv resin-3.0.18/usr/local/resin.
4) recompile resin:
. /Configure -- with-apxs =/usr/local/apache/bin/apxs -- with-java-home =/usr/local/jdk/-- prefix =/usr/local/resin
Make & make install & make clean
If the/etc/profile settings are correct, this step can run properly.
5. Configuration
1) Modify/usr/local/apache/conf/httpd. conf
Added:
LoadModule caucho_module/usr/local/apache/libexec/mod_caucho.so
ResinConfigServer localhost 6802.
CauchoStatus yes
SetHandler caucho-status
2) Modify/usr/local/resin/conf/resin. conf.
The red part is the part to be modified:
3)
6,
Restart apache,
/Usr/local/apache/bin/apachectl start
Start resin
/Usr/local/resin/bin/httpd. sh start
Write a simple script to test whether jsp execution is successful:
Create a test file '/usr/local/apache/htdocs/test. jsp'
2 + 2 = <% = 2 + 2%>
If you can see the following text on the page, it means that your configuration has been completely successful.
2 + 2 = 4