Step 1 -> Make sure composer is installed on your system. If not then you can use this command to install composer (curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer )
If you want to install curl then you can use this command( sudo apt-get install curl)
Step 2 -> Use below command to install Zf2 skeleton application on your local machine.You can put your desire version like ^2.4. If you will not use version number then it will download latest version of zend framework.
Command : composer create-project zendframework/skeleton-application path to install ^2.4
Example : If you want to install skeleton application under the htdocs directory then you can use like
composer create-project zendframework/skeleton-application opt/lampp/htdocs/zf2 ^2.4
Stpe 3 -> After successfully installation you will get directory structure like
application_root/
config/
application.config.php
autoload/
global.php
local.php
// etc.
data/
module/
vendor/
public/
.htaccess
index.php
init_autoloader.php