Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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) :(

like image 431
Saurabh Avatar asked Nov 13 '11 18:11

Saurabh


4 Answers

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

like image 186
Saurabh Avatar answered Nov 14 '22 21:11

Saurabh


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

like image 40
user2211458 Avatar answered Nov 14 '22 23:11

user2211458


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

like image 23
halfer Avatar answered Nov 14 '22 23:11

halfer


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/

like image 45
tawfekov Avatar answered Nov 14 '22 22:11

tawfekov