开发者社区> 问答> 正文

Linux下安装PHP


下载  http://www.php.net/releases/# wget http://cn2.php.net/get/php-5.5.5.tar.gz/from/this/mirror

解压
# tar zxvf php-5.5.5.tar.gz
# cd php-5.5.5



安装支持库
# yuminstall -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeglibjpeg-devel libpng libpng-devel freetype freetype-devel libxml2libxml2-devel glibc glibc-devel glib2 glib2-develbzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogse2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldapopenldap-devel nss_ldap openldap-clients openldap-servers

下载安装所需类库libmcrypt
# wget http://download.chinaunix.net/down.php?id=11901&ResourceID=5917&site=1

# tar zxvf libmcrypt-2.5.7.tar.gz
# cd libmcrypt-2.5.7
# ./configure
# make && make install
# cd ..
解压安装php
# tar zxvf php-5.5.5.tar.gz
# cd php-5.5.5
# ./configure--prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc--with-iconv-dir=/usr --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 --with-curlwrappers--enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd--enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl--enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc--enable-zip --enable-soap  --with-mysql=mysqlnd  --with-mysqli=mysqlnd

展开
收起
老毛哈哈 2015-09-01 17:30:54 7428 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载