• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Setup Nette PHP Framework on Ubuntu & LinuxMint

Written by Rahul, Updated on January 18, 2016

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

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy