个人工具

UbuntuHelp:PunBB

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月13日 (日) 11:24的版本 (New page: {{From|https://help.ubuntu.com/community/PunBB}} {{Languages|php5}} [http://www.punbb.org/ PunBB] is a fast and lightweight PHP-powered discussion board. Follow these instructions to in...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


PunBB is a fast and lightweight PHP-powered discussion board.

Follow these instructions to install PunBB on Ubuntu 6.06 (Dapper Drake).

LAMP Installation

PunBB runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications.

Use any method to install the LAMP stack packages:

 
apache2 php5-mysql libapache2-mod-php5 mysql-server
</code>

Set a MySQL root password.  This is for the root database user, not the root system user.

<pre>
mysql -u root

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
</code>

Create a database for punBB.  Also, create a user other than the mysql root user with neccessary privileges.  Below, "punbbdata" is the database, "punbb" is the username and "punpass" is the password.  You may pick a different database name, username and password, of course.

<pre>
mysql> CREATE DATABASE punbbdata;

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON punbbdata.* TO 'punbb'@'localhost' IDENTIFIED BY 'punpass';

mysql> FLUSH PRIVILEGES;
</code>

Quit MySQL:

<pre>
mysql> \q
</code>

=== Install PunBB ===

Download the latest version from [http://www.punbb.org/downloads.php here].  These instructions will install PunBB in the /forums directory of your default web site.   To put it somewhere else, alter these commands to suit.

<pre>
wget http://www.punbb.org/download/punbb-1.2.12.tar.gz
 
tar xvzf punbb-1.2.12.tar.gz

cd punbb-1.2.12

sudo cp -R ./upload/ /var/www/forums

sudo chown -R www-data:www-data /var/www/forums/cache/ /var/www/forums/img/avatars/
</code>

If you have not restarted Apache2 since you install LAMP, you need to do so
<pre>
sudo /etc/init.d/apache2 restart
</code>

Otherwise you get this: 
 attachment:screen1.jpg

Now, browse to "http://localhost/forums" in your browser and click on the "install.php" link.  
 attachment:screen2.jpg 

You will be asked the information regarding the database.  You will need to enter the mysql database name, username, and password.
 attachment:screen3.jpg  

You will then need to cut and paste the text into a file named config.php.

<pre>
sudo nano /var/www/forums/config.php
</code>

 attachment:screen4.jpg 

And then log into your new forum:

 attachment:screen5.jpg 

[[category:UbuntuHelp]]