码迷,mamicode.com
首页 > 其他好文 > 详细

LAMP源码安装

时间:2018-12-27 13:17:34      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:ble   软件包   pre   lam   path   环境变量   atom   install   soa   

1.1 安装apache

apache历史版本下载地址:点击这里
apr下载地址:点击这里
源码安装LAMP环境

1.1.1 下载软件:

个人习惯/server/tools 软件包目录
$ wget https://archive.apache.org/dist/httpd/httpd-2.4.33.tar.gz
$ wget http://www.apache.org/dist/apr/apr-1.6.5.tar.gz
$ wget http://www.apache.org/dist/apr/apr-util-1.6.1.tar.gz

1.1.2.编译安装apr

$ tar xf apr-1.6.5.tar.gz
$ cd apr-1.6.5/
$ ./configure --prefix=/usr/local/apr
$ make
$ make install

1.1.3 编译安装util

$ tar xf apr-util-1.6.1.tar.gz
$ cd apr-util-1.6.1/
$ ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
$ make
$ make install

1.1.4 安装httpd

1.1.4.1 安装依赖

$ yum -y install pcre-devel zlib zlib-devel
$ tar xf httpd-2.4.33.tar.gz 
$ cd httpd-2.4.33/
./configure --prefix=/application/httpd-2.4.33 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-module=so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-ab --disable-userdir --with-mpm=worker --enable-nonportable-atomics --disable-ipv6 --with-sendfile
$ make
$ make install

1.1.4.2 检查语法(在httpd的安装位置路径bin下执行此命令,也可设置环境变量)

$ ./apachectl -t
1.1.4.3 启动
$ ./apachectl -k start

1.1.4.4 查看编译的模块

$ ./apachectl -l
$ ./apachectl -M

1.2 PHP安装

1.2.1 安装依赖

yum install -y zlib libjpeg freetype libpng gd curl zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel libjpeg-turbo-devel libcurl-devel libxslt-devel libmcrypt-devel mhash mcrypt

1.2.2 下载php

php-5.5.38

$ tar xf php-5.5.38.tar.gz
$ cd php-5.5.38/
./configure --prefix=/application/php-5.5.38 --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --with-gettext --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-opcache=no  --enable-ftp --with-apxs2=/application/httpd-2.4.33/bin/apxs
$ make
$ make install

复制解释器配置文件

cp /server/tools/php-5.5.38/php.ini-production /application/php-5.5.38/lib/php.ini

配置apache支持php

LAMP源码安装

标签:ble   软件包   pre   lam   path   环境变量   atom   install   soa   

原文地址:https://www.cnblogs.com/blsnt/p/10184150.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!