{"id":8709,"date":"2024-05-23T16:41:44","date_gmt":"2024-05-23T16:41:44","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=8709"},"modified":"2024-05-23T16:41:46","modified_gmt":"2024-05-23T16:41:46","slug":"install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/","title":{"rendered":"How to Install Zend Framework \/ Laminas\u00a0on Linux"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en.jpg\" alt=\"Install Zend Framework Linux Ubuntu RHEL Debian Centos\" class=\"wp-image-8722\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p><strong>Zend Framework \/ Laminas<\/strong>\u00a0is a popular open-source PHP framework designed to make building robust, high-performance web applications simpler and more efficient. With its modular architecture and use of object-oriented programming principles, Zend Framework provides developers with the tools they need to create scalable, secure, and high-quality applications. In this comprehensive guide, we will cover how to install Zend Framework on a Linux system, ensuring you have everything you need to get started with your PHP development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"table-of-contents\">Table of Contents<\/h2>\n\n\n\n<ol>\n<li>Prerequisites<\/li>\n\n\n\n<li>Installing Required Software\n<ul>\n<li>PHP<\/li>\n\n\n\n<li>Apache<\/li>\n\n\n\n<li>MySQL<\/li>\n\n\n\n<li>Composer<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Setting Up the Environment<\/li>\n\n\n\n<li>Installing Zend Framework<\/li>\n\n\n\n<li>Configuring Apache<\/li>\n\n\n\n<li>Creating a New Zend Framework Project<\/li>\n\n\n\n<li>Running Your First Zend Framework Application<\/li>\n\n\n\n<li>Common Issues and Troubleshooting<\/li>\n\n\n\n<li>Additional Resources<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-prerequisites\">1. Prerequisites<\/h2>\n\n\n\n<p>Before diving into the installation process, ensure that you have a Linux system with a user account that has sudo privileges. You will also need an active internet connection to download the necessary packages and dependencies.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"recommended-system-requirements\">Recommended System Requirements<\/h3>\n\n\n\n<ul>\n<li>Linux distribution: Ubuntu, Debian, CentOS, Fedora, or any other major distribution.<\/li>\n\n\n\n<li>PHP version 7.4 or higher.<\/li>\n\n\n\n<li>Apache HTTP Server 2.4 or higher.<\/li>\n\n\n\n<li>MySQL version 5.7 or higher (optional, for database-driven applications).<\/li>\n\n\n\n<li>Composer (dependency manager for PHP).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-installing-required-software\">2. Installing Required Software<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-php\">Installing PHP<\/h3>\n\n\n\n<p>To install PHP, you need to update your package index and then install PHP along with some common modules.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt install php php-cli php-fpm php-mysql php-json php-curl php-mbstring php-xml php-zip -y<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora\">On CentOS\/Fedora\/RHEL<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install epel-release -y\n$ sudo yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm -y\n$ sudo yum install yum-utils -y\n$ sudo yum-config-manager --enable remi-php74\n$ sudo yum install php php-cli php-fpm php-mysql php-json php-curl php-mbstring php-xml php-zip -y<\/code><\/pre>\n\n\n\n<p>Verify the installation by checking the PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ php -v<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-apache\">Installing Apache<\/h3>\n\n\n\n<p>Apache is a widely used web server, and it can be easily installed using the package manager of your Linux distribution.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-1\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt install apache2 -y<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-1\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install httpd -y<\/code><\/pre>\n\n\n\n<p>Start and enable Apache to run on boot:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-2\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start apache2\n$ sudo systemctl enable apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-2\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start httpd\n$ sudo systemctl enable httpd<\/code><\/pre>\n\n\n\n<p>Verify the installation by opening your web browser and navigating to&nbsp;<code>http:\/\/localhost<\/code>. You should see the Apache default welcome page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-mysql\">Installing MySQL<\/h3>\n\n\n\n<p>If your application requires a database, you can install MySQL or MariaDB. Here, we will use MySQL.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-3\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt install mysql-server -y<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-3\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install mysql-server -y<\/code><\/pre>\n\n\n\n<p>Start and enable MySQL to run on boot:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-4\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start mysql\n$ sudo systemctl enable mysql<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-4\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start mysqld\n$ sudo systemctl enable mysqld<\/code><\/pre>\n\n\n\n<p>Secure your MySQL installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Follow the prompts to set up a root password and secure the installation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-composer\">Installing Composer<\/h3>\n\n\n\n<p>Composer is a dependency manager for PHP that will help you manage your project\u2019s libraries and dependencies.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-and-centosfedora\">On Ubuntu\/Debian and CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ php -r \"copy('https:\/\/getcomposer.org\/installer', 'composer-setup.php');\"\n$ php -r \"if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('https:\/\/composer.$ github.io\/installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"\n$ php composer-setup.php\n$ sudo mv composer.phar \/usr\/local\/bin\/composer<\/code><\/pre>\n\n\n\n<p>Verify the installation by checking the Composer version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ composer --version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-setting-up-the-environment\">3. Setting Up the Environment<\/h2>\n\n\n\n<p>Before installing Zend Framework, it is crucial to ensure that your PHP environment is configured correctly. This includes setting up the appropriate PHP modules and configuring your PHP settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php-configuration\">PHP Configuration<\/h3>\n\n\n\n<p>Edit the PHP configuration file (<code>php.ini<\/code>):<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-5\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/php\/7.4\/apache2\/php.ini<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-5\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/php.ini<\/code><\/pre>\n\n\n\n<p>Ensure the following settings are configured correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"properties\" class=\"language-properties\">memory_limit = 256M\npost_max_size = 50M\nupload_max_filesize = 50M\nmax_execution_time = 300<\/code><\/pre>\n\n\n\n<p>Save and exit the editor, then restart Apache to apply the changes:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-6\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-6\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart httpd<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-installing-zend-framework\">4. Installing Zend Framework<\/h2>\n\n\n\n<p>With Composer installed, you can now install Zend Framework. Zend Framework is now part of the Laminas Project, so you&#8217;ll install Laminas instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-laminas-via-composer\">Installing Laminas via Composer<\/h3>\n\n\n\n<p>First, navigate to the directory where you want to create your Zend Framework (Laminas) project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ cd \/var\/www\/html<\/code><\/pre>\n\n\n\n<p>Use Composer to create a new Laminas project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ composer create-project laminas\/laminas-mvc-skeleton my-zend-app<\/code><\/pre>\n\n\n\n<p>This command will download the Laminas MVC Skeleton application and install all the necessary dependencies. Once the installation is complete, you will have a basic Laminas application setup in the&nbsp;<code>my-zend-app<\/code>&nbsp;directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5-configuring-apache\">5. Configuring Apache<\/h2>\n\n\n\n<p>To serve your Laminas application using Apache, you need to configure a virtual host.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-a-virtual-host\">Creating a Virtual Host<\/h3>\n\n\n\n<p>Create a new Apache configuration file for your application:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-7\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/apache2\/sites-available\/my-zend-app.conf<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-7\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/httpd\/conf.d\/my-zend-app.conf<\/code><\/pre>\n\n\n\n<p>Add the following configuration to the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\"><strong>&lt;VirtualHost *:80&gt;<\/strong>\n    ServerAdmin webmaster@localhost\n    DocumentRoot \/var\/www\/html\/my-zend-app\/public\n    ServerName my-zend-app.local\n\n    <strong>&lt;Directory \/var\/www\/html\/my-zend-app\/public&gt;<\/strong>\n        Options Indexes FollowSymLinks\n        AllowOverride All\n        Require all granted\n    <strong>&lt;\/Directory&gt;<\/strong>\n\n    ErrorLog ${APACHE_LOG_DIR}\/my-zend-app_error.log\n    CustomLog ${APACHE_LOG_DIR}\/my-zend-app_access.log combined\n\n    <strong>&lt;IfModule mod_rewrite.c&gt;<\/strong>\n        RewriteEngine On\n        RewriteCond %{REQUEST_FILENAME} !-f\n        RewriteRule ^ index.php [QSA,L]\n    <strong>&lt;\/IfModule&gt;<\/strong>\n<strong>&lt;\/VirtualHost&gt;<\/strong><\/code><\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"enabling-the-virtual-host\">Enabling the Virtual Host<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-8\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo a2ensite my-zend-app\n$ sudo systemctl reload apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-8\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart httpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"modifying-the-hosts-file\">Modifying the Hosts File<\/h3>\n\n\n\n<p>To access your application via&nbsp;<code>my-zend-app.local<\/code>, you need to add an entry to your&nbsp;<code>\/etc\/hosts<\/code>&nbsp;file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/hosts<\/code><\/pre>\n\n\n\n<p>Add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"properties\" class=\"language-properties\">127.0.0.1   my-zend-app.local<\/code><\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-creating-a-new-zend-framework-project\">6. Creating a New Zend Framework Project<\/h2>\n\n\n\n<p>Now that your environment is set up and Apache is configured, you can start creating your Zend Framework project. The Laminas MVC Skeleton application comes with a basic setup that you can extend and customize.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-controllers\">Creating Controllers<\/h3>\n\n\n\n<p>Controllers are responsible for handling user input and returning responses. To create a new controller, use the Laminas CLI tool:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ cd \/var\/www\/html\/my-zend-app\n$ composer require laminas\/laminas-cli\n$ .\/vendor\/bin\/laminas mvc:controller MyController<\/code><\/pre>\n\n\n\n<p>This command creates a new controller named&nbsp;<code>MyController<\/code>. You can find it in the&nbsp;<code>module\/Application\/src\/Controller<\/code>&nbsp;directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-views\">Creating Views<\/h3>\n\n\n\n<p>Views are used to generate the output sent to the user&#8217;s browser. Create a new view script for your controller action by creating a new file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ nano module\/Application\/view\/application\/my\/index.phtml<\/code><\/pre>\n\n\n\n<p>Add the following content to this file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"markup\" class=\"language-markup\">&lt;h1&gt;Hello, Zend Framework!&lt;\/h1&gt;\n&lt;p&gt;Welcome to your first Laminas application.&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configuring-routes\">Configuring Routes<\/h3>\n\n\n\n<p>Routes define the URLs that your application can respond to. Open the&nbsp;<code>module\/Application\/config\/module.config.php<\/code>&nbsp;file and add a new route for your controller:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">'router' =&gt; [\n    'routes' =&gt; [\n        'my' =&gt; [\n            'type'    =&gt; Segment::class,\n            'options' =&gt; [\n                'route'    =&gt; '\/my[\/:action]',\n                'defaults' =&gt; [\n                    'controller' =&gt; Controller\\MyController::class,\n                    'action'     =&gt; 'index',\n                ],\n            ],\n        ],\n    ],\n],<\/code><\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7-running-your-first-zend-framework-application\">7. Running Your First Zend Framework Application<\/h2>\n\n\n\n<p>Now that you have created a controller, a view, and configured a route, you can run your application and verify that everything is working correctly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"starting-apache\">Starting Apache<\/h3>\n\n\n\n<p>Ensure that Apache is running:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-9\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-9\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl start httpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-your-application\">Accessing Your Application<\/h3>\n\n\n\n<p>Open your web browser and navigate to&nbsp;<code>http:\/\/my-zend-app.local\/my\/index<\/code>. You should see the welcome message you added in your view.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8-common-issues-and-troubleshooting\">8. Common Issues and Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"database-connection-issues\">Database Connection Issues<\/h3>\n\n\n\n<p>If your application requires a database connection and you are experiencing issues, verify your database connection settings in the configuration file. Ensure that the username, password, and database name are correct.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"controller-or-view-errors\">Controller or View Errors<\/h3>\n\n\n\n<p>If you are encountering errors with your controller or view, check the Apache error log for more details. You can find the error logs at:<\/p>\n\n\n\n<ul>\n<li>Ubuntu\/Debian:&nbsp;<code>\/var\/log\/apache2\/error.log<\/code><\/li>\n\n\n\n<li>CentOS\/Fedora:&nbsp;<code>\/var\/log\/httpd\/error_log<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"dependency-loading-issues\">Dependency Loading Issues<\/h3>\n\n\n\n<p>If you face issues with loading dependencies using Composer, ensure that you have an active internet connection and that Composer is correctly set up. You can try updating your dependencies with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ composer update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"permission-issues\">Permission Issues<\/h3>\n\n\n\n<p>If you encounter permission issues when accessing your application files or directories, ensure that the Apache user has the necessary permissions. For most distributions, the Apache user is&nbsp;<code>www-data<\/code>&nbsp;on Ubuntu\/Debian and&nbsp;<code>apache<\/code>&nbsp;on CentOS\/Fedora. You can adjust the permissions with the following commands:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-ubuntudebian-10\">On Ubuntu\/Debian<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo chown -R www-data:www-data \/var\/www\/html\/my-zend-app\n$ sudo chmod -R 755 \/var\/www\/html\/my-zend-app<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"on-centosfedora-10\">On CentOS\/Fedora<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo chown -R apache:apache \/var\/www\/html\/my-zend-app\n$ sudo chmod -R 755 \/var\/www\/html\/my-zend-app<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"9-additional-resources\">9. Additional Resources<\/h2>\n\n\n\n<p>If you need more information or assistance with using Zend Framework (Laminas), you can refer to the following resources:<\/p>\n\n\n\n<ul>\n<li><a href=\"https:\/\/getlaminas.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Official Laminas Website<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.laminas.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Laminas Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/discourse.laminas.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Laminas Discourse Forums<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/laminas\" target=\"_blank\" rel=\"noreferrer noopener\">Laminas GitHub Repository<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>This comprehensive guide should provide you with a solid foundation for installing and configuring Zend Framework (Laminas) on a Linux system. By following these steps, you should be able to set up a working environment, create your first Laminas application, and address common issues that may arise.<\/p>\n\n\n\n<p>Remember, developing with a robust framework like Zend Framework requires practice and continuous learning. Explore the extensive documentation and community resources available to deepen your understanding and enhance your skills. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Zend Framework \/ Laminas\u00a0is a popular open-source PHP framework designed to make building robust, high-performance web applications simpler and more efficient. With its modular architecture and use of object-oriented programming principles, Zend Framework provides developers with the tools they need to create scalable, secure, and high-quality applications. In this comprehensive guide, we will cover ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[188],"tags":[],"yoast_head":"\n<title>How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-23T16:41:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-23T16:41:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"How to Install Zend Framework \/ Laminas\u00a0on Linux\",\"datePublished\":\"2024-05-23T16:41:44+00:00\",\"dateModified\":\"2024-05-23T16:41:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\"},\"wordCount\":1121,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"CMS &amp; Web development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\",\"name\":\"How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2024-05-23T16:41:44+00:00\",\"dateModified\":\"2024-05-23T16:41:46+00:00\",\"description\":\"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Zend Framework \/ Laminas\u00a0on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations","description":"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations","og_description":"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.","og_url":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2024-05-23T16:41:44+00:00","article_modified_time":"2024-05-23T16:41:46+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/05\/zend_installation_en.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"How to Install Zend Framework \/ Laminas\u00a0on Linux","datePublished":"2024-05-23T16:41:44+00:00","dateModified":"2024-05-23T16:41:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/"},"wordCount":1121,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["CMS &amp; Web development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/","url":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/","name":"How to Install Zend Framework \/ Laminas\u00a0on Linux - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2024-05-23T16:41:44+00:00","dateModified":"2024-05-23T16:41:46+00:00","description":"Comprehensive step-by-step guide on installing the Zend Framework PHP framework on Linux, including setting up required software like Apache, MySQL, and Composer, configuring virtual hosts, creating your first Zend application, and troubleshooting common issues.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/install-laminas-zend-framework-linux-ubuntu-debian-centos-redhat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"How to Install Zend Framework \/ Laminas\u00a0on Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/8709"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=8709"}],"version-history":[{"count":6,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/8709\/revisions"}],"predecessor-version":[{"id":8730,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/8709\/revisions\/8730"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=8709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=8709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=8709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}