CentOS Configure Apache, PHP, JDK, resin

Source: Internet
Author: User
Tags modify mysql version centos linux

CentOS Configure Apache, PHP, JDK, resin

At present there are many versions of this configuration on the Internet, in general, the basic steps are correct, but, in some details of places, have more or less access. Here, I according to today's configuration process, write down a basic outline: According to this outline, should be able to install normally.

1, install the module required by the system:

[root@cathysky81~] #viinstall. sh

yuminstallgcc

Yuminstallcpp

Yuminstallgcc-c++

Yuminstallncurses

Yuminstallncurses-devel

Yuminstallgd-develphp-gd

Yuminstallgd-devel

yuminstallgcc

Yuminstallcpp

Yuminstallgcc-c++

Yuminstallncurses

Yuminstallncurses-devel

Yuminstallgd-develphp-gd

Yuminstallgd-devel

Yuminstallzlib-devel

Yuminstallfreetype-develfreetype-demosfreetype-utils

Yuminstalllibpng-devellibpng10libpng10-devel

Yuminstalllibjpeg-devel

Yuminstallimagemagick

Yuminstallphp-gd

Yuminstallflex

Yuminstallimagemagick-devel

[root@cathysky81~] #shinstall. sh

Installed the module required by the system

2, about MySQL, Apache, PHP installation, with the previous installation is the same, if you did not correctly configure the combination of mysql+apache+php, please refer to the PHP documentation on this installation document

3, install JDK.

The JDK installation process is as follows:

1 to http://java.sun.com/download JDK, currently, still recommend download use: J2sdk-1_4_2_11-linux-i586.bin, because the resin document in the back, the description is also jdk1.4 version.

2) Chmoda+xj2sdk-1_4_2_11-linux-i586.bin

3)./j2sdk-1_4_2_11-linux-i586.bin

will be unzipped in the current directory to generate a directory called J2sdk_1_4xxxxx,

Mvj2sdk_1_4xxxxx/usr/local/jdk

4) Modify/etc/profile

Add the following:

Java_home=/usr/local/jdk

Resin_home=/usr/local/resin

Classpath=.: $JAVA _home/lib: $JAVA _home/jre/lib: $RESIN _home/lib:/usr/local/jdbc

Exportresin_homejava_homeclasspath

Note: Export this paragraph is certain to write, if not write start resin, there will be errors!!

5) Save/etc/profile

4, install resin:

1 to http://www.caucho.com download resin-3.0.18.tar.gz, this is the latest version of the current

2) decompression to generate directory resin-3.0.18

3) Executive Mvresin-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&&makeinstall&&makeclean

If the/etc/profile setting is not a problem, this step will work correctly

5, configure

1) Modify/usr/local/apache/conf/httpd.conf

Increase:

Loadmodulecaucho_module/usr/local/apache/libexec/mod_caucho.so

ResinConfigServerlocalhost6802

Cauchostatusyes

<Location/caucho-status>

Sethandlercaucho-status

</Location>

2) Modify/usr/local/resin/conf/resin.conf

The red section is required to modify the fragment:

<cluster>

  <srunserver-id= "" "host=" 127.0.0.1 "port=" 6802 "/>

</cluster>

  <web-appid= '/' document-directory= "/usr/local/apache/htdocs"/>

3)

6,

Restart Apache,

/usr/local/apache/bin/apachectlstart

Start resin

/usr/local/resin/bin/httpd.shstart

Write a simple script to test whether the JSP executes successfully:

Createatestfile '/usr/local/apache/htdocs/test.jsp '

2+2=<%=2+2%>

If you can see the following text on the page, your configuration has been completely successful.

2+2=4



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.