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 Setup Nette PHP Framework on Ubuntu & LinuxMint

    How To Setup Nette PHP Framework on Ubuntu & LinuxMint

    RahulBy RahulJanuary 18, 20162 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 setup Nette PHP Framework on Ubuntu, Debian & LinuxMint operating systems.

    Step 1 – Install LAMP

    First start with the installation of LAMP server on your system. If you have already running LAMP stack skip this step else use followings commands to set up lamp on Ubuntu system.

    Install PHP 5.5

    $ sudo apt-get install python-software-properties
    $ sudo add-apt-repository ppa:ondrej/php5
    $ sudo apt-get update
    $ sudo apt-get install -y php5 php5-mcrypt php5-gd
    

    Install Apache2

    $ apt-get install apache2 libapache2-mod-php5
    

    Install MySQL

    $ apt-get install mysql-server php5-mysql
    

    Step 2 – 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
    $ sudo mv composer.phar /usr/local/bin/composer
    $ sudo 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 3 – 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/
    $ sudo composer create-project nette/sandbox myapp
    

    After successfully downloading all packages, setup proper permissions on application.

    $ chown -R www-data.www-data myapp
    $ chmod -R 755 myapp
    $ chmod -R 777 myapp/tmp myapp/log
    

    Step 4 – Access Nette Application

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

     http://localhost/myapp/www/
    

    Install Nette PHP Framework

    Step 5 – Create Apache VirtualHost

    Now If you need to configure Nette with subdomain. Create a VirtualHost in your Apache configuration file. Create Apache configuration file under /etc/apache2/sites-available/

    $ vim /etc/apache2/sites-available/nette.example.com.conf
    

    directory and add below content.

    <VirtualHost *:80>
    
            ServerName nette.example.com
            DocumentRoot /var/www/myapp/wwww
    
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/myapp>
                    AllowOverride All
            </Directory>
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
            LogLevel warn
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
    

    Finally enable website and reload Apache service using below command.

    $ a2ensite nette.example.com
    $ sudo service apache2 reload
    
    Nette PHP php framework
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install AWStats (Apache Log Analyzer) on Ubuntu, Debian & LinuxMint
    Next Article Download YouTube Videos in Linux Command Line

    Related Posts

    How to Install Composer on Ubuntu 22.04

    Updated:June 24, 20223 Mins Read

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

    Updated:June 19, 20223 Mins Read

    How to Install Apache, MySQL, PHP (LAMP Stack) on Ubuntu 22.04

    Updated:June 28, 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

    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.