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.
- Install php
yum install httpd httpd-devel
- check sqlite version
yum info sqlite
- Install compiler to compile the sqlite3 driver
yum install gcc
- Update the php-devel
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum –enablerepo=webtatic update php-devel
- Download and extract difference php version
tar zxvf php-5.3.6.tar.gz
- Go to sqlite3 folder in newly downloaded php folder and copy/rename config file.
cp config0.m4 config.m4
We will get sqlite3.so. We need to point that driver in php. So we create the file “/etc/php.d/sqlite3.ini” which has
- Finally, we restart the apache.
You can able to connect to sqlite database now. :)