Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»PHP Framework»How To Install Zend Framework on Ubuntu 18.04

    How To Install Zend Framework on Ubuntu 18.04

    RahulBy RahulOctober 18, 20193 Mins ReadUpdated:January 4, 2020

    Zend Framework 3 is latest version available for creating applications. The latest version provides a faster application than previous versions. Zend is an open-source framework for developing web applications and services. It uses a 100% object-oriented code. This tutorial will help you to install Zend Framework on your Ubuntu 18.04 (Bionic) LTS systems.

    Prerequsities

    • Shell access on Ubuntu 18.04
    • Sudo proviledged account access

    Step 1 – Install Apache & PHP

    The Zend Framework required PHP 5.6 or higher version to run. So make sure you have installed proper PHP version. To install PHP and Apache2 on Ubuntu 18.04 Bionic system follow the below commands.

    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:ondrej/php
    sudo apt update
    sudo apt install -y php apache2 libapache2-mod-php
    sudo apt install -y php-mbstring php-mysql php-xml
    

    Step 2 – Install PHP Composer

    Now, As you have installed PHP, now install PHP Composer on your system using the following set of commands. This is the simple instruction to download the composer binary file and place it under the bin directory.

    curl -sS https://getcomposer.org/installer | sudo php
    sudo mv composer.phar /usr/local/bin/composer
    sudo chmod +x /usr/local/bin/composer
    

    Step 3 – Install Zend Framework

    You can install the Zend framework in multiple ways. But the Composer is the easiest way for the installation of Zend. Create a directory for your a

    cd /var/www
    composer create-project -sdev zendframework/skeleton-application ZendApp
    

    The above command may time some time as per your network speed. Also, this will ask for some user input. Read the instructions and provide inputs.

    Step 4 – Start Web Server

    The following command will start a PHP-CLI web server. This is useful for temporarily testing and helpful for development purposes.

    cd /var/www/ZendApp
    php -S 0.0.0.0:8080 -t public/ public/index.php
    

    Now access http://localhost:8080 in a web browser. Also, you can access it with the system IP address.

    Install Zend Ubuntu

    Step 5 – Configure Apache Server

    In the above step, you have directly run an application with PHP CLI. You can also host the Zend application with Apache, which is required to set up the staging and production environment. Let’s configure the Zend Framework as a web application with Apache2. Create a configuration file in the Apache for the Zend installation.

    sudo vi /etc/apache2/sites-available/zend.example.com.conf
    

    Add the following content in the file. Make the necessary changes as per your directory structure and server name

    Apache
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <VirtualHost *:80>
       ServerName zend.example.com
       DocumentRoot /var/www/ZendApp/public
     
       <Directory /var/www/ZendApp/public>
           AllowOverride All
           Require all granted
       </Directory>
    </VirtualHost>

    Now enable the newly created website with the following command. Also, make sure you have rewrite modules enabled in Apache.

    sudo a2enmod rewrite
    sudo a2ensite zend.example.com
    sudo systemctl restart apache2.service
    

    Now you can access the Zend application with the configured domain in Apache.

    Zend on Ubuntu 18.04

    Conclusion

    All done! you have installed the Zend framework and created an application on your system. Let’s enjoy development with Zend Framework.

    Framework PHP php framework zend zend2
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install and Configure Fail2ban on CentOS 8
    Next Article How To Install Wine 5.1 on CentOS/RHEL 8

    Related Posts

    How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04

    Updated:May 9, 20223 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Setup Apache, PHP & MongoDB in Ubuntu & Debian

    Updated:October 8, 20213 Mins Read

    How To Install and Use PHP Composer on Debian 11

    Updated:February 16, 20224 Mins Read

    How To Install PHP (8.1, 7.4 & 5.6) on Debian 11

    Updated:February 16, 20224 Mins Read

    How To Set Up Laravel on Ubuntu 21.04 & 20.10

    Updated:July 15, 20214 Mins Read

    6 Comments

    1. Willi da Silva Borges on May 22, 2021 8:53 am

      how can you install skeleton-application with composer ^ 2.0 under ubuntu 20.04?

      Reply
    2. Tushar Sonwane on January 3, 2020 1:32 pm

      while installing php 5 it shows “package php 5 is not available”
      what to do now?

      Reply
      • Rahul on January 4, 2020 4:30 am

        That is an outdated tutorial, We have noted it and will update as soon as possible.

        To install PHP 5.6, use: https://tecadmin.net/install-php5-on-ubuntu/

        Reply
        • Raja on October 11, 2021 11:17 am

          my zent project folder is not comming after /public directory
          but zend framework is nunning http://*/*/public
          exp : http://*/*/public/test(something)

          kindly support we didn’t install zend server, configured only zend framwork.
          How to check it,Kindly support it

          Reply
    3. John on February 12, 2019 8:16 am

      Hi Rahul,

      in point 3, you should remove the sudo before ‘cd’, and it is highly recommended not to sudo the composer.

      Reply
    4. muna on July 16, 2017 8:46 am

      Hi ,
      I am getting Internal Server Error error when run the site zend2.example.com

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.