Complete lamp Server Configuration

Source: Internet
Author: User

Install zlib
Tar zxvf zlib-1.2.3.tar.gz
CD zlib-1.2.3
./Configure -- prefix =/usr/local/zlib2
Make
Make install
Install libpng
Tar zxvf libpng-1.2.10.tar.gz
CD libpng-1.2.10
./Configure -- prefix =/usr/local/libpng
Make
Make install
Install FreeType
Tar zxvf freetype-2.3.5.tar.gz
CD freetype-2.3.5
./Configure -- prefix =/usr/local/FreeType
Make
Make install
Install JPEG
Mkdir/usr/local/limit 6
Mkdir/usr/local/partition 6/bin
Mkdir/usr/local/IPv6/lib
Mkdir/usr/local/users 6/include
Mkdir/usr/local/Example 6/man
Mkdir/usr/local/users 6/man/Man1
Tar zxvf restart src.v6b.tar.gz
CD jpeg-6b
./Configure -- prefix =/usr/local/configure 6 -- enable-shared
Make
Make install
Install GD
Tar zxvf gd-2.0.35.tar.gz
CD gd-2.0.35
. /Configure -- prefix =/usr/local/GD2 -- With-zlib =/usr/local/zlib2/-- With-PNG =/usr/local/libpng/-- With-JPEG = /usr/local/release 6/-- With-FreeType =/usr/local/FreeType/
Make
(The following error may occur during make:
CD. &/bin/sh/root/gd-2.0.35/config/missing -- run aclocal-1.9-I config
Aclocal: Configure. AC: 64: Warning: Macro 'am _ iconv 'not found in Library
CD. &/bin/sh/root/gd-2.0.35/config/missing -- run automake-1.9 -- foreign
CD. &/bin/sh/root/gd-2.0.35/config/missing -- run Autoconf
Configure. AC: 64: Error: Possibly undefined macro: am_iconv
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Make: *** [configure] Error 1
Search for the error message "Configure. AC: 64: Error: Possibly undefined macro: am_iconv" in Google and get "but you need to have gettext" without the gettext package.
Run Yum install gettext directly before making. [the solution is to copy warning: Macro 'am _ iconv 'not found in library to Google. Find the address http://sery.blog.51cto.com/10037/50892].
)
Install MySQL
Groupadd MySQL // create a MySQL Group
Useradd mysql-G MySQL // create a MySQL user and add it to the MySQL Group
Tar zxvf mysql-5.0.16.tar.gz // Extract
CD mysql-5.0.16 // enter the directory for unlocking the package
./Configure -- prefix =/usr/local/MySQL -- With-charset = GBK -- With-extra-charsets = GBK, gb2312 -- enable-thread-safe-Client
Make
Make install
CD scripts // enter the script directory
./Mysql_install_db -- user = MySQL // install the library file, which should prompt OK! .
CD/usr/local/MySQL // enter the installed MySQL software directory.
Chown-r root. // set root to access/usr/local/MySQL
Chown-r MySQL var // sets mysql users to access/usr/local/MySQL/var, which stores MySQL database files. this directory is in/etc/My. CNF is configured and generated in mysql_install_db.
Chown-r MySQL var/. // set mysql users to access all files in/usr/local/MySQL/var/MySQL
Chgrp-r mysql. // set the MySQL group to access/usr/local/MySQL
# The above MySQL has been fully installed and can be used normally, but it is not enough. You need to add the MySQL database STARTUP script to the system startup directory.
CD/usr/local/MySQL/lib/MySQL/
Ln-s libmysqlclient. so.15.0.0 libmysqlclient_r.so
CP/tmp/mysql-5.0.16/support-files/my-huge.cnf/etc/My. CNF
CP/tmp/mysql-5.0.16/support-files/MySQL. Server/etc/rc. d/init. d/mysqld
Chmod 700/etc/rc. d/init. d/mysqld
Ln-S/etc/rc. d/init. d/mysqld/etc/rc. d/rc3.d/mysqld
/Etc/rc. d/init. d/mysqld start // to start the MySQL process
Install Apache
Tar zxvf httpd-2.2.11.tar.gz
CD httpd-2.2.11
./Configure -- prefix =/usr/local/apache2 -- enable-Rewrite -- enable-SSL
Make
Make install
After installation, run the following command to start Apache/usr/local/apache2/bin/apachectl start.
Install PHP
Tar zxvf php-5.2.6.tar.gz
CD php-5-2.6
. /Configure -- prefix =/usr/local/PHP -- with-apxs2 =/usr/local/apache2/bin/apxs -- With-mysql =/usr/local/MySQL -- With-config- file-Path =/usr/local/PHP/etc -- With-JPEG-Dir =/usr/local/defaults 6/-- With-PNG-Dir =/usr/local/libpng/ -- With-Gd =/usr/local/GD2/-- With-FreeType-Dir =/usr/local/FreeType/-- enable-trace-vars -- With-zlib-Dir =/ usr/local/zlib2/
Make
Make install
Apache supports. php
Edit Apache configuration VI/var/Apache/CONF/httpd. conf
Search for addtype and find addtype application/X-compress. Z.
Add a row under it
Addtype application/X-httpd-PHP. php. phtml
Addtype application/X-httpd-PHP-source. PHPs
When you restart Apache, the following message is displayed:
[Root @ miix htdocs] # apachectl-K restart
Httpd: syntax error on line 53 of/usr/local/apache2/CONF/httpd. conf: cannot load/usr/local/apache2/modules/libphp5.so into server:/usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
This is caused by SELinux, so you need to do this:
Chcon-T textrel_shlib_t libphp5.so

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.