Debiandesktop0.3 source code installation apache2 + mysql + php5 + zendOptimizer

Source: Internet
Author: User
Debiandesktop0.3 install apache2 + mysql + php5 + zendOptimizer-Debian Technology for Linux release. For more information, see the following. 1. Especially if top0.3 has fewer files, install lib first.
Xml2-dev php4-domxml flex libcurses5-dev libg + + 2.8.1.3-glibc2.2 glibc libg + + 27 libstdc + + termcap-compat
Maybe some of them are not. I recalled them.

2. Prepare for Installation
Place the source code of all software in the/home/src directory. The installation directory is/server. The downloaded source code package is in the/files directory. Therefore, perform the following operations:
Mkdir/home/src
Mkdir/server
Groupadd mysql
Useradd-g mysql-d/home/mysql // create a mysql group and user
Cd/home/src
Tar zxvf/file/mysql-4.0.21.tar.gz
Tar zxvf/file/httpd-2.0.52.tar.gz
Tar zxvf/file/php-5.0.2.tar.gz
Tar zxvf/file/ZendOptimizer-2.5.5-Linux_glibc21-i386.tar

Iii. installation and configuration process
Use vi to edit a shell file with the following content: (copy and edit a script file with the following content)
-----------------------------------
#! /Bin/sh
Cd/home/src/mysql-4.0.21
./Configure -- prefix =/server/mysql
Make
Make install
/Server/mysql/bin/mysql_install_db

Chown-R root/server/mysql
Chgrp-R mysql/server/mysql

Chown-R root/server/mysql/bin
Chgrp-R mysql/server/mysql/bin

Chown-R root/server/mysql/var
Chgrp-R mysql/server/mysql/var
Chmod 777/server/mysql/var

Chown-R root/server/mysql/var/mysql
Chgrp-R mysql/server/mysql/var/mysql
Chmod 777/server/mysql/var/mysql

Chown-R root/server/mysql/var/mysql /*
Chgrp-R mysql/server/mysql/var/mysql /*
Chmod 777/server/mysql/var/mysql /*

Chmod 777/server/mysql/lib/mysql/libmysqlclient.
# Install mysql-4.0.21

Cd/home/src/httpd-2.0.52
./Configure -- prefix =/server/apache -- enable-so
Make
Make install
# Install httpd-2.0.52

Cd/home/src/php-5.0.2
./Configure -- with-mysql =/server/mysql -- with-apxs2 =/server/apache/bin/apxs \
-- Enable-track-vars -- enable-force-cgi-redirect -- enable-pic \
-- Enable-inline-optimiation -- enable-memory-limit -- enable-bcmath \
-- Enable-shmop -- enable-versioning \
-Enable-calendar -- enable-dbx -- enable-dio -- enable-mcal \
-- With-config-file-path =/server/apache/conf
Make
Make install
Cp php. ini-dist/server/apache/conf/php. ini
# Install the php-4.3.1, some of the above modules are not used, -- with-config-file-path =/server/apache/conf specified
# The php configuration file is in the/server/apache/conf directory.

Ln-s/server/apache/bin/apachectl/bin/apache
Ln-s/server/mysql/bin/mysql
# Create a symbolic connection
----------------------------------------------------

4. modify the configuration file
Vi/server/apache/conf/httpd. conf
# Add the following lines (load php45 blocks and specify the. php file)
# LimitRequestBody (specify the size of the request data processed by php, which is 20 mb below)

LoadModule php5_module modules/libphp5.so

SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 20971520


# Annotate the following lines (add # Before the text) so that apache can display Chinese characters. The specific cause is unknown.
ForceLanguagePriority Prefer Fallback
Adddefadefacharset ISO-8859-1 changed to AddDefaultCharset gb2312

# Files suffixed with. php. php3 are supported
AddType application/x-httpd-php. php
AddType application/x-httpd-php. php3

# Add the default boot file index. php (find DirectoryIndex and modify it as follows :)
DirectoryIndex index.html. var index. php

# Specify the website directory (assuming the/apache directory)
DocumentRoot "/apache"

Vi/server/apache/conf/php. ini
# Locate and modify the following parameters
Max_execution_time = 600; Maximum running time: 600 seconds
Max_input_time = 600; maximum output time: 600 seconds
Memory_limit = 20 M; maximum memory limit: 20 M
File_uploads = On; allow uploading files
Upload_max_filesize = 20 M; maximum file size: 20 M
Post_max_size = 20 M; php acceptable post method size 20 M
Session. auto_start = 1; the session is automatically started.
Change register_globals = Off TO register_globals = On.
========================================================== ==========
Vi/server/apache/conf/mime. type
# Add a file type
Application/x-httpd-php. php. phtml

V. Running

# Start mysql
/Server/mysql/bin/safe_mysqld -- user = mysql &
# Stopping mysql
/Server/mysql/bin/mysqladmin shutdown

# Start apache
Apache start
# Stop apache
Apache stop

Mkdir/apache
Echo "/apache/index. php
Echo "phpinfo ();">/apache/index. php
Echo "?> ">/Apache/index. php
# Generate the/apache/index. php file

Enter the URL of the linux machine in the browser. The php configuration information is displayed.
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.