Cài đặt Zend 2.5

I. Download hoặc Clone trên github hoặc download trên trang chủ Zend.

II. Copy toàn bộ file thư mục download vào trong thư mục web.

20160517_1285x234_01

Di chuyển đến thư mục web

  • cd www/zf2-tutorial

Update Composer

20160517_887x89_02Install by composer

20160517_575x397_03

Tạo file VirtualHost :

+ add file hosts : sudo nano /etc/hosts

20160517_403x98_04

+ Tạo file local-zf2-tutorial.com.conf trong /etc/apache2/sites-available

  • cd /etc/apache2/sites-available
  • sudo nano local-zf2-tutorial.com.conf

20160517_589x217_05

+ Enable site và restart server

  • sudo a2ensite local-zf2-tutorial.com.conf
  • sudo service apache2 restart

 

Mở trình duyệt với URL “local-zf2-tutorial.com” và xem kết quả.

20160517_1260x578_06

Done (^_^)

Advertisements

Cài đặt composer trên Ubuntu 14.04

Step 1 — Installing the Dependencies

Before we download and install Composer, we need to make sure our server has all dependencies installed.

First, update the package manager cache by running:

  • sudo apt-get update

Now, let’s install the dependencies. We’ll need curl in order to download Composer and php5-cli for installing and running it. git is used by Composer for downloading project dependencies. Everything can be installed with the following command:

  • sudo apt-get install curl php5-cli git

You can now proceed to the next step.

Step 2 — Downloading and Installing Composer

Composer installation is really simple and can be done with a single command:

This will download and install Composer as a system-wide command named composer, under /usr/local/bin. The output should look like this:

Output
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

To test your installation, run:

  • composer

And you should get output similar to this:

Output
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.0-dev (9859859f1082d94e546aa75746867df127aa0d9e) 2015-08-17 14:57:00

Usage:
 command [options] [arguments]

Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question
 --profile             Display timing and memory usage information
 --working-dir (-d)    If specified, use the given directory as working directory.

. . .

This means Composer was succesfully installed on your system.