How to Install PunBB on CentOS 7

To Install PunBB on CentOS 7

PunBB is an open source, lightweight forum software written in PHP with simple layout and clean design. In general, it is faster than other forum software and it is very easy to administrate and moderate. The default theme of PunBB supports responsive design, so it is mobile and tablet friendly. It is really simple to install PunBB and this article demonstrates the method to install PunBB on CentOS 7.

Pre-requirement
Install LAMP (httpd, mariadb-server, php )
In mariadb (create database, user and give privileges to user)

For php
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

php module (yum -y install php70w php70w-gd php70w-imap php70w-ldap php70w-odbc php70w-pear php70w-xml php70w-xmlrpc php70w-mbstring php70w-mcrypt php70w-mysql php70w-snmp php70w-soap php70w-tidy curl curl-devel)

Installing PunBB

Before you begin the process, make sure you get into your Apache document root location by making use of the following command.

[root@linuxhelp1 ~]# cd /var/www/html/

If you want to download the installation package for PunBB, make sure you get the latest and stable version. So, make sure you use the wget command along with its download link in the following manner. You should download the package in HTML location.

[root@linuxhelp1 html]# wget https://codeload.github.com/punbb/punbb/zip/master
--2017-12-01 04:54:15--  https://codeload.github.com/punbb/punbb/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.255.121, 192.30.255.120
Connecting to codeload.github.com (codeload.github.com)|192.30.255.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘ master’ 

    [      < =>                               ] 4,63,252     303KB/s   in 1.5s  

2017-12-01 04:54:18 (303 KB/s) - ‘ master’  saved [463252]

Once the file is downloaded, you need to extract the downloaded file as follows.

[root@linuxhelp1 html]# unzip master
Archive:  master
b20a80ae87ec5285df5d0e0de1bb64e5923e603f
   creating: punbb-master/
  inflating: punbb-master/.htaccess.dist 
  inflating: punbb-master/COPYING   
  inflating: punbb-master/ChangeLog 
  inflating: punbb-master/README    
  inflating: punbb-master/README.md  .
.
.
inflating: punbb-master/userlist.php 
  inflating: punbb-master/viewforum.php 
  inflating: punbb-master/viewtopic.php 

Later, you need to rename the extracted directory by running the following command.

[root@linuxhelp1 html]# mv punbb-master punbb

And then, you are required to change the ownership of extracted directory by making use of the chown command in the following manner.

[root@linuxhelp1 html]# chown -R apache.apache punbb

Later, you need to create a VirtualHost for PunBB. Run the following command for the same reason.

[root@linuxhelp1 html]# vim /etc/httpd/conf.d/punbb.conf

In that file, you need to make the following modifications.

< VirtualHost *:80> 
ServerAdmin admin@linuxhelp11.com
DocumentRoot /var/www/html/punbb/
ServerName linuxhelp11.com
ServerAlias www.linuxhelp11.com
< Directory /var/www/html/punbb/> 
Options FollowSymLinks
AllowOverride All
< /Directory> 
ErrorLog /var/log/httpd/linuxhelp11.com-error_log
CustomLog /var/log/httpd/linuxhelp11.com-access_log common
< /VirtualHost> 

Once the configuration is done, you need to make an entry in hosts file. So, open the host file by running the following command.

[root@linuxhelp1 html]# vim /etc/hosts

And in that file, you need to add the following line.

< ipaddr>    domainname

Once it is all done, you need to restart the httpd service by making use of the following command.

[root@linuxhelp1 html]# systemctl restart httpd.service                                            [  OK  ]

Now, let us continue the process from the browser. Open your browser and give http://yourdomain as URL. The installer of PunBB appears on your screen. Click the install option.

In the next page, you need to fill the database and admin details and then click on the Start Install option.

The installation is now complete. Download config.php file.

Save the file.

Now, go to the downloaded location and copy the config file to the PunBB directory.

After moving the config file to the PunBB directory, you need to open a terminal and change permission on punbb directory as follows.

[root@linuxhelp1 html]# chmod -R 777 punbb/

And then, restart the Apache service by running the following command.

[root@linuxhelp1 html]# systemctl restart httpd.service

Now, go back to your browser and click to go to the forum index to complete the procedure and view your Forum space.

The forum index page that appears resembles the one displayed on the following image. Click on the Login option.

In the following page, enter your login credentials and click Login.

You are now logged in as an admin.

With this, the installation of PunBB comes to an end.

Tag : CentOS
FAQ
Q
How do I grant a user moderator access to a certain forum?
A
The first step is to move the user used to the moderator's group. This can be done in the user's profile under "Administration".
Q
How to Install PunBB on CentOS 7?
A
Execute the following command:
# wget https://codeload.github.com/punbb/punbb/zip/master
Q
Where is the root location in PunBB on CentOS 7?
A
make sure you get into your Apache document root location by making use of the following command:
# cd /var/www/html/
Q
Can support punBB for BBCode and how do I use it?
A
Yes, PunBB supports BBCode. It supports a subset of the tags that are present in many other bulletin boards. The tags supported by PunBB are bold, underline, italic, color, URL, email, img, quote and code. Usage instructions can be found in the script help.php. Links to this script can be found next to text areas that allow BBCode (e.g. when posting a message).
Q
What is punBB on CentOS?
A
PunBB is an open source, lightweight forum software written in PHP with a simple layout and clean design. In general, it is faster than other forum software and it is very easy to administrate and moderate. The default theme of PunBB supports responsive design, so it is mobile and tablet friendly.