GNU/Linux >> Belajar Linux >  >> Ubuntu

Cara Menginstal Perangkat Lunak Forum ElkArte di Ubuntu 20.04

ElkArte adalah perangkat lunak pembuat forum komunitas yang gratis, sumber terbuka, dan kuat berdasarkan Forum Mesin Sederhana. Itu ditulis dalam PHP dan memungkinkan Anda membuat forum komunitas yang sepenuhnya responsif terhadap perangkat seluler dan nirkabel. Ini dirancang untuk menyediakan semua fitur yang Anda butuhkan untuk forum komunitas berfitur lengkap langsung dari kotak.

ElkArte adalah pilihan yang tepat untuk Anda jika Anda mencari platform forum sederhana dan lugas yang mudah disesuaikan.

Dalam tutorial ini, kami akan menunjukkan cara menginstal ElkArte dengan Let's Encrypt SSL di Ubuntu 20.04.

Prasyarat

  • Server yang menjalankan Ubuntu 20.04.
  • Nama domain yang valid ditunjukkan dengan server Anda.
  • Kata sandi root dikonfigurasi di server Anda.

Instal Apache, PHP, dan MariaDB

ElkArte berjalan di server web, berdasarkan PHP dan menggunakan MariaDB sebagai backend database. Jadi, Anda perlu menginstal Apache, MariaDB, PHP, dan ekstensi PHP lainnya di server Anda. Anda dapat menginstal semua paket dengan perintah berikut:

apt-get install apache2 mariadb-server php7.4 libapache2-mod-php7.4 php7.4-common php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-pgsql php7.4-xml php7.4-cli php7.4-imagick php7.4-bcmath php7.4-gmp php7.4-zip unzip -y

Setelah semua paket terinstal, buka file php.ini dan atur beberapa pengaturan yang berguna:

nano /etc/php/7.4/apache2/php.ini
Change the following lines:
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

Simpan dan tutup file kemudian restart layanan Apache untuk menerapkan perubahan:

systemctl restart apache2

Konfigurasi Database MariaDB

Pertama, amankan instalasi MariaDB dan atur kata sandi root MariaDB dengan perintah berikut:

mysql_secure_installation

Jawab semua pertanyaan seperti yang ditunjukkan di bawah ini:

Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Selanjutnya, masuk ke shell MariaDB dengan perintah berikut:

mysql -u root -p

Setelah login, buat database dan user untuk ElkArte:

MariaDB [(none)]> CREATE DATABASE elkdb;
MariaDB [(none)]> CREATE USER 'elk'@'localhost' IDENTIFIED BY 'password';

Selanjutnya, berikan semua hak istimewa ke elkdb dengan perintah berikut:

MariaDB [(none)]> GRANT ALL ON elkdb.* TO 'elk'@'localhost' WITH GRANT OPTION;

Selanjutnya, flush hak istimewa dan keluar dari shell MariaDB dengan perintah berikut:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Setelah database dikonfigurasi, Anda dapat melanjutkan ke langkah berikutnya.

Unduh ElkArte

Pertama, unduh versi terbaru ElkArte dari repositori Git menggunakan perintah berikut:

wget https://github.com/elkarte/Elkarte/releases/download/v1.1.6/ElkArte_v1-1-6_install.zip

Setelah unduhan selesai, unzip file yang diunduh ke direktori root web Apache menggunakan perintah berikut:

unzip ElkArte_v1-1-6_install.zip -d /var/www/html/elkarte

Selanjutnya, berikan izin yang tepat ke direktori elkarte menggunakan perintah berikut:

chown -R www-data:www-data /var/www/html/elkarte/
chmod -R 755 /var/www/html/elkarte/

Setelah selesai, Anda dapat melanjutkan ke langkah berikutnya.

Konfigurasi Apache untuk ElkArte

Selanjutnya, buat file konfigurasi virtual host Apache baru untuk ElkArte.

nano /etc/apache2/sites-available/elkarte.conf

Tambahkan baris berikut:

<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName elk.linuxbuz.com
     DocumentRoot /var/www/html/elkarte

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
    
</VirtualHost>

Simpan dan tutup file setelah Anda selesai. Kemudian, aktifkan Apache virtual host dan rewrite module dengan perintah berikut:

a2ensite elkarte.conf
a2enmod rewrite

Terakhir, restart layanan Apache untuk mengimplementasikan perubahan.

systemctl restart apache2

Amankan ElkArte dengan Let's Encrypt SSL

Pertama, instal Certbot Let's Encrypt Client untuk mengelola SSL situs web Anda:

apt-get install certbot python3-certbot-apache -y

Setelah Certbot terinstal, jalankan perintah berikut untuk mengunduh dan menginstal Let's Encrypt SSL untuk situs web Anda:

certbot --apache -d elk.linuxbuz.com

Anda akan diminta untuk memberikan alamat email Anda dan menerima persyaratan layanan seperti yang ditunjukkan di bawah ini:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for elk.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/elk-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/elk-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/elk-le-ssl.conf

Selanjutnya, pilih apakah akan mengarahkan lalu lintas HTTP ke HTTPS seperti yang ditunjukkan di bawah ini:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Ketik 2 dan tekan Enter untuk menyelesaikan instalasi seperti yang ditunjukkan di bawah ini.

Redirecting vhost in /etc/apache2/sites-enabled/elk.conf to ssl vhost in /etc/apache2/sites-available/elk-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://elk.linuxbuz.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=elk.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/elk.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/elk.linuxbuz.com/privkey.pem
   Your cert will expire on 2020-08-19. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

 - We were unable to subscribe you the EFF mailing list because your
   e-mail address appears to be invalid. You can try again later by
   visiting https://act.eff.org.

Pada titik ini, ElkArte Anda diamankan dengan Let's Encrypt SSL.

Mengakses Antarmuka Web ElkArte

Sekarang, buka browser web Anda dan ketik URL https://elk.linuxbuz.com. Anda akan diarahkan ke halaman selamat datang ElkArte:

Klik Lanjutkan tombol. Anda akan melihat halaman pengaturan server database:

Berikan detail basis data Anda dan klik tombol Lanjutkan tombol. Anda akan melihat halaman pengaturan Forum:

Berikan URL Forum Anda, nama Forum dan klik Lanjutkan tombol. Anda akan melihat halaman berikut:

Klik Lanjutkan tombol. Anda akan melihat halaman pembuatan akun Admin:

Berikan nama pengguna, sandi, email admin Anda dan klik tombol Lanjutkan tombol. Setelah instalasi selesai, Anda akan melihat halaman berikut:

Klik forum Anda yang baru dipasang . Anda akan melihat dasbor ElkArte di halaman berikut:

Kesimpulan

Selamat! Anda telah berhasil menginstal ElkArte dengan Apache dan Let's Encrypt SSL di Ubuntu 20.04. Anda sekarang dapat dengan mudah meng-host forum komunitas Anda sendiri dengan ElkArte. Jangan ragu untuk bertanya kepada saya jika Anda memiliki pertanyaan.


Ubuntu
  1. Cara Menginstal MariaDB 10.4 di Ubuntu 18.04

  2. Cara Menginstal MariaDB di Ubuntu 18.04

  3. Cara Menginstal ProcessWire CMS di Ubuntu 18.04 LTS

  1. Cara menginstal Panel SEO di Ubuntu 18.04 LTS

  2. Cara Menginstal EPESI CRM di Ubuntu 18.04 LTS

  3. Cara Menginstal vTiger CRM di Ubuntu 18.04 LTS

  1. Cara Menginstal CMS Oktober di Ubuntu 18.04 LTS

  2. Cara menginstal Perangkat Lunak Forum MyBB di Ubuntu 18.04 LTS

  3. Cara menginstal Perangkat Lunak Manajemen Proyek Redmine di Ubuntu 20.04