Prezantimi
Parakushtet
Hapi 1: Përditësoni sistemin
Hapi 2: Instalimi i pirgut LAMP
Hapi 3: Instalimi i miniBB
Hapi 4: Konfigurimi i MariaDB për miniBB
Hapi 5: Konfigurimi i Apache për miniBB
Hapi 6: Hyrja në Forumin miniBB
Prezantimi
MiniBB, i njohur gjithashtu si Mini Bulletin Board, është një program me burim të hapur që përdoret për ndërtimin e forumit tuaj të internetit. Është shkruar në PHP dhe është krijuar posaçërisht për komunitetet e forumeve të vogla dhe të mesme, të cilat kanë më pak se 100 postime unike në ditë. Në këtë tutorial, unë do t'ju tregoj se si të instaloni dhe konfiguroni forumin miniBB në Ubuntu 16.04.
Parakushtet
- Një shembull i serverit të sapolançuar Vultr Ubuntu 16.04.
- Një përdorues jo-root me konfigurim të privilegjeve sudo në serverin tuaj.
Hapi 1: Përditësoni sistemin
Së pari, përditësoni sistemin tuaj në versionin më të fundit të qëndrueshëm duke ekzekutuar komandën e mëposhtme:
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
Hapi 2: Instalimi i pirgut LAMP
Do t'ju duhet të instaloni pirgun LAMP dhe disa module PHP përpara se të instaloni miniBB. Ju mund t'i instaloni ato me komandën e mëposhtme:
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
Hapi 3: Instalimi i miniBB
Së pari do t'ju duhet të shkarkoni versionin më të fundit të qëndrueshëm të miniBB nga faqja e internetit e miniBB .
Krijoni një drejtori me emër minibbdhe nxirrni arkivin e shkarkuar në direktorinë rrënjë të dokumentit Apache.
sudo mkdir /var/www/html/minibb
sudo unzip minibb.zip -d /var/www/html/minibb
Vendosni lejet e duhura në minibbdrejtori.
sudo chown -R www-data:www-data /var/www/html/minibb
Do t'ju duhet gjithashtu të bëni disa ndryshime në setup_options.phpdosje.
sudo nano /var/www/html/minibb/setup_options.php
Ndryshoni skedarin sipas nevojave tuaja.
$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';
Pasi të keni mbaruar, ruani dhe mbyllni skedarin.
Hapi 4: Konfigurimi i MariaDB për miniBB
Si parazgjedhje, MariaDB nuk është siguruar, kështu që së pari duhet ta siguroni atë. Mund ta siguroni me mysql_secure_installationskript.
sudo mysql_secure_installation
Përgjigjuni të gjitha pyetjeve siç tregohet më poshtë:
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!
Tjetra, identifikohuni në tastierën MariaDB dhe krijoni një bazë të dhënash për miniBB:
mysql -u root -p
Futni fjalëkalimin tuaj root MariaDB dhe shtypni enter. Pasi të keni hyrë në MariaDB, duhet të krijoni një bazë të dhënash për 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
Hapi 5: Konfigurimi i Apache për miniBB
Krijoni një skedar të ri pritës virtual minibb.confpër Apache.
sudo nano /etc/apache2/sites-available/minibb.conf
Shtoni rreshtat e mëposhtëm:
<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>
Pasi të keni mbaruar, aktivizoni hostin virtual duke ekzekutuar komandën e mëposhtme:
sudo a2ensite minibb.conf
sudo service apache2 reload
Hapi 6: Hyrja në Forumin miniBB
Është koha për të hyrë në ndërfaqen e internetit miniBB. Hapni shfletuesin tuaj të preferuar të internetit dhe shkruani URL-në http://your-server-ip/_index.php. Plotësoni hapat e kërkuar për të përfunduar instalimin.
Pasi të ketë përfunduar instalimi, mund të identifikoheni në panelin e administrimit të miniBB duke lundruar te http://your-server-ip/bb_admin.php?. Shijoni miniBB-në tuaj të re.