Combat LAMP Server Configuration complete article _linux

Source: Internet
Author: User
Tags gettext mkdir
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
Installing JPEG
Mkdir/usr/local/jpeg6
Mkdir/usr/local/jpeg6/bin
Mkdir/usr/local/jpeg6/lib
Mkdir/usr/local/jpeg6/include
Mkdir/usr/local/jpeg6/man
Mkdir/usr/local/jpeg6/man/man1
Tar zxvf jpegsrc.v6b.tar.gz
CD jpeg-6b
./configure--prefix=/usr/local/jpeg6--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/jpeg6/--with-freetype=/usr/local/freetype/
Make
(The following error may occur when 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 is token and others are legitimate, please use M4_pattern_allow.
The autoconf documentation.
Make: * * * [Configure] Error 1
The error message "configure.ac:64:error:possibly undefined macro:am_iconv" to Google search, get "But you need to have GetText" There is no gettext this bag.
And then run directly: Yum install GetText is doing making make. The solution is to: Copy Warning:macro ' Am_iconv ' not found in library to Google to find this address http://sery. BLOG.51CTO.COM/10037/50892]
)
installing MySQL
Groupadd MySQL/set up MySQL Group
Useradd mysql-g MySQL/set up MySQL user and join in MySQL Group
Tar zxvf mysql-5.0.16.tar.gz//Decompression
CD mysql-5.0.16//Enter Unlock package directory
./configure--prefix=/usr/local/mysql--WITH-CHARSET=GBK--with-extra-charsets=gbk,gb2312-- Enable-thread-safe-client
Make
Make install
CD scripts//Enter into the script directory
./mysql_install_db--user=mysql//installation library files, should be prompted to say ok! Of
Cd/usr/local/mysql//Enter into the installed MySQL software directory
Chown-r Root. Set ROOT to access/usr/local/mysql
Chown-r mysql var//Set MySQL users can access/usr/local/mysql/var, which is stored in MySQL database files. This directory is configured in/ETC/MY.CNF and generated at mysql_install_db time.
Chown-r MySQL var/. Set MySQL user access to all files under/usr/local/mysql/var/mysql
Chgrp-r MySQL. Set up MySQL group to access/usr/local/mysql
# The above has been completely installed MySQL, but also normal use, but not enough, you want to MySQL database startup script into the system boot 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, use the following command to start Apache/usr/local/apache2/bin/apachectl start
Installing 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/jpeg6/--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
Will Apache support. Php
Edit Apache Configuration vi/var/apache/conf/httpd.conf
Search AddType Find similar 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, you receive the following message:
[Root@miix htdocs]# apachectl-k Restart
Httpd:syntax error on line of/usr/local/apache2/conf/httpd.conf:cannot load/usr/local/apache2/modules/libphp5.so I Nto server:/usr/local/apache2/modules/libphp5.so:cannot Restore segment prot after Reloc:permission denied
This is due to 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.