Introduksjon
Forutsetninger
Trinn 1: Oppdater systemet
Trinn 2: Installere LAMP-stabelen
Trinn 3: Installere miniBB
Trinn 4: Konfigurere MariaDB for miniBB
Trinn 5: Konfigurere Apache for miniBB
Trinn 6: Få tilgang til miniBB Forum
Introduksjon
MiniBB, også kjent som Mini Bulletin Board, er et åpen kildekode-program som brukes til å bygge ditt eget internettforum. Den er skrevet i PHP og spesialdesignet for små og mellomstore forumsamfunn, som har mindre enn 100 unike innlegg per dag. I denne opplæringen vil jeg vise deg hvordan du installerer og konfigurerer miniBB-forum på Ubuntu 16.04.
Forutsetninger
- En nylig lansert Vultr Ubuntu 16.04 serverforekomst.
- En ikke-rootbruker med sudo-rettigheter oppsett på serveren din.
Trinn 1: Oppdater systemet
Først oppdaterer du systemet til den siste stabile versjonen ved å kjøre følgende kommando:
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
Trinn 2: Installere LAMP-stabelen
Du må installere LAMP-stakken og noen PHP-moduler før du installerer miniBB. Du kan installere dem med følgende kommando:
sudo apt-get install apache2 libapache2-mod-php7.0 mariadb-server php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-opcache php7.0-common
Trinn 3: Installere miniBB
Først må du laste ned den siste stabile versjonen av miniBB fra miniBBs nettside .
Opprett en katalog kalt minibbog pakk ut det nedlastede arkivet til Apache-dokumentets rotkatalog.
sudo mkdir /var/www/html/minibb
sudo unzip minibb.zip -d /var/www/html/minibb
Angi de riktige tillatelsene på minibbkatalogen.
sudo chown -R www-data:www-data /var/www/html/minibb
Du må også gjøre noen endringer i setup_options.phpfilen.
sudo nano /var/www/html/minibb/setup_options.php
Endre filen i henhold til dine behov.
$DBhost='localhost';
$DBname='minibb';
$DBusr='minibbuser';
$DBpwd='password';
$admin_usr = 'admin';
$admin_pwd = 'admin@123';
$admin_email = 'admin@example.com';
$main_url='http://example.com';
Når du er ferdig, lagre og lukk filen.
Trinn 4: Konfigurere MariaDB for miniBB
Som standard er MariaDB ikke sikret, så du må sikre den først. Du kan sikre det med mysql_secure_installationskriptet.
sudo mysql_secure_installation
Svar på alle spørsmålene som vist nedenfor:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Deretter logger du på MariaDB-konsollen og oppretter en database for miniBB:
mysql -u root -p
Skriv inn MariaDB-rotpassordet ditt og trykk enter. Når du er logget inn på MariaDB, må du opprette en database for miniBB:
MariaDB [(none)]> CREATE DATABASE minibb;
MariaDB [(none)]> CREATE USER 'minibbuser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON `minibb`.* TO 'minibbuser'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Trinn 5: Konfigurere Apache for miniBB
Opprett en ny virtuell vertsfil minibb.conffor Apache.
sudo nano /etc/apache2/sites-available/minibb.conf
Legg til følgende linjer:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/minibb
ServerName 192.168.1.227
ServerAlias www.example.com
<Directory /var/www/html/minibb/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/minibb_log
CustomLog /var/log/apache2/minibb_custom_log common
</VirtualHost>
Når du er ferdig, aktiverer du den virtuelle verten ved å kjøre følgende kommando:
sudo a2ensite minibb.conf
sudo service apache2 reload
Trinn 6: Få tilgang til miniBB Forum
Det er på tide å få tilgang til miniBB-nettgrensesnittet. Åpne favorittnettleseren din og skriv inn URL-en http://your-server-ip/_index.php. Fullfør de nødvendige trinnene for å fullføre installasjonen.
Når installasjonen er fullført, kan du logge på miniBB-adminpanelet ved å navigere til http://your-server-ip/bb_admin.php?. Nyt din nye miniBB.