PhpBB/Installation

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
(Configure Apache2)
Line 93: Line 93:
 
And for good measure, restart apache2
 
And for good measure, restart apache2
 
  ~$ sudo service apache2 restart
 
  ~$ sudo service apache2 restart
 +
  * Restarting web server apache2
 +
    ...done.
 +
 +
==Enable site and test connectivity==
 +
Moment of truth, enable the site
 +
~$sudo a2ensite yoursite.com.conf
 +
Required restart of apache2
 +
~$sudo service apache2 restart
 
   * Restarting web server apache2
 
   * Restarting web server apache2
 
     ...done.
 
     ...done.

Revision as of 06:26, 28 September 2014

Installation done on a VM running Ubuntu 14.04LTS

Contents

Download required pacakages

~$ sudo apt-get update && sudo apt-get -y install apache2 mysql-server mysql-client php5 php5-mysql php5-gd imagemagick

If you're going to install MediaWiki aswell, then add an extra pacakge

~$ sudo apt-get install -y  libapache2-mod-php5

Configure MySQL

login to db

~$ mysql -u root -p

Create mysql wiki user

~$ mysql> CREATE USER 'phpBB'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED';
~$ mysql> exit

login as new user to verify account works

~$ mysql -u phpBB -p
~$ mysql> exit

create DB

~$ mysql -u root -p
~$ mysql> CREATE DATABASE phpBB;

verify DB creation

~$ mysql> SHOW DATABASES;

assign rights to wiki user for new database created

~$ mysql> GRANT ALL PRIVILEGES ON phpBB.* TO 'phpBB'@'localhost' IDENTIFIED BY 'phpuserpassword' WITH GRANT OPTION;
~$ mysql> exit

verify permissions have been granted

~$ mysql -u phpBB -p
~$ mysql> SHOW GRANTS;
+--------------------------------------------------------------------------------------------------------------+
| Grants for phpBB@localhost                                                                                   |
+--------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'phpBB'@'localhost' IDENTIFIED BY PASSWORD '*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' |
| GRANT ALL PRIVILEGES ON `phpBB`.* TO 'phpBB'@'localhost' WITH GRANT OPTION                                   |
+--------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

Download phpBB

download the latest version (at the time of this writing was 3.0.12)

~$ wget https://www.phpbb.com/files/release/phpBB-3.0.12.zip
--2014-09-28 04:51:36--  https://www.phpbb.com/files/release/phpBB-3.0.12.zip
Resolving www.phpbb.com (www.phpbb.com)... 140.211.15.9
Connecting to www.phpbb.com (www.phpbb.com)|140.211.15.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2487985 (2.4M) [application/zip]
Saving to: ‘phpBB-3.0.12.zip’

100%[=====================================================================================================================>] 2,487,985    1.11MB/s   in 2.1s   

2014-09-28 04:51:38 (1.11 MB/s) - ‘phpBB-3.0.12.zip’ saved [2487985/2487985]

verify the md5. this is available on the downloads page, in this case it was MD5: e86ffc334ea53d934c0c1c0588429803

~$ md5sum phpBB-3.0.12.zip
e86ffc334ea53d934c0c1c0588429803  phpBB-3.0.12.zip

create your site's directory where phpBB will live. If you're using a subsite design, like the example below, make sure to create the directories in the same path structure.

~$ mkdir /var/www/yoursite.com/forums

make sure your apache user has appropriate permissions to write to this directory

~$ chown www-data:www-data ./forums

unzip the phpBB zip to the new directory you created

~$ unzip phpBB-3.0.12.zip -d /var/www/yoursite.com/forums

this will unfortunately create a directory called phpBB3 underneath, which is not desired. we'll have to move the contents of phpBB3 into the forums directory. You may need to modify permissions of the forums directory for this to work, so i've included that step in my instructions.

~$ ls -la
total 12
drwxr-xr-x  3 www-data www-data 4096 Sep 28 05:03 .
drwxr-xr-x  4 root     root     4096 Sep 28 04:59 ..
drwxr-xr-x 13 www-data www-data 4096 Sep 28 05:15 forums
~$ chmod 777 ./forums/
~$ cp -r /var/www/yoursite.com/forums/phpBB3/ /var/www/yoursite.com/forums/
~$ rm -rf /var/www/yoursite.com/forums/phpBB3/
~/forums$ ls
adm    common.php  cron.php  download  feed.php  images    index.php  language  memberlist.php  report.php  store      styles   viewforum.php   viewtopic.php
cache  config.php  docs      faq.php   files     includes  install    mcp.php   posting.php     search.php  style.php  ucp.php  viewonline.php  web.config
~$ chmod 755 ./forums/

Configure Apache2

Since we're going with a subsite configuration, the virutalhost file is going to be simple and only point to the site's root directory

~$ sudo vi /etc/apache2/sites-available/yoursite.com.conf
add:
<VirtualHost *:80>
        ServerName yoursite.com
        ServerAdmin [email protected]
        DocumentRoot /var/www/yoursite.com
        TransferLog /var/log/apache2/yoursite.com-access_log
        ErrorLog /var/log/apache2/yoursite.com-error_log
</VirtualHost>

Set File/Folder Permissions

There are a few specific folders and files will need to be opened so users can upload data to them, such as images/avatars

/var/www/yoursite.com/config.php
/var/www/yoursite.com/store
/var/www/yoursite.com/cache
/var/www/yoursite.com/files
/var/www/yoursite.com/images/avatars/upload/
~/forums$ sudo chmod 766 config.php cache files store images/avatars/upload/

And for good measure, restart apache2

~$ sudo service apache2 restart
 * Restarting web server apache2
   ...done.

Enable site and test connectivity

Moment of truth, enable the site

~$sudo a2ensite yoursite.com.conf

Required restart of apache2

~$sudo service apache2 restart
 * Restarting web server apache2
   ...done.
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox