phpmyfaq on CentOS 5.5
Recently I ran into the need to create a Knowledgebase on my local network, basically a Faq that I could post how I have resolved issues with different hardware and software issues with my company. With a search on Google I came across phpmyfaq that runs on PHP with MySQL. The current version will not run on CentOS due to the requirement of PHP 5.2.x or higher which is not available in the stable repositories for the current CentOS release. However I was able to find 2.0.17 supports PHP 5.1.x series which is available.
Download 2.0.17 tar.gz file from phpmyfaq 2.0.17 tar to your server.
$ sudo su -
# tar zxvf phpmyfaq*.tar.gz -C /var/www/html/
# cd /var/www/html
# mv phpmyfaq-2.0.17/ faq/
# cd faq/
Create some sub-directories needed by the application.
# mkdir directory attachments
# mkdir directory data
# mkdir images/Image
# mkdir pdf
# mkdir xml
Set a few directory permissions for the installer to create the files it needs.
# chmod -R 755 attachments/
# chmod -R 755 data/
# chmod -R 755 pdf/
# chmod -R 755 xml/
# chmod -R 777 inc/
# chmod -R 777 images/
Exit as root and revertback to your user id. Create blank MySQL database and faq user and grant access For this example we are creating a user called faq with the password pHpmyf8q and a database called phpmyfaq and granting the faq user all rights to the database.
$ mysql -u root -p
mysql> CREATE DATABASE `phpmyfaq` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER 'faq'@'localhost' IDENTIFIED BY 'pHpmyf8q';
mysql> CREATE USER 'faq'@'%' IDENTIFIED BY 'pHpmyf8q';
mysql> GRANT ALL ON `phpmyfaq` . * TO 'faq'@'localhost';
mysql> GRANT ALL ON `phpmyfaq` . * TO 'faq'@'%';
mysql> exit
Now we are ready to open the installer web page and set the database settings and admin user account to finish the installation. Open a web browser and type http://<your_server_name>/faq/install/installer.php.
You will be presented with a page asking for database type and connection information as well as admin user and id. Using the information from this example
SQL Server: MySQL 4.x/5.x/6.x (PHP 4/PHP 5)
SQL server host: localhost
SQL username: faq
SQL password: <super secret pasword>
SQL database: phpmyfaq
Table prefix: knowledgebase (if you plan to have more than one Faq you need to put a value here, otherwise leave it blank)
Fill in the information in the phpMyFAQ information and click on Install phpMFAQ 2.0.17 now! and you are done.
phpMyFAQ is now running and is just in need of a few users with rights to post. Access the admin page at http://<your_server_name>/faq/admin/index.php and supply the credentials you setup. Once you are in, you can add users. To access the faq http://<your_server_name>/faq/.