Concrete5 adalah sistem manajemen konten sumber terbuka yang digunakan untuk mempublikasikan konten di internet. Itu ditulis dalam PHP dan menggunakan MariaDB sebagai backend database. Ini menyediakan pembangun yang mudah digunakan yang membantu Anda membuat halaman dan konten melalui browser web. Ini fleksibel, aman, mobile-ready, dan berdasarkan arsitektur Model-View-Controller. Ini menawarkan serangkaian fitur yang kaya termasuk, editor konten WYSIWYG, Manajer Media, Konten Seret dan Lepas, Pengeditan dalam konteks, dan banyak lagi.
Dalam posting ini, kami akan menunjukkan cara menginstal Concrete5 CMS dengan Apache dan Let's Encrypt SSL di server Ubuntu 20.04.
Persyaratan
- Server yang menjalankan Ubuntu 20.04.
- Nama domain yang valid menunjuk ke IP server.
- Kata sandi root dikonfigurasi di server Anda.
Memulai
Pertama, Anda perlu memperbarui indeks paket APT ke versi terbaru. Anda dapat memperbaruinya dengan perintah berikut:
apt-get update -y
Setelah indeks APT diperbarui, Anda dapat melanjutkan ke langkah berikutnya.
Instal Apache, MariaDB, dan PHP
Selanjutnya, Anda perlu menginstal server web Apache, server database MariaDB, PHP, dan ekstensi PHP lainnya ke server Anda. Anda dapat menginstal semuanya menggunakan perintah berikut:
apt-get install apache2 mariadb-server php libapache2-mod-php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl -y
Setelah semua paket terinstal, edit file php.ini dan atur nilai yang diinginkan:
nano /etc/php/7.4/apache2/php.ini
Ubah baris berikut:
file_uploads = On allow_url_fopen = On memory_limit = 256M upload_max_filesize = 64M date.timezone = Asia/Kolkata
Simpan dan tutup file ketika Anda selesai kemudian restart layanan Apache untuk menerapkan perubahan:
systemctl restart apache2
Setelah selesai, Anda dapat melanjutkan ke langkah berikutnya.
Buat Database Concrete5
Selanjutnya, Anda perlu membuat database dan pengguna untuk Concrete5. Pertama, login ke MariaDB dengan perintah berikut:
mysql
Setelah login, buat database dan user dengan perintah berikut:
MariaDB [(none)]> CREATE DATABASE concrete5;
MariaDB [(none)]> CREATE USER 'concrete5user'@'localhost' IDENTIFIED BY 'password';
Selanjutnya, berikan semua hak istimewa ke database Concrete5 dengan perintah berikut:
MariaDB [(none)]> GRANT ALL ON concrete5.* TO 'concrete5user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
Selanjutnya, flush hak istimewa dan keluar dari konsol MariaDB dengan perintah berikut:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Setelah selesai, Anda dapat melanjutkan ke langkah berikutnya.
Unduh CMS Concrete5
Pertama, buka situs CMS Concrete5 salin URL versi terbaru dari Concrete5, dan unduh dengan perintah berikut:
wget --trust-server-names https://www.concrete5.org/download_file/-/view/115589/ -O concrete5.zip
Setelah unduhan selesai, ekstrak file yang diunduh dengan perintah berikut:
unzip concrete5.zip
Selanjutnya, pindahkan direktori yang diekstrak ke direktori root web Apache menggunakan perintah berikut:
mv concrete5-* /var/www/html/concrete5
Selanjutnya, atur izin dan kepemilikan yang tepat ke direktori concrete5 dengan perintah berikut:
chown -R www-data:www-data /var/www/html/concrete5/
chmod -R 755 /var/www/html/concrete5/
Setelah selesai, Anda dapat melanjutkan ke langkah berikutnya.
Konfigurasi Apache untuk CMS Concrete5
Selanjutnya, Anda perlu membuat file konfigurasi virtual host Apache untuk Concrete5 CMS. Anda dapat membuatnya dengan perintah berikut:
nano /etc/apache2/sites-available/concrete5.conf
Tambahkan baris berikut:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/concrete5/ ServerName concrete5.example.com <Directory /var/www/html/concrete5/> 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 kemudian aktifkan Apache virtual host dan rewrite module dengan perintah berikut:
a2ensite concrete5.conf
a2enmod rewrite
Selanjutnya, restart layanan Apache untuk menerapkan perubahan:
systemctl restart apache2
Anda juga dapat memeriksa status layanan Apache menggunakan perintah berikut:
systemctl status apache2
Anda akan mendapatkan output berikut:
? apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2021-05-15 15:00:03 UTC; 4s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 15566 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 15585 (apache2) Tasks: 6 (limit: 2353) Memory: 13.5M CGroup: /system.slice/apache2.service ??15585 /usr/sbin/apache2 -k start ??15586 /usr/sbin/apache2 -k start ??15587 /usr/sbin/apache2 -k start ??15588 /usr/sbin/apache2 -k start ??15589 /usr/sbin/apache2 -k start ??15590 /usr/sbin/apache2 -k start May 15 15:00:03 ubuntu2004 systemd[1]: Starting The Apache HTTP Server...
Pada titik ini, server web Apache dikonfigurasi untuk meng-host CMS Concrete5. Sekarang Anda dapat melanjutkan ke langkah berikutnya.
Akses Antarmuka Web CMS Concrete5
Sekarang, buka browser web Anda dan akses antarmuka web Concrete5 CMS menggunakan URL http://concrete5.example.com . Anda akan diarahkan ke halaman berikut:
Pilih bahasa Anda dan klik Panah tombol. Anda akan melihat halaman berikut:
Pastikan semua library yang diperlukan sudah terinstal, lalu klik tombol Lanjutkan ke Instalasi tombol, Anda akan melihat halaman berikut:
Di sini, berikan nama pengguna Admin, kata sandi, nama pengguna basis data, kata sandi, dan nama basis data, lalu klik tombol Instal Beton5 tombol untuk memulai instalasi. Setelah instalasi selesai, Anda akan melihat halaman berikut:
Sekarang, klik Edit Situs Anda tombol, Anda akan melihat dasbor Concrete5 pada halaman berikut:
Amankan Concrete5 dengan Let's Encrypt SSL
Selanjutnya, disarankan untuk mengamankan situs web Anda dengan Let's Encrypt SSL. Pertama, instal klien Certbot menggunakan perintah berikut:
apt-get install python3-certbot-apache -y
Setelah terinstal, jalankan perintah berikut untuk mengamankan situs web Anda dengan Let's Encrypt SSL:
certbot --apache -d concrete5.example.com
Anda akan diminta untuk memberikan email Anda dan menerima persyaratan layanan seperti yang ditunjukkan di bawah ini:
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator standalone, Installer None 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 Plugins selected: Authenticator apache, Installer apache Obtaining a new certificate Performing the following challenges: http-01 challenge for concrete5.example.com Enabled Apache rewrite module Waiting for verification... Cleaning up challenges Created an SSL vhost at /etc/apache2/sites-available/concrete5-le-ssl.conf Enabled Apache socache_shmcb module Enabled Apache ssl module Deploying Certificate to VirtualHost /etc/apache2/sites-available/concrete5-le-ssl.conf Enabling available site: /etc/apache2/sites-available/concrete5-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 menginstal Let's Encrypt SSL untuk situs web Anda:
Enabled Apache rewrite module Redirecting vhost in /etc/apache2/sites-enabled/concrete5.conf to ssl vhost in /etc/apache2/sites-available/concrete5-le-ssl.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://concrete5.example.com You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=concrete5.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/concrete5.example.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/concrete5.example.com/privkey.pem Your cert will expire on 2020-10-23. 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" - 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
Sekarang, Anda dapat mengakses Concrete 5 dengan aman menggunakan URL https://concrete5.example.com .
Kesimpulan
Dalam panduan di atas, Anda mempelajari cara menginstal Concrete5 CMS dengan Apache dan Let's Encrypt SSL di Ubuntu 20.04. Anda sekarang dapat mempublikasikan konten Anda di internet dengan mudah menggunakan CMS Concrete5. Jangan ragu untuk bertanya kepada saya jika Anda memiliki pertanyaan.