如何安装Phalcon版本2

问题描述:

我在phalcon版本2上构建了一些应用程序,但是自版本3发布以来,新安装的phalcon默认为版本3.

I have some applications built on phalcon version 2, but since the release of the version 3, new installations of phalcon default to version 3.

您需要从源代码安装phalcon,但与其从master分支进行构建,不如将其切换到2.0.x分支.

You need to install phalcon from source, but instead of build from the master branch switch the branch to the 2.0.x branch.

git clone --depth 1 https://github.com/phalcon/cphalcon.git
cd cphalcon
git remote set-branches origin '2.0.x'
git fetch --depth 1 origin 2.0.x
git checkout 2.0.x
cd build
./install

我创建了这个要点是为了使其更容易- https://gist.github.com/goke-epapa/c325da217296ec4880850972be955bf0

I created this gist to make this easier - https://gist.github.com/goke-epapa/c325da217296ec4880850972be955bf0

更新

有人告诉我上面的代码段安装了版本2.0.10,因此下面的代码段专门针对版本2.0.13

I've been told that the above snippet installs version 2.0.10, so the snippet below is specifically for version 2.0.13

git clone --depth 1 https://github.com/phalcon/cphalcon.git
cd cphalcon
git remote set-branches origin 'phalcon-v2.0.13'
git fetch --depth 1 origin phalcon-v2.0.13
git checkout phalcon-v2.0.13
cd build
./install

更新 这两个代码段都缺少cd cphalcon命令,因此我修改了这些代码段.

Update Both code snippets were missing the cd cphalcon command so I modified the snippets.