Lamp Environment Compilation (apache2.4.7 php5.4.25 MySQL 5.5.23)

Source: Internet
Author: User

Environmental requirements

GCC, gcc-c++, CMake, bison (possible) support

1.Yum install gcc gcc-c++ cmake Bison

2, modify the Yum configuration, to achieve the search local settings

Remove or rename/etc/yum.repos.d/centos-base.repo

Modify Vi/etc/yum.repos.d/centos-media.repo

      Baseurl=file:///mnt/cdrom

Enabled=1

  3, uninstall the original Apache, MySQL and so on    

Rpm-qa |grep MySQL is installed

Ps-le |grep Whether the MySQL process is started

    Yum Remove httpd Uninstall

4. Disable SELinux and Netfilter/iptables

Vi/etc/sysconfig/selinux

Netfilter/iptables Firewall (default 80 disabled)
iptables-f Disable

Resource pool Requirements

LIBXML2, Libmcrypt, zlib, libpng, JPEG, FreeType, GD, Pcre, Apr, and Apr-util libraries

  Installation steps

1, decompression. tar.gz TAR-ZXF
2./configure Configuration
3. Make compile
4. Make install, copy

----------------------------------------------------------------------

  Installing LIBXML2

./configure--prefix=/usr/local/libxml2/

----------------------------------------------------------------------

  Installing Libmcrypt
./configure--prefix=/usr/local/libmcrypt/--enable-ltdl-install

----------------------------------------------------------------------
  Installing zlib

./configure do not specify the installation directory (cannot be located after specified)

Uninstalling a program that does not specify an installation directory
Make install >/bakcup/zlib_20150905.install.log

----------------------------------------------------------------------

  Installing libpng
./configure--prefix=/usr/local/libpng/

----------------------------------------------------------------------

  install JPEG To manually create the required directory first
Mkdir/usr/local/jpeg
Mkdir/usr/local/jpeg/bin
Mkdir/usr/local/jpeg/lib
Mkdir/usr/local/jepg/include
Mkdir-p/usr/local/jepg/man/man1 Create multiple directories at the same time
./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-static

----------------------------------------------------------------------

  Installing FreeType
./configure--prefix=/usr/local/freetype/

----------------------------------------------------------------------

  Install GD to use the previously installed library
./configure--prefix=/usr/local/gd/--with-jpeg=/usr/local/jpeg/--with-freetype=/usr/local/freetype/
--enable-m4_pattern_allow (this item may be used in case of an error)

----------------------------------------------------------------------

  Installing Pcre
./configure--prefix=/usr/local/pcre/

----------------------------------------------------------------------

  install Apache for pre-installed libraries
./configure--prefix=/usr/local/apache/--sysconfdir=/etc/httpd/--with-pcre=/usr/local/pcre/--with-included

-APR--disable-userdir--enable-so--enable-deflate=shared--enable-expires-shared--enable-rewrite=shared--
Enable-static-support

Some versions require that APR and apr-util libraries be copied to srclib under the Apache installation directory or installed separately

----------------------------------------------------------------------

Install MySQL without configure file        

Add MySQL Account

/usr/sbin/groupadd MySQL

/usr/sbin/useradd-g MySQL MySQL

Cmake-dcmake_install_prefix=/usr/local/mysql-dwith_extra_charsets:string=gbk,gb2312,utf8-dwith_myisam_storage_ engine=1-dwith_innobase_storage_engine=1-dwith_readline=1-denabled_local_infile=1-dmysql_datadir=/var/ mysql-data/

    

----------------------------------------------------------------------

Lamp Environment Compilation (apache2.4.7 php5.4.25 MySQL 5.5.23)

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.