Install Apache2+php5+mysql+resin+ssl+gd+weba on RedhatAS3.0

Source: Internet
Author: User
Tags add ftp install php mysql net openssl php and variable
Apache|mysql|php5|web China It power, the latest and most complete it technology Tutorials Latest 100 | Recommended 100 Articles | Topic 100 Articles | List | Search | Online API Document Home | Program Development | Operating System | Software Application | Graphic image | Network Applications | Refined Literature | Education Certification | Unfinished articles | Technical discussion ASP JS PHP engineering asp.net website Construction UML j2eesun. NET VC VB VFP Network Maintenance database DB2 SQL2000 Oracle Mysql server Win2000 Office C dreamweav Er FireWorks Flash PhotoShop Online CorelDraw protocol Daquan Network Security Microsoft certification Current Location: > Program Development > Web Development > PHP > PHP integrated RedhatAS3.0 Install a Pache2+php5+mysql+resin+ssl+gd+weba Author: Unknown time: 2005-09-13 23:32 Source: Blog.ChinaUnix.net Zebian: Chinaitpower Summary: Redha Install Apache2+php5+mysql+resin+ssl+gd+weba on tAS3.0
Install APACHE2.0.50+MYSQL+PHP5+RESIN+SSL+GD and Log Analysis tool (Webalizer) on RedhatLinuxAS3.0

Copyright NOTICE: This article can be reproduced, reproduced, please keep the integrity of the article, and hyperlinks in the form of the original source of the article and author information and this statement.
Original source: http://www.troyoo.com/article/04/07/19/171145.shtml[color=red:f9cb90d4d4]http://www.troyoo.com/article/04 /07/19/171145.SHTML[/COLOR:F9CB90D4D4]
Author: Troyoo surpass (troyoo@troyoo.com) first draft date: 2004-7-19 17:03

 
We assume that when you install the system, you do not select any of the system's own server programs, such as Apache,mysql. If it is already installed, uninstall it first. We also assume that the development tools have been installed.

Part I: Configuration of the Web server

(i) Download file: (assuming all under ~/server)

Httpd-2.0.50.tar.gz
Http://apache.linuxforum.net/dist/httpd/httpd-2.0.50.tar.gz
Mysql-standard-4.0.20-pc-linux-i686.tar.gz
http://dev.mysql.com/get/Downloads/MySQL-4.0/mysql-standard-4.0.20-pc-linux-i686.tar.gz/from/http://mysql.ihostunit.com/
Php-5.0.0.tar.gz
Http://cn.php.net/get/php-5.0.0.tar.gz/from/this/mirror
Resin-3.0.8.tar.gz
Http://www.caucho.com/download/resin-3.0.8.tar.gz
Openssl-0.9.7d.tar.gz
Ftp://ftp.openssl.org/source/openssl-0.9.7d.tar.gz
J2sdk-1_4_2_05-linux-i586-rpm.bin
http://192.18.97.74/ECom/EComTicketServlet/BEGINjsecom8b.sun.com-10d7%3A40faaebd%3A6ca521da7aa699f/-2147483648 /452386287/1/489890/489674/452386287/2ts+/westcoastfsend/j2sdk-1.4.2_05-oth-jpr/j2sdk-1.4.2_05-oth-jpr:3/ J2sdk-1_4_2_05-linux-i586-rpm.bin
Gd-2.0.27.tar.gz
Http://www.boutell.com/gd/http/gd-2.0.27.tar.gz
 

(ii) installation

1, MySQL
# Groupadd MySQL
# useradd-g MySQL MySQL
# cd/usr/local
# Gunzip < ~/server/mysql-standard-4.0.20-pc-linux-i686.tar.gz | Tar xvf-
# ln-s mysql-standard-4.0.20-pc-linux-i686 MySQL
# CD MySQL
# scripts/mysql_install_db--user=mysql
# Chown-r Root.
# chown-r MySQL Data
# chgrp-r MySQL.
# Bin/mysqld_safe--user=mysql &
#./mysqladmin-u root password ' password ' #使用mysqladmin修
Change the password of root to ' password '

Run automatically when the system starts:
# CP Support-files/mysql.server/etc/rc.d/init.d/mysqld
# chkconfig--add mysqld

Use the NTSYSV setting to make MySQL run automatically every time you start.

At this point MySQL installation is complete, you can start your MySQL service
#/etc/rc.d/init.d/mysqld Start

2. Installation OpenSSL
CD ~/server

# TAR-ZXVF Openssl-0.9.7d.tar.gz
# CD Openssl-0.9.7d
#./configure--prefix=/usr/local/openssl #设置安装路径
# make
# make Install

3. Configure Apache

# cd/usr/local/
# TAR-ZXVF ~sea/server/httpd-2.0.50.tar.gz
#./configure--enable-so--enable-ssl--with-ssl=/usr/local/openssl--enable-rewrite
# make
# make Install
 
Generate Apache Startup files

# CD/ETC/RC.D/INIT.D
# sed ' s/sbin/atd/local/servers/apache/bin/httpd/g ' atd > httpd
# sed ' s/atd/httpd/g ' httpd >/tmp/txt
# sed ' s/at daemon/httpd daemon/g '/tmp/txt > httpd
# Rm/tmp/txt
# chmod 755 httpd
# chkconfig--level 345 httpd on
# chkconfig--level 0126 httpd off


Start and test the Apache server
#/ETC/RC.D/INIT.D/HTTPD Start
If it appears:
Starting httpd daemon: [OK]

Verify that the httpd is installed correctly and that it is already running in the background, and if there are other prompts, please check that your installation steps are correct.
Enter http://localhost or Http://yourIP to see the Apache Welcome page.


3. Configure J2DK
# CD ~/server
# chmod 755 J2sdk-1_4_2_05-linux-i586-rpm.bin
# RPM-IVH j2sdk-1_4_2_05-linux-i586.rpm
VI ~/.bash_profile
Change it to the following:

Java_home=/usr/java/j2sdk1.4.2_05
Classpath= $JAVA _home/lib/tools.jar: $JAVA _home/lib/rt.jar
Path= $PATH: $HOME/bin: $JAVA _home/bin: $JAVA _home/jre/bin
bash_env= $HOME/.BASHRC
Username= "Root"

Export USERNAME bash_env PATH java_name CLASSPATH

Log off, and then log back in to make the environment variable work
# exit
# Su-
# java
# Javac

If Java and Javac are running, the Java environment variable configuration is successful.

 
4. Installation resin

# cd/usr/local
# TAR-ZXVF ~/server/resin-3.0.8.tar.gz
# CD resin-3.0.8/
#./configure--with-java-home=/usr/java/j2sdk1.4.2_05--with-apxs=/usr/local/apache2/bin/apxs--with-apache=/usr/ Local/apache2

# make
# make Install
 
Use VI to create a file named Test.jsp in/usr/local/servers/apache/htdocs/that includes the following:

<%
Out.println ("%>

After saving, use the browser to view http://202.99.11.120/test.jsp if correct, you can see "Hello, world!" Words. Otherwise, check to see if resin is running, resin parameter modifications are correct, the Java environment is installed correctly, and Apche is functioning properly.

5. Install GD
# cd/usr/local
# TAR-ZXVF ~/server/gd-2.0.27.tar.gz
# CD gd-2.0.27/
#./configure--PREFIX=/USR/LOCAL/GD2
# make
# make Install

 
6. Install PHP
# cd/usr/local
# TAR-ZXVF ~/server/php-5.0.0.tar.gz
# MV php-5.0.0 PHP5
# CD php5/
#./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql--WITH-GD=/USR/LOCAL/GD2-- Enable-track-vars--enable-ftp

# make
# make Install

Use VI to open httpd.conf, add in head:
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
AddType application/x-httpd-php. php3

Restart Apache for the modification to take effect
#/etc/rc.d/init.d/httpd Restart

Test PHP
Use VI to create a file (info.php) in/www/troyoo.com, which includes:

?
Phpinfo ();
?>

Use the browser to view the number of http://yourIP/info.php. If an error occurs, check to see if Apache is running and the parameters are modified correctly.

 

Part II: Web server log analysis software Webalizer

Webalizer-2.01-10-src.tgz
Ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.01-10-src.tgz

# tar zxf webalizer-2.01-10-src.tgz
#./configure--with-language=simplified_chinese--with-gdlib=/usr/local/gd2--WITH-GD=/USR/LOCAL/GD2

# perl/path/of/webalizer_patch.pl./#这里为了解决乱码问题, see (http://www.troyoo.com/article/04/07/18/115309.shtml)
# make
# make Install
# Mkdir/www/troyoo.com/usage

#cp webalizer/usr/bin/
#cd/etc
#ls webalizer*
Webalizer.conf.sample
#cp Webalizer.conf.sample Webalizer.conf.troyoo
#vi Webalizer.conf.troyoo
Edit the Webalizer.conf.troyoo file (change the value inside to the following):

Logfile/usr/local/apache2/log/access_log
Outputdir/www/troyoo.com/usage
HostName www.troyoo.com
Incremental Yes
PageType htm*
PageType CGI
PageType PHP
Hideurl *.gif
Hideurl *. Gif
Hideurl *.jpg
Hideurl *. Jpg
Hideurl *.ra
ignoreurl/taskbar*
 

Run:

#/usr/bin/webalizer-c/etc/webalizer.conf.troyoo

Normal information:

Webalizer v2.01-10 (Linux 2.4.21-4.el) Simplified Chinese
Using log Files/usr/local/apache2/logs/access_log (CLF)
Output results to/www/troyoo.com/usage
The host name that produces the report is ' sea '
Reading history information File ... webalizer.hist
Generating report----for July 2004
Generating consolidated report
Saving history information File ...
3,273,647 Records in 33.57 seconds, 97517/sec
 
Run automatically:

Set Crontab to allow Webalizer to run once per hour:
#crontab-E
0 * * * */usr/bin/webalizer-c/etc/webalizer.conf.troyoo

View results:
Http://www.troyoo.com/usage
 

At this point, the installation of APACHE2.0.50+MYSQL+PHP5+RESIN+SSL and the Traffic Statistics tool (Webalizer) on Redhat LinuxAS3.0 has been installed, and the root directory of the site is/www/ Troyoo.com, you can provide site services based on PHP and the Java language on this system.


Author: Troyoo surpass (troyoo@troyoo.com) first draft date: 2004-7-19 17:03
For more information, welcome to: http://www.troyoo.com












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.