phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire título="View all articles about website here">sitio web. You can create a very unique forum in minutes using the extensive título="View all articles about database here">database of user-created modifications and styles base de datos containing hundreds of style and image packages.
En este tutorial, you'll learn how to install phpBB forums on Ubuntu 14.04.
Para este tutorial, all you'll need is:
Paso 1 — Install LAMP stack
En este paso, we'll install the LÁMPARA stack.
primero, update your packages.
sudo apt-get update
Siguiente, set the
DEBIAN_FRONTEND environment variable to noninteractive, so the installation doesn't prompt you for input.
Finalmente, Instala el LÁMPARA stack (plus
unzip, which handles
.zip files). This command may take a few minutes to run, because we're installing a lot of packages.
sudo -E apt-get -y install apache2 mysql-server mysql-client php5 php5-mysql php5-gd imagemagick unzip
-E flag for
sudo preserves our environment variables, asi que
DEBIAN_FRONTEND gets recognized; the
-y flag for
apt-get will assume "yes" to all prompts, so the whole command should run successfully without needing any user input.
Paso 2 — Create a Database
En este paso, we'll create a database and user with privileges for it.
primero, create the database. Here it's named phpBB, but you can name it whatever you like.
sudo mysqladmin create phpBB
Next we create a user and password, which are "sammy" and "badpassword", respectivamente. Make sure you change these values, especially the password!
sudo mysql -Bse "create user 'sammy'@'localhost' identified by 'badpassword';"
Siguiente, we grant our user privileges in our database.
sudo mysql -Bse "grant all privileges on \`phpBB\`.* to 'sammy'@'localhost';"
Y finalmente, we update the grant tables.
sudo mysqladmin flush-privileges
Paso 3 — Install phpBB
En este paso, we'll install phpBB.
primero, download the latest version of phpBB. This is the latest version at the time of writing, but you can double check on their website.
Unzip the package we downloaded.
Create a backup directory for any existing sitio web archivos.
Move any existing website files out.
sudo mv /var/www/html/* ~/website-backup/
Nota: If you haven't added anything to your website (e.g. if you're going through this tutorial on a brand new Droplet), the only thing in
/var/www/html/ is the Apache default home page. If you don't want to save this, you can delete the backup directory at this point with
rm -rf ~/website-backup/.
Copy the phpBB files over into Apache's default folder.
sudo cp -R phpBB3/* /var/www/html/
primero, add yourself to the
sudo usermod -aG www-data sammy
Siguiente, change the owner and group of the files in
sudo chown -R www-data:www-data /var/www/html/
Move to the
Add permissions for the group to the following directories and files.
sudo chmod 660 images/avatars/upload/ config.php sudo chmod 770 store/ cache/ files/
Paso 4 — Finish Installation
En este paso, we'll finish the installation by adding database, adminstrator, and email details via the phpBB installation website.
Navigate over to
Clickea en el INSTALL lengüeta.
You should have all the required packages already installed. Hacer clic Proceed to next step, entonces Start install.
Enter the database credentials, replacing the database name, nombre de usuario, and password with your own values.
- Database type: MySQL with MySQLi Extension
- Database server hostname or DSN: localhost
- Database name: phpBB
- Database username: Sammy
- Database password: badpassword
A continuación, haga clic Proceed to next step. For most steps after this point, you'll have to click the Proceed to next step button to move on.
Now you should see a successful database connection.
In this next step, you should set up your administrator username and password. The administrator of a board has many powers, including fine-tuning the board settings and managing users. You can find out more about administrators in the phpBB Administration Guide.
Set up email settings if you have a custom SMTP server. If you don't and you'd like more information, revisa Este artículo on how to set up an STMP server. De otra manera, stick with the default values.
Your installation is now (almost) complete.
Paso 5 — Clean Up
En este paso, we'll clean up after our installation by removing unnecessary files and correcting some permissions.
Remove some permissions on the
sudo chmod 640 /var/www/html/config.php
Now that the installation is done, you should delete the
/var/www/install carpeta. phpBB will not operate unless this directory is deleted, and a warning message will be displayed.
sudo rm -rf /var/www/html/install
You can delete the
docs/ directory if you want to, también, but this isn't necessary.
Now you should be able to access your phpBB forum at your Droplet's dirección IP!