登录  /  注册
配置远程服务器php环境-php
php中文网
发布: 2016-06-13 11:45:19
原创
822人浏览过

配置远程服务器php环境---php

1.下载php:http://cn2.php.net/get/php-5.5.8.tar.gz/from/a/mirror

2.安装

#./configure --disable-rpath --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql --withz apxs2=/usr/local/apache/bin/apxs --with-mysql --disable-fileinfo#make#make install
登录后复制

?3.配置

?

?

#cd /usr/local/src/php-5.5.8#cp php.ini-development /usr/local/php5/lib/php.ini#vi /usr/local/apache/conf/httpd.conf 
登录后复制

? ?修改apache配置文件

?

? (1)ServerName??192.168.0.205:80

? (2)添加AddType application/x-httpd-php .php

? ?(3)查找 DirectoryIndex index.html 添加index.php中间加,号

?

#cd /usr/local/apache/bin/#./apachectl restart
登录后复制

?

4.遇到的问题及解决办法

? (1)make: *** No targets specified and no makefile found. Stop.

?

1、wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz2.、tar zxvf ncurses-5.6.tar.gz3、 ./configure -prefix=/usr/local -with-shared -without-debug4、make5、make install
登录后复制

?

? (2)configure error xml2-config not found. please check your libxml2 installation

?

检查是否安装了libxm包# rpm -qa |grep  libxml2libxml2-2.6.26-2.1.12libxml2-python-2.6.26-2.1.12重新安装libxml2和libxml2-devel包, yum安装的时候发现新版本会提示更新,需要更新的可以更新,不要跳过就行了。# yum install libxml2# yum install libxml2-devel -y安装完之后查找xml2-config文件是否存在# find / -name "xml2-config"/usr/bin/xml2-config
登录后复制

??参见:http://blog.chinaunix.net/uid-26719405-id-3409842.html

? (3)configure: error: Cannot find MySQL header files under /usr/include/mysql.

?

#find / -name mysql.h  //查找是否存在#yum install MySQL-devel*注意:安装完成后,要在./configure 后多加一条--with-mysql路径
登录后复制

? ?参见:http://blog.csdn.net/sunnyzhangwenhan/article/details/8517463

?

(4)virtual memory exhausted: Cannot allocate memory

?

# dd if=/dev/zero of=/swap bs=1024 count=1MFormat the swap file:# mkswap /swapEnable the swap file:# swapon /swapEnable swap on boot:# echo "/swap swap swap sw 0 0" >> /etc/fstab
登录后复制

? ?(5)make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

? ?这是由于内存小于1G所导致.在./configure加上选项:–disable-fileinfo

?

?

?

?

?

?

相关标签:
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 技术文章
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2023 //m.sbmmt.com/ All Rights Reserved | 苏州跃动光标网络科技有限公司 | 苏ICP备2020058653号-1

 | 本站CDN由 数掘科技 提供

登录PHP中文网,和优秀的人一起学习!
全站2000+教程免费学