RedHatAS4WEB service and Virtual Host Configuration Guide

Source: Internet
Author: User
Article Title: RedHatAS4WEB service and Virtual Host Configuration Guide. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I. software used in this article:
Sun JDK: j2sdk-1_4_2_09-linux-i586.bin
Apache2.0.54: httpd-2.0.54.tar.gz
MySQL: mysql-standard-4.1.14-pc-linux-gnu-i686.tar.gz
Php: php-4.4.2.tar.gz
Tomcat: jakarta-tomcat-5.0.28.tar.gz
Jakarta-tomcat-connectors-jk2: jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz
Install all the software in the/home/www directory.
Note: In this text, the red font is the input command line.

Ii. Software Installation
1. First install Sun's JDK
[Root @ yangwenjun www] #./j2sdk-1_4_2_09-linux-i586.bin

After installation, the j2sdk1.4.2 _ 09 folder will be generated, and the j2sdk1.4.2 _ 09 folder will be moved (or copied) to the JDK location you want to store. This article is in/home/www/j2sdk1.4.2 _ 09
Next, edit the/etc/profile file and add the JDK environment variable. Add the following content to the end of the file:

[Root @ yangwenjun www] # vi/etc/profile

Export JAVA_HOME =/home/www/j2sdk1.4.2 _ 09
Export CLASSPATH =.: $ CLASSPATH: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
: $ JAVA_HOME/lib/mysql-connector-java-3.2.0.jar: $ JAVA_HOME/lib/classes12.jar
Export PATH = $ PATH: $ JAVA_HOME/bin
Export JRE_HOME = $ JAVA_HOME/jre

[Root @ yangwenjun etc] # source profile
[Root @ yangwenjun etc] # set

Here you can see all the environment variables.
[Root @ yangwenjun etc] # java? Version
If the JDK configuration is correct, the corresponding JDK version will appear when you run the above command.

2. Install MySQL

[Root @ yangwenjun www] # tar xzfv mysql-standard-4.1.14-pc-linux-gnu-i686.tar.gz
[Root @ yangwenjun www] # cd mysql-standard-4.1.14-pc-linux-gnu-i686
[Root @ yangwenjun mysql-standard-4.1.14-pc-linux-gnu-i686] # more INSTALL-BINARY

Read this document carefully and you will find that MySQL is easy to install.

[Root @ yangwenjun mysql-standard-4.1.14-pc-linux-gnu-i686] # groupadd mysql
[Root @ yangwenjun mysql-standard-4.1.14-pc-linux-gnu-i686] # useradd-g mysql
[Root @ yangwenjun www] # mv mysql-standard-4.1.14-pc-linux-gnu-i686/home/www/mysql
[Root @ yangwenjun www] # cd/home/www/mysql
[Root @ yangwenjun mysql] # scripts/mysql_install_db -- user = mysql
[Root @ yangwenjun mysql] # chown-R root.
[Root @ yangwenjun mysql] # chown-R mysql data
[Root @ yangwenjun mysql] # chgrp-R mysql.
[Root @ yangwenjun mysql] # bin/mysqld_safe -- user = mysql &

In this way, MySQL has been started, and the following sets the password for the root user:

[Root @ yangwenjun mysql] #./bin/mysqladmin-u root password 'Password'
[Root @ yangwenjun mysql] #./bin/mysqladmin-u root-h localhost. localdomain password 'pass'
[Root @ yangwenjun mysql] #./bin/mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 5 to server version: 4.1.14-standard

Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.

Mysql>

[Root @ yangwenjun mysql] # cp support-files/mysql. server/etc/init. d/mysql
[Root @ yangwenjun mysql] # vi/etc/init. d/mysql
Modify the following definition to make the content:
Basedir =/home/www/mysql
Datadir =/home/www/mysql/data
[Root @ yangwenjun mysql] # chkconfig -- level 345 mysql on
[Root @ yangwenjun mysql] # service mysql restart
Shutting down MySQL... [OK]
Starting MySQL [OK]
[Root @ yangwenjun mysql] #

MySQL is installed here.

[1] [2] [3] Next page

Related Article

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.