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 Nette PHP Framework on CentOS / RHEL / Fedora

    How To Install Nette PHP Framework on CentOS / RHEL / Fedora

    RahulBy RahulJanuary 19, 20163 Mins Read

    Nette is a PHP Framework getting popularity world-wide. As per SitePoint’s survey Nette is 3’rd most popular PHP framework used for web development. This tutorial will help you to install Nette PHP Framework on CentOS, Red Hat & Fedora operating systems.

    Step 1: Setup Yum Repositories

    First you need to add REMI and EPEL rpm repositories in your system. these repositories have updated packages. Use one of the below command as per your OS version and system architecture.

    CentOS/RHEL 7, 64 Bit System: 
    # rpm -Uvh http://free.nchc.org.tw/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
    
    
    CentOS/RHEL 6, 32 Bit System: 
    # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    
    
    CentOS/RHEL 6, 64 Bit System: 
    # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    
    
    CentOS/RHEL 5, 32 Bit System: 
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
    
    
    CentOS/RHEL 5, 64 Bit System: 
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-releas5-4.noarch.rpm
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
    

    Step 2: Install Apache, MySQL and PHP

    To start with Nette configuration, we first need to setup a running LAMP server. If you have already running LAMP stack skip this step else use followings commands to setup lamp stack.

    Install Apache

    # yum --enablerepo=remi,epel install httpd
    

    Install MySQL

    # yum --enablerepo=remi,epel install mysql-server
    # service mysqld start
    # /usr/bin/mysql_secure_installation
    

    Install PHP

    # yum --enablerepo=remi,epel install php php-mysql php-mcrypt
    # service httpd restart
    

    Step 3: Install or Update Composer

    Composer is required for installing Nette framework. So use below commands to download and use as a command in our system.

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

    If you already have composer installed on your system. Use following command to update it to latest version.

    # composer self-update
    

    Step 4 – Create Nette Application

    Let’s navigate to web document root and use composer to create a new nette application using following commands. It will automatically download latest copy of Nette framework on your system under mypp directory.

    # cd /var/www/html
    # composer create-project nette/sandbox myapp
    

    After successfully downloading all packages, assign proper permissions on file and folders in your application.

    # chown -R apache.apache myapp
    # chmod -R 755 myapp
    # chmod -R 777 myapp/tmp myapp/log
    

    Step 5 – Access Nette Application

    At this stage you have successfully configured Nette framework on your system.

     http://localhost/myapp/www/
    

    Install Nette PHP Framework

    Step 6 – Create Apache VirtualHost

    Now add a Virtual Host in your Apache configuration file to access Nette PHP framework from web browser. To do it edit Apache configuration file /etc/httpd/conf/httpd.conf and add below code at end of file

    # vim /etc/httpd/conf/httpd.conf
    
    <VirtualHost *:80>
           ServerName nette.example.com
           DocumentRoot /var/www/html/nette/www
    
           <Directory /var/www/html/nette/>
                  AllowOverride All
           </Directory>
    </VirtualHost>
    

    Restart Apache service and access Nette framework using your favourite web browser and start developing a great web application.

     # service httpd restart
    
    Nette php framework
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleDownload YouTube Videos in Linux Command Line
    Next Article How To Install Symfony 3 Framework on Ubuntu, Debian & LinuxMint

    Related Posts

    How To Set Up Laravel on Ubuntu 21.04 & 20.10

    Updated:July 15, 20214 Mins Read

    How to Enable Debug Mode in Laravel

    Updated:May 28, 20211 Min Read

    How to Remove Package from Laravel (Composer)

    Updated:July 15, 20211 Min Read

    How to Install Laravel 9 on CentOS 8

    Updated:February 16, 20224 Mins Read

    How to Install CodeIgniter on Ubuntu 20.04

    Updated:August 11, 20214 Mins Read

    How to Install Laravel on Ubuntu 20.04

    Updated:June 7, 20214 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    • How to Install Composer 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.