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

Written by Rahul, Updated on January 19, 2016
PHP Framework Nette, php framework

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

Share it!
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
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..

Related Posts

  • How to Install CodeIgniter on Ubuntu 18.04 (Bionic)

    November 18, 2018
  • How to Install CakePHP 3.8 on Fedora 30/29/28

    October 14, 2018
  • How To Install Laravel 5 on Debian 9 (Stretch)

    September 8, 2018
  • How To Install Symfony 2 Framework on CentOS / RHEL / Fedora

    January 26, 2016
  • How To Install Symfony 3 Framework on CentOS / RHEL / Fedora

    January 26, 2016

Leave a Reply

Cancel reply

Popular Posts

  • How to Install Python 3.8 on Ubuntu, Debian and LinuxMint
  • How to Restart Network Service on CentOS 8 or RHEL 8
  • How to Check IP Address on CentOS 8
  • How to Install Java 11/8 on Amazon Linux
  • How to Configure Static IP on CentOS 8 (CLI)
Copyright © 2013-2019 TecAdmin.net. All Rights Reserved. This site uses cookies. By using this website you agree with our term and services
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkNo
Revoke cookies