PHP源码安装

1.安装php依赖包
  yum install zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel\ libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel -y
  安装libiconv ./configure --prefix=/usr/local/libiconv make make install
2.安装php
  ./configure --prefix=/usr/local/php-5.5.38 \
  --with-apxs2=/usr/local/apache/bin/apxs \
  --with-mysql=/usr/local/mysql \
  --with-xmlrpc \
  --with-openssl \
  --with-zlib \
  --with-freetype-dir \
  --with-gd \
  --with-jpeg-dir \
  --with-png-dir \
  --with-iconv-dir=/usr/local/libiconv \
  --enable-sockets \
  --enable-mbstring \
  --enable-soap \
  --enable-static \
  --enable-gd-native-ttf \
  --with-curl \
  --with-xsl \
  --enable-ftp \
  --with-libxml-dir
  编译失败 安装 yum install openssl-devel yum install libxslt-devel
3.make && make install 成功 cp php.ini-development /usr/local/php/lib/php.ini
4.apache httpd.conf 增加2行 第311行
  AddType application/x-httpd-php .php .phtml
  AddType application/x-httpd-php-source .phps
5.该首页地址为index.php

转载于:https://www.cnblogs.com/wuhua1/p/linux7.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值