Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2008, 12:48 PM
g1vrg g1vrg is offline
Junior Member
 
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installing a php bbs on pcbsd 1.5.1
Installing a php bbs (forum) system on pcbsd 1.5.1

This guide is in two parts.
1. - Installing prerequisites - (apache, php & mysql)
2. - Installing the bbs
************************************************** ***
************************************************** ***

Part 1.

Install apache:

Do --> cd /usr/local/ports/www/apache13
Do --> make install clean
Edit: /etc/rc.conf AND ADD: apache_enable="YES"

If you want more than one website (IE one with a forum and one without
for example) then enable virtual servers by adding the following (edit)
to /usr/local/etc/apache/httpd.conf

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.website1.com
DocumentRoot /usr/local/www/data/website1.com
ServerAdmin your-email-address-here
ErrorLog /var/log/website1-error_log
</VirtualHost>

<VirtualHost *:80>
ServerName www.website2.com
DocumentRoot /usr/local/www/data/website2.com
ServerAdmin your-email-address-here
ErrorLog /var/log/website2-error_log
</VirtualHost>

Repeat for third/fourth website whatever.

If you do not require virtual servers (IE you will only be using one
website/domain name) then you only need the following edit:

/ ServerAdmin
give your mail address
/ ServerName
give your server's name (must be FQDN)

Make sure you have the following lines uncommented also:

AddType application/x-httpd-php .php <---may already be there
AddType application/x-httpd-php-source .phps <---may already be there

You should check that apache is running correctly by either going on
to build your website or simply browse localhost in firefox/whatever.
If apache fails to start when you boot/or manually start the service
it may be because you need a copy of libphp4.so
Out of two systems I built it was missing from one - I have no reason
why it should be so. I just grabbed a copy from the other system and
placed it in the following directory: /usr/local/libexec/apache
You may have to google for it/whatever. After that it started perfectly.

End of apache setup.
**********

Next install mysql:

Do --> cd /usr/ports/databases/mysql41-server
Do --> make install clean
Do --> /usr/local/bin/mysql_install_db
Do --> cd /var/db
Do --> chown -R mysql mysql
Edit: /etc/rc.conf and add: mysql_enable="YES"
do --> /usr/local/bin/mysqld_safe &

Next create the mysql admin password:
Do --> /usr/local/bin/mysqladmin -u root password 'new-password'

Now create the mysql database and mysql user:

Do --> pcbsd# mysql -u root -p;
Then, from within mysql do:
mysql> create database mybbs;
mysql> grant usage on mybbs.* to mybbsuser@localhost;
mysql> set password for mybbsuser@localhost = password('secret');
mysql> grant all privileges on *.* to mybbsuser@localhost;
mysql> quit;

In the above the database is named mybbs and a mysql user with name
mybbsuser is created. You can use whatever name and password you
want of course.

End of mysql install/setup.
**********

Install php:

Do --> cd /usr/ports/lang/php4
Do --> make config
Add aditional options:
[X] APACHE Build Apache module

Do --> make install clean

Install php extensions:
Do --> cd /usr/ports/lang/php4-extensions
Do --> make config
Make sure you have/or insert these options:
[X] BZ2
[X] CTYPE
[X] MBSTRING
[X] MYSQL
[X] OVERLOAD
[X] PCRE
[X] PDF
[X] POSIX
[X] SESSION
[X] TOKENIZER
[X] XML
[X] ZIP
[X] ZLIB

You must have a copy of PDFLib-Lite-7.0.2.tar.gz or you will get
a build error in the next stage of the process.

You can get it from:: http://www2-pcmdi.llnl.gov/trac/browser ... z?rev=6295 or wherever else/up to you.
Next copy it to /usr/ports/distfiles/

Then do --> make install clean

Copy the recommended ini file:
Do --> cd /usr/local/etc
Do --> cp php.ini-recommended php.ini: php.ini

Now edit php.ini and make sure safe mode is off

************************************************** *******
************************************************** *******

Part 2.

Installing the BBS
You may choose whatever forum (bbs) package you want but I chose
one called MyBB which is available at http://www.mybboard.net/

Unpack it and copy the directory /forums/* to your document root:
/usr/local/www/data/yourwebsite.com/

The bbs should reside in a directory as follows:
/usr/local/www/data/yourwebsite.com/forums/

Next use mc or the chmod command/whatever and chmod all folders to 777
and all files to 666 - watch out for executables! This is rather tedious as
there are a lot of directories and files here.

Next point your browser (firefox/whatever) at:
http://yourwebsite.com/forums/install/index.php
and set up your bbs.

cookie domain = .yourdomain.com (the detected default worked fine)
You can theme the bbs by fetching themes from the main bbs website
and following some simple instructions. Alternatively you could keep
the default theme and just change the logo at the top by creating a
new logo.gif located in /usr/local/www/data/yourwebsite.com/forum/images

To administer the bbs point your browser at:
http://yourwebsite.com/forums/admin/index.php
where you will find various options to tune your bbs. Dont forget to
add a proper email address with smtp server (not a web one) so that your
bbs may send authentication emails when users register.

**********

Some commands for starting and stopping the services during
installation/setup:

STARTING MYSQL:
/usr/local/bin/mysqld_safe &
STOPPING MYSQL:
mysqladmin -u root -p shutdown
STARTING APACHE:
/usr/local/sbin/apachectl start
STOPPING APACHE:
/usr/local/sbin/apachectl stop
RESTARTING APACHE:
/usr/local/sbin/apachectl graceful

START/STOP/RESTART APACHE:
/usr/local/etc/rc.d/apache13.sh stop/start/restart
START/STOP/RESTART MYSQL:
/usr/local/etc/rc.d/mysql.sh stop/start/restart

*********************Finished*********************
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing PCBSD: Fluxbox installing screen issue Cheo Installing PC-BSD 1 01-18-2009 05:12 AM
Installing PCBSD 1.5.1 without breaking MBR deluxwww Installing PC-BSD 12 11-15-2008 07:24 PM
Installing an old set of ports with PCBSD algould FreeBSD Help 0 07-04-2007 01:40 PM
Trouble while installing PCBSD mmaraxx Installing PC-BSD 7 07-18-2005 08:10 PM
Problem with installing PCBSD on my IBM T42 medions Startup Bug Reports 0 07-08-2005 10:43 AM


All times are GMT. The time now is 11:48 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.