How to setup/install zend framework on mac os x lion? Where is .bash_profile to set alias for zf.sh?

13,618

Solution 1

As .bash_profile was not there I created my own! by -

sudo nano ~./bash_profile

and created a alias in it for zf.sh file -

alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh

and boom!!

I tested this by running this command -

zf show version

and it worked perfectly...

Many thanks to @tawfekov and @halfer

Solution 2

Please find the the below which works fine for your problem

alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh

but you have to enter this each time you open a new terminal.

Steps to create permanent aliases on MAC OS X:.

Step 1 : Open terminal and issue this command open ~/.bash_profile

Step 2: alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh

Step 3: save the bash_profile and exit the terminal

Step 4: Use the zend tool using zf command in the terminal

Solution 3

Just a quick one why install the zend framework just download it open the terminal and type the location you have installed the zend framework ie

zendframework/bin/zf.sh create project quickstart

No need to add this to your profile.

Solution 4

Try ls -a ~ to see what you have in your home directory - there is probably a .profile file in there.

Solution 5

to be honest I had poor experience in mac osx , but i am ubuntu user

1-I would suppose you had zend framework installed in : /home/saurabh/ZendFramework/ so the zf.sh would be in /home/saurabh/ZendFramework/bin/zf.sh

let's try to symblink it to bin directory by executing this command ln -s /home/saurabh/ZendFramework/bin/zf.sh /home/saurabh/bin/zf

if this command ran with no error you should be able to run this command zf from any where in your mac and you should see the zf command line menu

2- zend framework doc http://framework.zend.com/manual/en/zend.tool.framework.clitool.html

3-another useful resource : http://www.zendcasts.com/

Share:
13,618
Saurabh
Author by

Saurabh

I am AWS Certified Solution Architect (https://www.certmetrics.com/amazon/public/badge.aspx?i=1&t=c&d=2017-09-06&ci=AWS00294125). My areas of expertise are iOS development, Objective C, Swift, Cross Platform Apps, React Native, Node.js, MongoDB, PHP, MySql, AWS, Cloud Computing, High Availability, High Scalability, VPCs, Project Management. http://makebetterthings.com/

Updated on June 17, 2022

Comments

  • Saurabh
    Saurabh almost 2 years

    Note: Move this question to other site if you think its not suite here

    Guys I am trying to install/setup zend framework on my mac book pro. I am running MAMP Pro 2.0.3 on mac os x lion 10.7.2

    I got zend framework installation instruction form http://akrabat.com/. The author says that I should add alias to zf.sh script in my ~/.bash_profile. But there is no such file in my home directory to I create a new file by "touch .bash_profile", but this is also not working.

    Also I downloaded zend studio trial and tried to create a project from there but when I run it in browser its only showing blank page...

    Any idea whats going wrong? Can anybody tell me what can I do to successfully create project from zend studio or zend tool?

    Is there any step by step guide available for mac os x lion ? any help will be much appreciated!!

    Update 1 - OMG! how can I skip this... when I am creating project form zend studio its not putting zend library in "library" folder... thats why I am getting blank page... I just copied the zend folder in library and project form zend studio got working...

    still working to resolve the first issue (setting zf.sh) :(