Installing Mediawiki using SQLite Database in GNU/Debian
NOTE: These article commands have been tested in GNU/Debian Sid. They should also work in Ubuntu flavours.
First we need to install php, apache and SQLite if they are not installed. This command will do the trick:
#apt-get install php5-sqlite
Following mediawiki recommendation we add some extensions to php for SQLite to work:
Edit /etc/php5/apache2/php.ini
Add these two lines in that file:
extension=php_pdo_sqlite.so extension=php_pdo.so
To solve servername warning when launching apache daemon:
#echo "ServerName localhost" >> /etc/apache2/httpd.conf
We start apache web server:
#apache2ctl start
DOWNLOAD MEDIAWIKI SOURCE CODE
#cd /var/www
We get latest mediawiki source code tarball (current one when writting this article is 1.15.1):
#wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz
Uncompress it:
#tar xvfz mediawiki-1.15.1.tar.gz
#cd mediawiki-1.15.1
#ln -s mediawiki-1.15.1 mediawiki
We set writting permissions to config directory so we will be able to configure our wiki:
#chmod a+w config
CONFIGURING THE WIKI
We open a web browser: http://localhost/mediawiki/
We observe that: It detects correctly SQLite drivers!!
Some clues about configuring first time the wiki are pointed in this article:
http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html
NOTE: SQLite is userless, and therefore requesting to fill usernames and passwords for it is pointless in configure page.
However it is needed to write something in those fields to continue the configuring process.
NOTE: SQLite Data directory field is needed to store SQlite database. Remember to give to it writting permissions!!
If everything goes fine you will get: Success!!
CONFIGURING LocalSettings.php FILE
Edit LocalSettings.php following http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html instructions.
Now we set adequate permissions to this file:
#cd var/www/mediawiki
#mv config/LocalSettings.php .
# mv LocalSettings.php to parent directory.#chown root:www-data LocalSettings.php
#chmod 0640 LocalSettings.php
NOTE: When finished your configuration you should delete config directory to prevent the wiki being configured again.
CREATING A NORMAL USER
In the web browser: http://localhost/mediawiki
You will need to login as WikiSysop user.
Navigate to: SpecialPages --> Login in / create account --> Then create a new normal user account.
BACKING AND RESTORING THE SQLITE BASED MEDIAWIKI
SQLite has no users so we will not need a administrator user. Nevertheless we will set root permissions to prevent other users to access AdminSettings.php file:
Creating AdminSettings.php file
#cd /var/www/mediawiki
#cp AdminSettings.sample AdminSettings.php
#chown root:root AdminSettings.php
#chmod 600 AdminSettings.php
We will need php console cli command:
#aptitude install php5-cli # php command.
BACKING UP THE WIKI
Create the xml backup file:
#cd /var/www/mediawiki/maintenance
#php dumpBackup.php --current > ~/backup.xml
RESTORING THE WIKI
#cd /var/www/mediawiki/maintenance
#php importDump.php ~/backup.xml
REFERENCE:
href="http://www.mediawiki.org/wiki/Manual:SQLite
YOU MAY ALSO BE INTERESTED IN:
Installing and Configuring Mediawiki on a Ubuntu Gutsy Desktop System
Backing and Restoring Mediawiki in Ubuntu
0 comentarios:
Post a Comment