妙博客

主机评测 香港服务器 洛杉矶VPS测评

centos 安装phpstudy

下载和安装


1.先wget下载

wget -c http://lamp.phpstudy.net/phpstudy.bin


2.再给对应的权限(自己服务器,暂时自己用,所以暂时744权限)

chmod 744 phpstudy.bin (文档上是 chmod +x phpstudy.bin, 自己简单操作)


3.最后安装

./phpstudy.bin


安装的时候,需要选择php版本,以及 服务器类型


大概30分钟之后,安装完成,用以下命令启动phpstudy

phpstudy start(启动)

phpstudy stop(停止)

phpstudy restart(重启)


4.假设遇到如下错误

Sorry, I cannot run apxs.  Possible reasons follow:


1. Perl is not installed

2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs

3. Apache was not built using --enable-so (the apxs usage page is displayed)


The output of /phpstudy/server/httpd/bin/apxs follows:

./configure: line 8423: /phpstudy/server/httpd/bin/apxs: No such file or directory

configure: error: Aborting

make: *** No targets specified and no makefile found.  Stop.

make: *** No rule to make target `install'.  Stop.

httpd: no process found

cp: target '/phpstudy/server/httpd/conf/' is not a directory

phpstudy-func.sh: line 456: /phpstudy/server/httpd/bin/apachectl: No such file or directory

./phpstudy-all.bin: line 228: update-rc.d: command not found


解决办法是:

yum -y install perl*
yum -y install httpd-devel

5.如果出现如下错误:

configure: error: xml2-config not found. Please check your libxml2 installation.

make: *** No targets specified and no makefile found.  Stop.


解决办法是:

 yum install libxml2 -y
 yum install libxml2-devel -y


6.如果出现:

configure: error: freetype-config not found.

make: *** No targets specified and no makefile found.  Stop.


解决办法是:

yum install freetype-devel -y


7.如果出现:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.


解决办法是:

yum install -y epel-release
yum install -y libmcrypt-devel


Copyright Your 142132.com Rights Reserved. 赣ICP备17010829号-2