Install LinuxAS4.0 + Apache

Source: Internet
Author: User
LinuxAS4.0 + Apache installation-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. install Linux AS 4.0

Note: In this step, the Linux kernel is 2.6.x. If not, the installation will fail.

1. install apache

(1) download the Linux Installation File httpd-2.2.3.tar.gz from the installation Network

(2) The command list is as follows:

Cd/root/tmp
Tar-zxvf httpd-2.2.3.tar.gz
Music httpd-2.2.3 httpd
Cd httpd
./Configure -- prefix =/usr/local/httpd -- enable-module = so
Make
Make install

2. Install PHP5

The command list is as follows:

Cd/home/tmp
Tar-zxvf php-5.2.0.tar.gz
Music php-5.2.0 php
Cd php
. /Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/httpd/bin/apxs -- with-config-file-path =/usr/local/lib -- enable-track-vars -- with-xml -- with-mysql
Make
Make install
Cp php. ini-dist/usr/local/lib/php. ini

NOTE: If no MYSql is required or MySql is not installed, remove the -- with-mysql Option When configuring. Otherwise, an error occurs.

3. Configure Parameters

Vi/usr/local/httpd/conf/httpd. conf

Configure apache as follows:

# Change a line of ServerAdmin admin@home.langchao.com to your mailbox address

# Options FollowSymLinks MultiViews for security reasons, remove "Indexes"

#
# DirectoryIndex default. php default. phtml default. php3 default.html default.htm
#
# Set the default file name order of apache

# AddType application/x-httpd-php. php. phtml. php3. inc. php4
# AddType application/x-httpd-php-source. phps
# Set the PHP file suffix

Save disk and exit

4. Start the service

/Usr/local/httpd/bin/apachectl start

Ii. Test Server

Find the htdocs folder under the apache installation directory. Create the phptest. php file.

Use a text editor (notepad vim, etc.) to write the following information:

Phpinfo ();
?>

Enter http: // localhost/phptest. php in the address bar.
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.