Build and install lamp combination (httpd 2.4+mysql 5.5+php 5.4)

Source: Internet
Author: User
Tags bz2 what is lamp aliyun

First, what is lamp

Linux+apache+mysql/mariadb+perl/php/python A group used to buildDynamic websiteor the server'sOpen Source Software, they are separate programs, but because they are often used together, they have an increasingly high degree of compatibility, which together form a powerful Web application platform. With the booming of the open source, the open sourced lamp has beenJ2eeand the. NET business softwareThe development of three pillars, and the software-developed projects in the software investment cost is low, and therefore by the entire IT community attention. From the website traffic, more than 70% of the traffic is lamp to provide, lamp is the most powerful website solution


Ii. Software Portfolio

Linux

Linux is free open source software, which means that the source code is available for the operating system.

Apache

Apache is one of the most popular open source web server software in use.

MySQL

MySQL is multi-threaded, multi-user SQL database management system.

MySQL has been purchased by Oracle from January 27, 2010 through Sun. SUN originally acquired MySQL on February 26, 2008.

MariaDB

Mariadb by the founder of MySQL Michael Widenius (English: Michael Widenius) led the development. MARIADB database management System is a branch of MySQL, mainly by the open source community in the maintenance, the use of GPL licensing MARIADB is fully compatible with MySQL, including the API and command line, so that it can easily become a substitute for MySQL. Due to dissatisfaction with MySQL after the acquisition of Oracle increasingly closed and slow to update, many Linux distributions gradually abandoned the popular open source database, and turned to mariadb. Where CentOS 7 is already mariadb by default. On the Internet, Wikipedia, the internet giant, Google has given up MySQL to turn to mariadb.

PHP

PHP is a programming language originally designed to produce dynamic Web sites. PHP is primarily used for server-side application software.


Third, compile and install Apache

[[email protected] ~]# yum groupinstall-y "Development tools" "Server Platform Development" #通过 "package Group" provides development tools (make, GCC, etc.) and development ring Environment (Development Library, header file, standard library, etc.)

Since httpd-2.4 need to rely on apr-1.4 and apr-util-1.4 more than the version, so we first compile and install the two source code. APR full name Apache Portable runtime (Apache Portable Runtime). Provides an underlying support interface library that can be used across multiple operating system platforms primarily for upper-level applications.

[Email protected] ~]# tar xf apr-1.5.2.tar.bz2 [[email protected] ~]# CD Apr-1.5.2[[email protected] apr-1.5.2]#./config Ure--prefix=/usr/local/apr[[email protected] apr-1.5.2]# make-j 4 && make install

apr-1.5.2:http://mirrors.aliyun.com/apache/apr/apr-1.5.2.tar.bz2


[[Email protected] ~]# tar XF apr-util-1.5.4.tar.bz2[[email protected] ~]# CD Apr-util-1.5.4[[email protected] Apr-util-1 .5.4]#./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr[[email protected] apr-util-1.5.4]# make-j 4 && make Install

apr-util-1.5.4:http://mirrors.aliyun.com/apache/apr/apr-util-1.5.4.tar.bz2


Because the httpd-2.4.16 compilation process relies on the Pcre-devel software package, it needs to be installed beforehand. This package system CD comes with, so you can mount the CD directly using Yum installation.

[[email protected] ~]# yum install -y pcre-devel[[email protected] ~]#  tar xf httpd-2.4.16.tar.bz2[[email protected] ~]# cd httpd-2.4.16[[email  protected] httpd-2.4.16]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/ httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib -- With-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most  --enable-mpms-shared=all --with-mpm=event#--prefix: Installation directory,--sysconfdir: Configuration file directory,--enable-so: Support modular mechanism,-- Enable-ssl: Start ssl#--enable-cgi: Start cgi,--enable-rewrite: Support URL re---with-zlib: Support transfer compression,--with-pcre: support Regular Expression #--with-apr : Indicates the APR installation path,--with-apr-util=/usr/local/apr-util: Indicates the Apr-util installation path,--enable-modules: Indicates the Enabled module #--enable-mpms-shared: Compile all supported MPM,--WITH-MPM: The default used mpm[[email protected] httpd-2.4.16]# make -j 4  && make&nbSp;install 

httpd-2.4.16:http://mirrors.aliyun.com/apache/httpd/httpd-2.4.16.tar.bz2


For later management convenience, we provide a management script for compiling the installed httpd-2.4, which can replicate the configuration files of the httpd-2.2 installed by Yum Source for modification.

[[EMAIL PROTECTED] ~]# CD /ETC/RC.D/INIT.D/[[EMAIL PROTECTED] INIT.D]# CP  httpd httpd24[[email protected] init.d]# vim httpd24apachectl=/usr/local/apache /bin/apachectlhttpd=${httpd-/usr/local/apache/bin/httpd}pidfile=${pidfile-/var/run/httpd/httpdi24.pid}lockfile =${lockfile-/var/lock/subsys/httpd24}[[email protected] init.d]# chkconfig --add  httpd24# set httpd2.4 to system service [[Email protected] init.d]# vim /etc/profile.d/httpd24.shexport  path=/usr/local/apache/bin: $PATH [[email protected] init.d]# . /etc/profile.d/ httpd24.sh  #把刚编译好的httpd2.4 The Script Run command is added to the environment variable [[email protected] init.d]# httpd -tsyntax  OK[[email protected] init.d]# /etc/init.d/httpd24 startStarting httpd:                                               [  OK  ][[email protected] init.d]# ss -anlState       Recv-Q Send-Q        Local  address:port          peer address:port     LISTEN     0      128                        :::80                      &NBSP:::*   #查看80端口已经处于监听状态


Iv. Compiling and installing MARIADB

[[Email protected] ~]# tar XF mariadb-5.5.42.tar.gz-c/usr/local/[email protected] ~]# Cd/usr/local/[[email protected] L  ocal]# ln-sv mariadb-5.5.42 mysql ' mysql ', ' mariadb-5.5.42 ' [[email protected] local]# CD Mysql/[[email protected] ~]# Mkdir-pv/mariadb/data[[email protected]/]# groupadd-r mysql[[email protected]/]# useradd-g mysql-r-s/sbin/nologi N-m-d/mariadb/data mysql# New user runs the process in a secure manner [[email protected] ~]# chown-r mysql:mysql/mariadb/data/

Mariadb:http://archive.mariadb.org//mariadb-5.5.42/bintar-linux-x86_64/mariadb-5.5.42-linux-x86_64.tar.gz

This article is from the "Ma Gao" blog, please make sure to keep this source http://kgdbfmwfn.blog.51cto.com/5062471/1698301

Build and install lamp combination (httpd 2.4+mysql 5.5+php 5.4)

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.