Install SQLite3 in CentOS

Just to make sure that I remember what I did when SQLite3 driver was missing when I installed [or upgraded] php on the CentOS server.

  1. Install php

    yum install httpd httpd-devel

  2. check sqlite version

    yum info sqlite

  3. Install compiler to compile the sqlite3 driver

    yum install gcc

  4. Update the php-devel

    rpm -Uvh
    yum –enablerepo=webtatic update php-devel

  5. Download and extract difference php version

    tar zxvf php-5.3.6.tar.gz

  6. Go to sqlite3 folder in newly downloaded php folder and copy/rename config file.

    cd php-5.3.6/ext/sqlite3/
    cp config0.m4 config.m4

  7. then compile

    make install


  8. We will get We need to point that driver in php. So we create the file “/etc/php.d/sqlite3.ini” which has

  9. Finally, we restart the apache.

    /etc/init.d/httpd restart

    You can able to connect to sqlite database now. :)

ref: stackoverflow and

Quick ‘n’ Easy LAMP Server For CentOS/RHEL

Also read...


Leave a Reply