• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Codeigniter in Ubuntu

{{postValue.id}}

To install CodeIgniter in Ubuntu 16.04

CodeIgniter is a powerful PHP framework built for developers who requires a simple and elegant toolkit for creating web applications. Installation of Codeigniter in Ubuntu is explained in this article.

Features

  • Light Weight, Model-View-Controller Based System.
  • Active Record Database Support.
  • Form/Data Validation, Session Management.
  • Supports Email Sending Class, Image Manipulation Library, File Uploading Class etc.,
  • Maintains Error Logging.
  • Larger help supports and flexible URI Routing.

Download the codeigniter using following link,
https://github.com/bcit-ci/CodeIgniter/archive/3.0.6.zip

Run the following command to install CodeIgniter.

root@linuxhelp:~# wget https://github.com/bcit-ci/CodeIgniter/archive/3.0.6.zip
--2016-07-08 16:48:01--  https://github.com/bcit-ci/CodeIgniter/archive/3.0.6.zip
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.6 [following]
--2016-07-08 16:48:02--  https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.6
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2564043 (2.4M) [application/zip]
Saving to: ‘ 3.0.6.zip’ 

3.0.6.zip              100%[==========================> ]   2.44M  41.0KB/s    in 56s     

2016-07-08 16:48:59 (44.9 KB/s) - ‘ 3.0.6.zip’  saved [2564043/2564043]

Unzip the downloaded file.

root@linuxhelp:~# unzip 3.0.6.zip
Archive:  3.0.6.zip
8082544c5b4b33175790f505587e202e3ca9e488
   creating: CodeIgniter-3.0.6/
  inflating: CodeIgniter-3.0.6/.gitignore  
   creating: CodeIgniter-3.0.6/application/
  inflating: CodeIgniter-3.0.6/application/.htaccess  
   creating: CodeIgniter-3.0.6/application/cache/
.
.
.
.
   creating: CodeIgniter-3.0.6/user_guide/tutorial/
  inflating: CodeIgniter-3.0.6/user_guide/tutorial/conclusion.html  
  inflating: CodeIgniter-3.0.6/user_guide/tutorial/create_news_items.html  
  inflating: CodeIgniter-3.0.6/user_guide/tutorial/index.html  
  inflating: CodeIgniter-3.0.6/user_guide/tutorial/news_section.html  
  inflating: CodeIgniter-3.0.6/user_guide/tutorial/static_pages.html  

check the files using “ ls” command.

root@linuxhelp:~# ls
3.0.6.zip  CodeIgniter-3.0.6

Rename the extracted directory

root@linuxhelp:~# mv CodeIgniter-3.0.6 codeigniter
root@linuxhelp:~# ls
3.0.6.zip  codeigniter

Copy the unzipped file to “ /var/www/html/” directory.

root@linuxhelp:~# cp -R codeigniter /var/www/html/codeigniter

Then restart the apache2 service by using following command.

root@linuxhelp:~# service apache2 restart
root@linuxhelp:~# service apache2 status
 apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2  bad  vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           ??apache2-systemd.conf
   Active: active (running) since Fri 2016-07-08 16:53:07 IST  8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3593 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 3619 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
    Tasks: 6 (limit: 512)
   CGroup: /system.slice/apache2.service
           ??3636 /usr/sbin/apache2 -k start
           ??3639 /usr/sbin/apache2 -k start
           ??3640 /usr/sbin/apache2 -k start
           ??3641 /usr/sbin/apache2 -k start
           ??3642 /usr/sbin/apache2 -k start
           ??3643 /usr/sbin/apache2 -k start

Jul 08 16:53:06 linuxhelp systemd[1]: Starting LSB: Apache2 web server...
Jul 08 16:53:06 linuxhelp apache2[3619]:  * Starting Apache httpd web server apache2
Jul 08 16:53:07 linuxhelp apache2[3619]:  *
Jul 08 16:53:07 linuxhelp systemd[1]: Started LSB: Apache2 web server.

Open browser and type http://< local_host> /codeigniter or http://< IP_address> /codeigniter
install-CodeIgniter-PHP-framework-creating-web-applications-Ubuntu16.04-open-browser

Tags:
benjamin
Author: 

Comments ( 3 )

patrickmole
I have an error cp: cannot create directory '/var/www/html/codeigniter': Permission denied
samsonkasambala
I have followed all the steps but am getting an error when trying to start CI. Below is the part of the error which i am getting. =')) { error_reporting(E_ALL
ravijatav
thanks
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is Codeigniter?

A

CodeIgniter is a powerful PHP framework built for developers who require a simple and elegant toolkit for creating web applications.

Q

What is a controller in the CodeIgniter framework?

A

1.controller is a class that helps delegate work.
2. It works as a glue for a web application. It takes incoming HTTP requests and processes them.

Q

Why is there a need to configure the URL routes?

A

Follow this instruction:
1. From SEO point of view, to make URL SEO friendly and get more user visits
2.Hide some URL element such as a function name, controller name, etc. from the users for security reasons
3.Provide different functionality to particular parts of a system

Q

how you can extend the class in Codeigniter?

A

To extend the native input class in CodeIgniter, you have to build a file named application/core/MY_Input.php and declare your class with
Class MY_Input extends CI_Input {
}

Q

How you can enable CSRF (Cross Site Request Forgery) in CodeIgniter?

A

You can activate CSRF (Cross Site Request Forgery) protection in CodeIgniter by operating your application/config/config.php file and setting it to
$config [ ‘csrf_protection’] = TRUE;

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.