Install Apache2 + PHP5 + MySQL + Resin + SSL + GD + weba_PHP on RedhatAS3.0

Source: Internet
Author: User
Install Apache2 + PHP5 + MySQL + Resin + SSL + GD + weba on RedhatAS3.0. Install Apache2.0.50 + MySQL + PHP5 + Resin + SSL + GD and webalizer on RedhatLinuxAS3.0, and install Apache2.0.50 + MySQL + PHP5 + Resin + SSL + GD and the log analysis tool (webalizer) on RedhatLinuxAS3.0. copyright disclaimer: this article can be reproduced at will. ensure the integrity of the article during reprinting, the original source and author information of the article and this statement are displayed as hyperlinks. Original source: [url] Author: TROYOO beyond (troyoo@troyoo.com) draft date: we assume that no built-in server programs, such as Apache, MySQL, were selected when installing the system. If it has been installed, uninstall it first. We also assume that the development tool has been installed.
Part 1: web server configuration (1) Download Files: (assume all files are stored in ~ /Server below) 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 # 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' # use mysqladmin to change the root password to password' and run automatically at system startup: # cp support-files/mysql. server/etc/rc. d/init. d/mysqld # Chkconfig -- add mysqld use ntsysv to enable mysql to run automatically at each startup. After mysql is installed, you can start your mysql service #/etc/rc. d/init. d/mysqld start 2. install openssl cd ~ /Server # tar-zxvf openssl-0.9.7d.tar.gz # cd openssl-0.9.7d #. /configure -- prefix =/usr/local/openssl # set the installation path # 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 install generate Apache startup file # 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 Apache server #/etc/rc. d/init. d/httpd start if the following error occurs: Starting httpd daemon: [OK], it indicates that httpd has been correctly installed and is already running in the background. if there are other prompts, check whether your installation steps are correct. Input http://localhost Or http://yourIP , 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: 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/jre/bin BASH_ENV = $ HOME /. bashrc USERNAME = "root" export USERNAME BASH_ENV PATH JAVA_NAME CLASSPATH logout, and then log on again to make the environment variable take effect # exit # su-# java # If java and javac are running, the java environment variable is successfully configured. 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 install use vi to create a test in/usr/local/servers/apache/htdocs. jsp file, including: <% out. println ("Hello, World! "); %> After saving the disk, use the browser to view it http://202.99.11.120/test.jsp If it is correct, you can see "Hello, World!. Otherwise, check whether Resin is running, whether the Resin parameter is modified correctly, 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 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 install use vi to open httpd. conf, add AddType application/x-httpd-php in the header. php AddType application/x-httpd-php-source. phps AddType application/x-httpd-php. php3 restarts Apache for modification to take effect #/etc/rc. d/init. d/httpd restart test PHP use vi to create a file (info. php), including: View in a browser http://yourIP/info.php Number. If an error occurs, check whether Apache is running and whether the parameter modification is correct. Part 2: 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. /# here to solve the garbled problem, refer ( http://www.troyoo.com/Article/04/07/18/115309 .shtml) # 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 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 *. run ra IgnoreURL/taskbar *: #/usr/bin/webalizer-c/etc/webalizer. conf. troyoo normal information: Webalizer V2.01-10 (Linux 2.4.21-4.EL) Simplified Chinese use log file/usr/local/apache2/logs/access_log (clf) the host name that outputs the report to/www/troyoo.com/usage is that SEA is reading the history file... webalizer. hist generating report ---- generating comprehensive report for March 04, July 20. saving history file... 3273647 records take 33.57 seconds in total, and 97517/sec runs automatically: set crontab to run webalizer once every hour: # crontab-e 0 *****/usr/bin/webalizer-c/etc/webalizer. conf. troyoo view results: http://www.troyoo.com/Usage now, Apache2.0.50 + MySQL + PHP5 + Resin + SSL and webalizer have been installed on Redhat LinuxAS3.0. the root directory of the website is/www/troyoo.com, you can provide website services based on PHP and JAVA on this system. Author: TROYOO beyond (troyoo@troyoo.com) draft date: more information, Welcome: http://www.troyoo.com

Copyright Statement of promise (webalizer): This article can be reproduced at will. during reprinting, please maintain the integrity of the article and use...

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.