GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu20.04にphpBBをインストールする方法

はじめに

phpBB は、PHPスクリプト言語のインターネットフォーラムパッケージです。 「phpBB」という名前は、 PHP Bulletin Boardの略語です。 。 GNU General Public Licenseの下で利用可能なphpBBは、無料でオープンソースです。

phpBBの機能には、複数のデータベースエンジン(PostgreSQL、SQLite、MySQL、Oracleデータベース、Microsoft SQL Server)、フラットメッセージ構造(スレッド化ではなく)、階層サブフォーラム、トピック分割/マージ/ロック、ユーザーグループ、投稿、全文検索、プラグイン、さまざまな通知オプション(電子メール、Jabberインスタントメッセージング、ATOMフィード)。

ApacheやNginxなどのほとんどのWebサーバーにphpBBをインストールするのは簡単で、管理と使用も簡単です。

このチュートリアルでは phpBBをインストールする方法を学びます Ubuntu20.04でApacheを使用します。

インストール

以下の手順に従ってください

  • LAMPスタックのインストール(Apache-Mariadb-PHP)
#Update Packages
sudo apt update

#Install, start and enable apache 
sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2

#Install, start and enable Mariadb Database
sudo apt install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
  • 以下のスクリプトを実行して、mariaデータベースを保護します
mysql_secure_installation
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.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


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
 ... Success!

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!
  • UbuntuにPHPをインストールする
sudo apt install php php-mysql
  • PHPBBに必要な次のPHPモジュールをインストールします
sudo apt install php-net-ftp php7.4-ldap php7.4-common libapache2-mod-php7.4 php7.4-gd php7.4-curl openssl php-imagick php7.4-intl php7.4-json php7.4-imap php7.4-mbstring php7.4-mysql php7.4-zip unzip php7.4-pgsql php-ssh2 php7.4-xml php7.4-sqlite3 -y
  • mariadbを使用してphpBBのデータベースを作成する
sudo mysql -u root -p
  • PHPBBのデータベースを作成してから、データベースにユーザーを作成し、すべての権限をユーザーに付与します。
CREATE USER 'phpbb_user'@'localhost' IDENTIFIED BY 'unixcopPassword';
GRANT ALL ON phpbb_db.* to 'phpbb_user'@'localhost' IDENTIFIED BY 'unixcopPassword';
FLUSH PRIVILEGES;
\q
  • phpBBをダウンロードします。この記事を書いている時点で、PHPBBの最新リリースはバージョン3.3.5です。
cd /mnt
sudo wget -c https://download.phpbb.com/pub/release/3.3/3.3.5/phpBB-3.3.5.zip

:このリンクから最新バージョンのphpBBをダウンロードできますphpBBリリース

  • 圧縮ファイルを解凍します
unzip phpBB-3.3.5.zip
  • ルートディレクトリに移動し、名前を phpbbに変更します
sudo mv phpBB3 /var/www/html/phpbb
  • 適切な所有権と権限を設定します
sudo chown -R www-data:www-data /var/www/html/phpbb
sudo chmod -R 755 /var/www/html/phpbb
  • phpBBの仮想ホストを構成する
sudo vim /etc/apache2/sites-available/phpbb.conf
  • 次に、以下を追加します
<VirtualHost *:80>
      ServerAdmin [email protected]
      DocumentRoot /var/www/html/phpbb
      ServerName phpBBunixcop.com

      <Directory /var/www/html/phpbb>
                Options FollowSymlinks
                AllowOverride All
                Require all granted
       </Directory>

ErrorLog ${APACHE_LOG_DIR}/phpBBunixcop.com_error.log
CustomLog ${APACHE_LOG_DIR}/phpBBunixcop.com_access.log combined

</VirtualHost>
  • PHPBB仮想ホストを有効にします。
sudo a2ensite phpbb
  • Apacheリライトモジュールを有効にします。
sudo a2enmod rewrite
  • Apacheを再起動します
sudo systemctl restart apache2
  • ブラウザを開き、 http:// IP_serverに表示されているURLを入力します またはhttp://domain.com 私にとってはhttp://phpbbunixcop.com

ウェルカムページでは、PHPBBの概要を説明しています。

  • インストールをクリックします インストールを完了するには
  • インストールへようこそ。続行するには、[インストール]をクリックしてください
  • 管理者ユーザーとパスワードの情報を入力し、[送信]をクリックします 示されているように
  • 前に作成したphpbbデータベースの詳細を入力し、送信をクリックします
  • 次に、[送信]をクリックします送信 これらのデフォルトのサーバー構成で
  • サーバーアドレス、ポート、SMTPユーザー名、パスワードなどのSMTPサーバーの詳細を入力し、[送信]をクリックします。 。メール機能が設定されていない場合は、送信をクリックするだけです。 何も変更せずに
  • デフォルトの言語、ボードタイトル、ボードの簡単な説明など、掲示板の設定を構成します。次に、[送信]をクリックします
  • インストーラーはPHPBBに必要なファイルをインストールします。終了したら、 ACPをクリックします 以下のスクリーンショットに示されているリンク。
  • 管理コントロールパネルに移動します。また、phpBBのバージョンを確認します。 [管理]コントロールパネルに移動し、以下に示すように[管理インデックス]をクリックします。
  • PHPバージョンは次のように表示されます

結論

以上です

このチュートリアルでは、 phpBBをインストールする方法を説明しました Ubuntu20.04で。

ありがとう


Ubuntu
  1. Ubuntu18.04にMariaDB10.4をインストールする方法

  2. Ubuntu18.04にMariaDBをインストールする方法

  3. Ubuntu15.04にLiteCartをインストールする方法

  1. Ubuntu20.04にMariaDBをインストールする方法

  2. Ubuntu20.04LTSにMariaDBをインストールする方法

  3. Ubuntu 18.04 /Ubuntu16.04にMariaDBをインストールする方法

  1. Ubuntu20.04LTSにMariaDBをインストールする方法

  2. Ubuntu20.04にMariaDB10.6をインストールする方法

  3. Ubuntu20.04にMariaDB10.7をインストールする方法