RedHatLinux network server architecture practice (IV)
Source: Internet
Author: User
Article Title: RedHatLinux network server architecture practice (4 ). 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.
4. Reload the dynamic library
# Because we use the custom compilation and installation method, it is different from the original database location defined by the system. Now we need to re-specify it and reload vi/etc/ld. so. conf
# Add the following line
/Usr/local/mysql/lib
Shell> ldconfig // reload the dynamic library
5. Test MySQL
Cd/usr/local/mysql
./Bin/safe_mysqld -- user = mysql & // start the MySQL Service
Mysqladmin-u root-p password 'your _ password' // change the User password
Mysql-p // start to use
6. Create a STARTUP script
# Create a MySQL service to enable it automatically when the system starts
Cd/etc/rc. d/init. d
Touch mysqld
Vi mysqld
# The file content is as follows:
#! /Bin/bash
# Start MySQL service
Cd/usr/local/mysql
./Bin/safe_mysqld--user = mysql &
# Change the permission of the script. Otherwise, the script fails to be started because the system does not have the permission to execute the script.
Chown-R root/etc/rc. d/init. d/mysqld
Chmod 700/etc/rc. d/init. d/mysqld
# Connect this service to init 5. If you use init 3 to start the machine, connect it to rc3.d. 60 indicates the order of startup, and S indicates the upper case.
Ln-s/etc/rc. d/init. d/mysqld/etc/rc. d/rc5.d/S60mysqld
Step 9 Apache install
1. install Apache
Cd/home/src
Tar xvzf apa * // unpack
Cd apa *
./Configure -- prefix =/usr/local/apache -- enable-module = so // set the compilation Parameters
Make // compile
Make install // install
2. Create a symbolic connection
# Create a symbolic connection for the Startup Program to restart the service later
Ln-s/usr/local/apache/bin/apachectl/usr/bin/apache
3. Edit the configuration file
# Set the default page, separated by Spaces
# Connect to your default init-level directory
Ln-s/etc/rc. d/init. d/httpd/etc/rc. d/rc5.d/S65httpd
Step 10 Php install
# In this version, I use the DSO installation mode, so that you do not need to reinstall Apache when upgrading PHP.
1. install PHP
Cd ..
Tar xvzf php *
Cd php *
. /Configure -- with-mysql =/usr/local/mysql -- with-apxs =/usr/local/apache/bin/apxs -- enable-track-vars -- enable-sockets -- enable -ftp // set PHP compilation Parameters
Make // compile
Make install // install
Cp./php. ini-dist/usr/local/lib/php. ini // copy the configuration
File to/usr/local/lib
2. Configure Apache
Vi/usr/local/apache/conf/httpd. conf // configure Apache to support PHP
# Use php as the keyword to find the following lines and remove the comment symbol
# AddType application/x-httpd-php. php
# AddType application/x-httpd-php. php3 // you need to add this line to support PHP3.
# AddType application/x-httpd-php-source. phps
# Restart Apache
Apache restart
Step 11 Jvm setup
CPS/home/src/j2sdk-1_3_1-linux-i386.bin/usr/local
Cd/usr/local
Chmod a + x j2sdk-1_3_1-linux-i386.bin
# The following command is a script. It must first ask if you agree, enter Y, and then install it on its own.
/J2sdk-1_3_1-linux-i386.bin
# Create a symbolic connection for the current JDK version. In the future, if a new version is installed on the system, you can connect the new directory to/usr/local/jvm, so that you do not need to modify many configuration files.
Ln-s/usr/local/jdk1.3.1 _ 01/usr/local/jvm
Step 12 Classes Install
# This step is a habit of mine. This step may not be required if JAVA or JSP development is not performed. The purpose of this step is to set a home directory for your own JAVA class library, create Sub-directories in the main directory to store different types of class files.
# Here we need to discuss the MySQL driver. .
# Create a main directory of the Class Library
Mkdir/usr/local/lib/java
# Install the MySQL JDBC driver below. This driver supports JDBC2.0
Mkdir/usr/local/lib/java/drivers
Cp/home/src/mm.mysql-2.0.4-bin.jar.zip/usr/local/lib/java/drivers // MySQL driver
# Install JAF below. It should be noted that the downloaded jaf package is a winzip file. I decompress it on windows and create a jaf directory to activate it. put jar in it and upload it to/home/src. You can solve it by yourself.
Mkdir/usr/local/lib/java/jaf
Cp/home/src/java/jaf/activation. jar/usr/local/lib/java/jaf // Jaf class
# Install JAVAMAIL below. My solution is the same as above
Mkdir/usr/local/lib/java/javamail
Cp/home/src/java/javamail/*. jar/usr/local/lib/java/javamail // JavaMail classes
Step 13 Edit/etc/profile
# This step is used to configure environment variables. The installation of Resin depends on this step.
Vi/etc/profile
# Add the following content at the end of the/etc/profile file:
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.