欢迎来到天天文库
浏览记录
ID:8803332
大小:17.74 KB
页数:12页
时间:2018-04-08
《linux下配置php开发环境》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、linux中搭建php开发环境笔记:一、安装apache服务器1.下载httpd-2.4.7.tar.gz安装包2.新建目录/usr/local/softwares/php-dev-softwares/apache/apache-httpd,在此目录>下解压httpd-2.4.7.tar.gz3.执行命令sudo./configure--prefix=/usr/local/softwares/php-dev-softwares/apache/apache-httpd报错:checkingforAPR...noconfigure:error:APRnotfound
2、.Pleasereadthedocumentation.需要安装apache-apr和apache-apr-util1)下载apr-1.5.0.tar.gz和apr-util-1.5.3.tar.gz2)解压,执行如下命令tar-zxvfapr-1.5.0.tar.gzcdapr-1.5.0./configuremakemakeinstallapr安装完成。tar-zxvfapr-util-1.5.3.tar.gzcdapr-util-1.5.3./configure--prefix=/usr/local/apr-util--with-apr=/usr/loca
3、l/aprmakemakeinstallapr-util安装完成3)执行安装httpd命令sudo./configure--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--prefix=/usr/local/softwares/php-dev-softwares/apache/apache-httpd报错:configure:error:pcre-configforlibpcrenotfound.PCREisrequiredandavailable4)安装PCRE,下载pcre-8.34.t
4、ar.bz2执行如下命令sudotar-vxjfpcre-8.34.tar.bz2cdpcre-8.34/sudo./configure--prefix=/usr/local/pcre报错:configure:error:YouneedaC++compilerforC++support.执行命令:sudoapt-getinstallbuild-essentialUbuntu并没有提供C/C++的编译环境,因此还需要手动安装。如果想在Ubuntu中编译c/c++程序,只需要安装该软件包就可以了重新执行命令cdpcre-8.34/sudo./configure--p
5、refix=/usr/local/pcresudomakesudomakeinstallpcre安装完成。5)执行安装httpd命令cd/usr/local/softwares/php-dev-softwares/apache/apache-httpd/httpd-2.4.7sudo./configure--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre--prefix=/usr/local/softwares/php-dev-softwa
6、res/apache/apache-httpdsudomakesudomakeinstallhttpd服务安装完成进入httpd服务器的安装bin目录启动服务./apachectl-kstart报错:AH00558:httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using127.0.1.1.Setthe'ServerName'directivegloballytosuppressthismessagehttpd:Couldnotreliablydeterminetheserv
7、er'sfullyqualifieddomainname,using127.0.1.1forServerName解决方法:修改配置文件conf/httpd.conf找到行#ServerNamewww.example.com:80修改为:ServerNamelocalhost:80报错:(13)Permissiondenied:AH00072:make_sock:couldnotbindtoaddress[::]:80(13)Permissiondenied:AH00072:make_sock:couldnotbindtoaddress0.0.0.0:80解决方法
8、:启动的时候加上sudo
此文档下载收益归作者所有