Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration method of php,jsp Environment under linux platform

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the configuration method of the php,jsp environment under the linux platform". In the daily operation, I believe that many people have doubts about the configuration method of the php,jsp environment under the linux platform. The editor consulted all kinds of materials and sorted out the simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about the configuration method of the php,jsp environment under the linux platform. Next, please follow the editor to study!

In addition to LAMP, the commonly used website environment in enterprises is jsp and asp (x), LAMP is linux,apache,mysql, php (perl,python, etc.), but with the continuous application of java, jsp environment is also more and more adopted by large websites. Here I hope to play a valuable role by configuring an apache php,jsp and mysql environment in the virtual rhel5 environment.

[software environment:]

① OS:RedHat Enterprise Linux 5

② mysql-5.1.24-rc

③ php-4.4.2

④ httpd-2.0.61

⑤ resin-2.1.17

⑥ jdk-6u10-beta-linux-i586-rpm.bin

Next, start the compilation and installation.

[step 1:] compile and install mysql

First, add mysql users and groups to make mysql run with the privileges of user mysql:

# adduser-s / bin/false mysql

① tar-xzvf mysql-5.1.24-rc.tar.gz

② cd mysql-5.1.24-rc

③. / configure-- prefix=/usr/local/mysql\

-enable-assembler-with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock

④ make & & make install

Then create a directory:

# mkdir / usr/local/mysql/var

⑤ / usr/local/mysql/bin/mysql_install_db

Then set permissions:

# chown-R root / usr/local/mysql

# chown-R mysql/ usr/local/mysql/var

# chgrp-R mysql / usr/local/mysql

⑥ / usr/local/mysql/bin/mysqld_safe &

⑦ / usr/local/mysql/bin/mysqladmin-u root password database administrator password

⑧ / usr/local/mysql/bin/mysql-u root-p

Then enter the database administrator password, you can enter the mysql management command environment, indicating that the mysql installation initialization is successful!

[step 2:] compile and install apache

First, add apache users and groups to make apache run with the privileges of user apache:

# adduser-s / bin/false apache

① tar-xzvf httpd-2.0.61.tar.gz

② cd httpd-2.0.61

③. / configure-- prefix=/usr/local/apache\

-enable-proxy-- enable-ssl-- enable-cgi-- enable-so & & make & make install

④ / usr/local/apache/bin/apachtel start

Then, test whether the apache is compiled and installed successfully in IE, and if the following page appears, it is successful!

[step 3:] compile and install php

① tar-xzvf php-4.4.2.tar.gz

② cd php-4.4.2

③. / configure-prefix=/usr/local/ php-with-mysql=/usr/local/mysql\

-with-apache=/usr/local/apache-with-apxs2=/usr/local/apache/bin/apxs

④ echo "AddType xapplication/x-httpd-php .php .php3" > > / usr/local/apache/conf/httpd.conf

Then modify the file / etc/ php.ini to set the value of the parameter register-global to on

⑤ / usr/local/apache/bin/apachtel restart

⑥ touch / usr/local/apache/htdocs/ phpinfo. Php

⑦ echo "> > / usr/local/apache/htdocs/ phpinfo. Php

Finally, enter the following URL in IE to test the php environment: [url] http://192.168.20.200/phpinfo.php[/url]. If the following page appears, the configuration of the php environment is successful!

[step 4:] configure the jdk environment

① / usr/local/jdk-6u10-beta-linux-i586-rpm.bin

② ln-s / usr/java/jdk1.6.0_10 / usr/local/java

First, set the environment variable, edit the file / etc/profile, and add the following settings:

JAVA_HOME=/usr/local/java

RESIN_HOME=/usr/local/resin

CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$RESIN_HOME/lib

PATH=$PATH:$JAVA_HOME/bin

Export JAVA_HOME RESIN_HOME CLASSPAHT PATH

Then, save exit, after logging out, enter the following command, can display information, indicating that the jdk environment configuration is successful!

③ java-- version

[step 5:] configure the resin environment

① tar-xzvf resin-2.1.17.tar.gz

② cd resin-2.1.17

③. / configure-prefix=/usr/local/resin-with-apxs=/usr/local/apache/bin/apxs

④ make & & make install

Enter the following URL to test the JSP environment: [url] http://192.168.20.200/caucho-status[/url]. The following page shows that the JSP environment is configured successfully!

Then edit the file / usr/local/resin/conf/resin.conf and change the doc to: / usr/local/apache/htdocs

⑤ / usr/loca/apache/bin/apachtel restart

Finally, copy the hellp.jsp to DocumentRoot to test the jsp environment.

⑥ cp / usr/local/resin-2.1.17/doc/examples/basic/hello.jsp / usr/local/apache/htdocs/hello.jsp

Finally, enter the following URL in IE to test the JSP environment: [url] http://192.168.20.200/hello.jsp[/url]. If the following page appears, the JSP environment configuration is successful!

Finally, you can see the demon and help pages for RESIN by running the following script:

# / usr/local/resin/bin/httpd.sh

Then enter the following URL in IE, and you can see the following page: [url] http://192.168.20.200:8080[/url]

At this point, the study on the "php,jsp environment configuration method under the linux platform" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report