安裝phalcon 開發工具
先下載:https://github.com/phalcon/phalcon-devtoolsphp
下載後,解壓縮。git
.[root@localhost web]# cd phalcon-devtools-3.2.12
[root@localhost phalcon-devtools-3.2.12]# phalcon.shgithub
Phalcon Developer Tools Installerweb
Make sure phalcon.sh is in the same dir as phalcon.php
and that you are running this with sudo or as root.shell
Installing Devtools...
Working dir is: /web/phalcon-devtools-3.2.12
Generating symlink...vim
Done. Phalcon Developer Tools installed!
Thank you for using Phalcon Developer Tools!
We hope that Phalcon Developer Tools helps to make your life easier.bash
In case of problems: https://github.com/phalcon/phalcon-devtools/issues
and: https://forum.phalconphp.comide
To start using Phalcon Developer Tools you need to run 'source /root/.bash_profile'
/web/phalcon-devtools-3.2.12/phalcon.sh: line 150: php: command not found工具
[root@localhost phalcon-devtools-3.2.12]# php -v
bash: php: command not found
當報上面的錯時,是沒有添加路徑。
因此,php -v 會報錯。開發工具
經過phpinfo()查看到:php目錄在:/usr/local/php/etc/php.ini
cd /usr/local/php
裏面的bin目錄。
將 /usr/local/php/bin目錄添加到PATH中
修改:
cd ~
我這裏的 ~ 便是 /root目錄。你要注意用本身的。
vim .bash_profile
添加一句。
export PATH=$PATH:/usr/local/php/bin
保存以後。
source /root/.bash_profile
[root@localhost ~]# source /root/.bash_profile
[root@localhost ~]# php -v
PHP 7.2.4 (cli) (built: Apr 24 2018 22:31:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.4, Copyright (c) 1999-2018, by Zend Technologies
如今再次回到,phalcon 開發工具的目錄:就正常了!
[root@localhost phalcon-devtools-3.2.12]# phalcon.sh
Phalcon DevTools (3.2.12)
Available commands:info (alias of: i)commands (alias of: list, enumerate)controller (alias of: create-controller)module (alias of: create-module)model (alias of: create-model)all-models (alias of: create-all-models)project (alias of: create-project)scaffold (alias of: create-scaffold)migration (alias of: create-migration)webtools (alias of: create-webtools)serve (alias of: server)console (alias of: shell, psysh)