Set up Zend Framework Skeleton Application on Mac Step by Step

来源:互联网 发布:vb与c#语法区别大吗 编辑:程序博客网 时间:2024/05/02 03:05

1.Install Composer

Follow Composer official guide and install it locally: https://getcomposer.org/download/

Run the following commands:

$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"$ php -r "if (hash_file('SHA384', 'composer-setup.php') === '070854512ef404f16bac87071a6db9fd9721da1684cd4589b1196c3faf71b9a2682e2311b36a5079825e155ac7ce150d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"$ php composer-setup.php$ php -r "unlink('composer-setup.php');"

Here is the screenshot of what I did:

1

I got a warning about OpenSSL version, we can just ignore it for now.

Now I can see that composer.phar has been created in my file system:

3



2.Verify that Composer is installed successfully:

Since I installed Composer locally, so when I need to run Composer, I need to cd into the installation path, and run

$ php composer.phar

2


If you want to install Composer globally, you can follow this guide: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx



3. Install ZendSkeletonApplication

Follow the instruction on the Github repository: https://github.com/zendframework/ZendSkeletonApplication

Here I want to clone the application in "zend" folder, so I run this command:

$ php composer.phar create-project -n -sdev zendframework/skeleton-application zend

The screenshot:

4

....

5



4. Verify that ZendSkeletonApplication has been installed successfully

We can see that a "zend" folder is created and the application files are placed inside:

6

Start apache server(my apache root directory is parent folder of "mysites"), go to http://localhost/mysites/zend/public/

We can see the skeleton application running:

7



0 0