linux apache 安装 zendframework2,在Linux(CentOS)上安装搭建zend framework2运行环境

在Linux(CentOS)上安装搭建zend framework2运行环境

2014年02月19日

在Linux上安装搭建Zend Framework2的运行环境我们需要先安装PHP的运行环境。

关于Linux(CentOS)的安装,请点击这里。安装Linux(Centos6)服务器

关于Linux(CentOS)上PHP的运行环境,请点击在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境。

如果在虚拟主机上运行,请点击Apache添加配置虚拟主机(VirtualHost)

Zend Framework2 搭建步骤

1. 下载ZendSkeletonApplication到站点根目录下,这里是虚拟主机根目录。

这里使用git版本管理工具获取ZendSkeletonApplication,也可以从GitHub直接下载,解压,拷贝。

https://github.com/zendframework/ZendSkeletonApplication

[root@qiais qi]# git clone git://github.com/zendframework/ZendSkeletonApplication.git public_html

Initialized empty Git repository in /home/qi/public_html/.git/

remote: Reusing existing pack: 2429, done.

remote: Total 2429 (delta 0), reused 0 (delta 0)

Receiving objects: 100% (2429/2429), 1.40 MiB | 18 KiB/s, done.

Resolving deltas: 100% (1061/1061), done.

[root@qiais qi]# pwd

/home/qi

[root@qiais qi]# chmod -R 755 public_html/

[root@qiais public_html]#

2. 使用Composer:下载Zend Framework需要的相关包。

[root@qiais qi]# cd public_html/

[root@qiais public_html]# pwd

/home/qi/public_html

[root@qiais public_html]# php composer.phar self-update

Updating to version 432ace33d4216ecb3e3082d53cf06907dc329663.

Downloading: 100%

Use composer self-update --rollback to return to version 7adc41d02c3536b3e19a6b906cf0c4cf6d3beb70

[root@qiais public_html]# php composer.phar install

Loading composer repositories with package information

Installing dependencies (including require-dev)

- Installing zendframework/zendframework (2.2.5)

Downloading: 100%

zendframework/zendframework suggests installing ext-intl (ext/intl for i18n features (included in default builds of PHP))

zendframework/zendframework suggests installing doctrine/annotations (Doctrine Annotations >=1.0 for annotation features)

zendframework/zendframework suggests installing ircmaxell/random-lib (Fallback random byte generator for Zend\Math\Rand if OpenSSL/Mcrypt extensions are unavailable)

zendframework/zendframework suggests installing ocramius/proxy-manager (ProxyManager to handle lazy initialization of services)

zendframework/zendframework suggests installing zendframework/zendpdf (ZendPdf for creating PDF representations of barcodes)

zendframework/zendframework suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha for rendering ReCaptchas in Zend\Captcha and/or Zend\Form)

Writing lock file

Generating autoload files

[root@qiais public_html]#

3. 确认

访问主机首页,应该能看到如下界面了。

5c4ed2f58adbf3e0c3e8e28664c4acb8.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值