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

Install Apache2+PHP5+MySQL+Resin+SSL+GD+webalizer on RedhatAS4.0

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Install Apache2.0.50+MySQL+PHP5+Resin+SSL+GD on RedhatAS4.0 and log analysis tool (webalizer) on Apache2+PHP5+MySQL+Resin+SSL+GD+webalizer RedhatLinuxAS4.0

Copyright notice: this article can be reprinted at will, please keep the integrity of the article when reprinting, and indicate the original origin of the article and the author's information and this statement in the form of hyperlink.

Original source: http://www.troyoo.com/article/04/07/19/171145.shtmlhttp://www.troyoo.com/article/04/07/19/171145.shtml

Author: TROYOO troyoo@troyoo.com first draft date: 2004-7-19 17:03

We assume that the system is installed without selecting any server programs that come with the system, such as Apache,MySQL. If it is already installed, please uninstall it first. We also assume that development tools have been installed.

Part one: the configuration of web server

(1) download files: (assuming they are all placed 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

(2) 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修 改root的口令为 'password' 系统启动时自动运行: # cp support-files/mysql.server /etc/rc.d/init.d/mysqld # chkconfig --add mysqld 用ntsysv设置使mysql每次启动都能自动运行。 至此mysql安装完毕,你可以这样起动你的mysql服务 # /etc/rc.d/init.d/mysqld start 2、安装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、配置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   生成 Apache 启动文件 # cd /etc/rc.d/init.d # sed 's/sbin/atd/local/servers/apache/bin/httpd/g' atd >

Httpd

# sed's tmp/txt ATD _ httpd _ httpd _ sed

# 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]

Then prove that httpd has been correctly installed and running in the background, if there are other prompts, please check that your installation steps are correct.

Enter http://localhost or http://yourIP, and you can see the welcome page of apache.

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 out and log back in to make the environment variables work

# exit

# su-

# java

# javac

If java and javac are running, the java environment variable is configured successfully.

4. Install 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 called test.jsp in / usr/local/servers/apache/htdocs/, which includes:

After saving the disk, use the browser to view http://202.99.11.120/test.jsp. If correct, you can see "Hello, World!" Words. Otherwise, check whether Resin is running, whether the parameter modification of Resin is correct, whether the JAVA environment is installed correctly, and whether Apche is running 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

Open httpd.conf using vi and add the following to the header:

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

AddType application/x-httpd-php .php3

Restart Apache for the changes to take effect

# / etc/rc.d/init.d/httpd restart

Test PHP

Create a file (info.php) in / www/troyoo.com using vi, which includes:

Use the browser to view the number of http://yourIP/info.php. If an error occurs, check whether Apache is running and whether the parameter modification is correct.

Part two: 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. / # to solve the garbled problem here, 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 values 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 message:

Webalizer V2.01-10 (Linux 2.4.21-4.EL) Simplified Chinese

Use the log file / usr/local/apache2/logs/access_log (clf)

Output results to / www/troyoo.com/usage

The hostname that generates the report is' SEA'

Reading history information file. Webalizer.hist

Generating report-July 2004

Generating comprehensive report

Saving historical information file.

The sharing time of 3273647 records is 33.57s, 97517/sec

Run automatically:

Set crontab to run webalizer once an hour:

# crontab-e

0 * / usr/bin/webalizer-c / etc/webalizer.conf.troyoo

View the results:

Http://www.troyoo.com/usage

At this point, Apache2.0.50+MySQL+PHP5+Resin+SSL is installed on Redhat LinuxAS3.0 and the traffic statistics tool (webalizer) has been installed, and the root directory of the website is / www/troyoo.com. You can provide site services based on PHP and JAVA languages on this system. [@ more@]

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

Database

Wechat

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

12
Report