웹사이트 검색

Apache와 함께 Joomla를 설치하는 방법 및 무료 Lets Encrypt SSL on Alma Linux 8


이 페이지에서

  1. 전제 조건
  2. LAMP 서버 설치
  3. MariaDB 데이터베이스 구성
  4. 줌라 CMS 다운로드
  5. Joomla용 Apache 구성
  6. Joomla용 방화벽 구성\n
  7. Joomla 웹 설치 마법사 액세스
  8. Lets Encrypt SSL로 Joomla CMS 보안
  9. 결론

Joomla는 무료 오픈 소스이며 가장 널리 사용되는 콘텐츠 관리 시스템 중 하나입니다. PHP로 작성되었으며 프로그래밍 지식 없이도 웹 사이트와 블로그를 만드는 데 사용됩니다. 웹 사이트 기능을 확장하는 데 도움이 되는 무료 및 유료 플러그인과 테마를 제공합니다. 웹 브라우저에서 웹사이트를 관리하기 위한 이니셔티브 제어판을 제공합니다. Joomla는 다국어 지원, 미디어 관리자, SEO, 통합 도움말 시스템, 연락처 관리 등 매우 유용한 기능을 제공합니다.

이 자습서에서는 Apache와 함께 Joomla CMS를 설치하고 Alma Linux 8에서 SSL을 암호화하는 방법을 배웁니다.

전제 조건

  • Alma Linux 8을 실행하는 서버.\n
  • 서버 IP를 가리키는 유효한 도메인 이름입니다.\n
  • 루트 암호는 서버에서 구성됩니다.\n

램프 서버 설치

Joomla는 PHP로 작성된 웹서버에서 실행되며 MariaDB를 데이터베이스 백엔드로 사용합니다. 따라서 시스템에 LAMP 서버를 설치해야 합니다. 다음 명령으로 설치할 수 있습니다.

dnf install httpd @mariadb php php-curl php-xml php-zip php-mysqlnd php-intl php-gd php-json php-ldap php-mbstring php-opcache unzip curl wget -y

설치가 완료되면 PHP 구성 파일을 편집하고 기본 설정을 변경합니다.

nano /etc/php.ini

다음 줄을 변경합니다.

memory_limit = 256M
output_buffering = Off
max_execution_time = 300
date.timezone = UTC

파일을 저장하고 닫은 다음 Apache 서비스를 시작하고 시스템 재부팅 후 시작하도록 활성화합니다.

systemctl start httpd mariadb
systemctl enable httpd mariadb

MariaDB 데이터베이스 구성

다음으로 Joomla CMS용 데이터베이스와 사용자를 생성해야 합니다. 먼저 다음 명령을 사용하여 MariaDB 셸에 연결합니다.

mysql

로그인한 후 다음 명령을 사용하여 데이터베이스와 사용자를 생성합니다.

MariaDB [(none)]> CREATE DATABASE joomla;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost' IDENTIFIED BY "securepassword";

다음으로 권한을 다시 로드하여 변경 사항을 적용합니다.

MariaDB [(none)]> FLUSH PRIVILEGES;

그런 다음 다음 명령을 사용하여 MariaDB 셸을 종료합니다.

MariaDB [(none)]> EXIT;

완료되면 다음 단계로 진행할 수 있습니다.

줌라 CMS 다운로드

이 튜토리얼을 작성할 당시 사용 가능한 최신 버전은 Joomla 4.1.2입니다. 다음 명령을 사용하여 공식 다운로드 페이지에서 다운로드할 수 있습니다.

wget https://downloads.joomla.org/cms/joomla4/4-1-2/Joomla_4-1-2-Stable-Full_Package.zip?format=zip -O joomla.zip

다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일을 Apache 웹 루트 디렉터리에 압축 해제합니다.

unzip joomla.zip -d /var/www/html/joomla

다음으로 Joomla 디렉터리의 소유권과 권한을 변경합니다.

chown -R apache:apache /var/www/html/joomla/
chmod -R 775 /var/www/html/joomla/

완료되면 다음 단계로 진행할 수 있습니다.

Joomla용 Apache 구성

다음으로 Joomla용 Apache 가상 호스트 구성 파일을 만들어야 합니다. 다음 명령으로 만들 수 있습니다.

nano /etc/httpd/conf.d/joomla.conf

다음 코드를 추가합니다.

<VirtualHost *:80>
   ServerAdmin 
   DocumentRoot "/var/www/html/joomla"
   ServerName joomla.example.com
   ErrorLog "/var/log/httpd/example.com-error_log"
   CustomLog "/var/log/httpd/example.com-access_log" combined

<Directory "/var/www/html/joomla">
   DirectoryIndex index.html index.php
   Options FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>
</VirtualHost>

파일을 저장하고 닫은 다음 Apache 서비스를 다시 시작하여 구성 변경 사항을 적용합니다.

systemctl restart httpd

이제 다음 명령을 사용하여 Apache 웹 서버의 상태를 확인할 수 있습니다.

systemctl status httpd

다음과 같은 결과가 표시됩니다.

? httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           ??php-fpm.conf
   Active: active (running) since Fri 2022-04-15 08:52:59 UTC; 3s ago
     Docs: man:httpd.service(8)
 Main PID: 4749 (httpd)
   Status: "Started, listening on: port 80"
    Tasks: 213 (limit: 11412)
   Memory: 24.3M
   CGroup: /system.slice/httpd.service
           ??4749 /usr/sbin/httpd -DFOREGROUND
           ??4751 /usr/sbin/httpd -DFOREGROUND
           ??4752 /usr/sbin/httpd -DFOREGROUND
           ??4753 /usr/sbin/httpd -DFOREGROUND
           ??4754 /usr/sbin/httpd -DFOREGROUND

Apr 15 08:52:59 linux systemd[1]: httpd.service: Succeeded.
Apr 15 08:52:59 linux systemd[1]: Stopped The Apache HTTP Server.
Apr 15 08:52:59 linux systemd[1]: Starting The Apache HTTP Server...

Apache 구성을 마치면 다음 단계로 진행할 수 있습니다.

Joomla용 방화벽 구성

다음으로 방화벽을 통해 HTTP 및 HTTPS 서비스를 허용해야 합니다. 다음 명령으로 허용할 수 있습니다.

firewall-cmd --add-service=http --zone=public --permanent 
firewall-cmd --add-service=https --zone=public --permanent

다음으로 방화벽을 다시 로드하여 변경 사항을 적용합니다.

firewall-cmd --reload

Joomla 웹 설치 마법사 액세스

이제 웹 브라우저를 열고 URL http://joomla.example.com을 사용하여 Joomla 설치에 액세스하십시오. 다음 화면으로 리디렉션됩니다.

언어를 선택하고 웹사이트 이름을 입력한 다음 로그인 데이터 설정을 클릭하십시오. 관리자 구성 화면이 표시됩니다.

관리자 사용자 이름과 암호를 제공하고 데이터베이스 연결 설정을 클릭합니다. 다음 화면이 표시됩니다.

데이터베이스 이름, 사용자 이름, 암호를 제공하고 Joomla 설치 버튼을 클릭합니다. Joomla가 설치되면 다음 화면이 표시됩니다.

관리자 열기 버튼을 클릭합니다. Joomla 로그인 화면이 나타납니다.

관리자 사용자 이름, 암호를 제공하고 로그인 버튼을 클릭합니다. 다음 화면에 Joomla 대시보드가 표시되어야 합니다.

Lets Encrypt SSL로 Joomla CMS 보호

다음으로 웹사이트에 Lets Encrypt SSL을 설치하려면 Certbot 클라이언트를 설치해야 합니다. 다음 명령으로 설치할 수 있습니다.

dnf install epel-release -y
dnf install certbot python3-certbot-apache

그런 다음 다음 명령을 사용하여 lets 도메인에 대한 SSL 인증서를 가져와 설치합니다.

certbot --apache -d joomla.example.com

이메일 주소를 제공하고 서비스 약관에 동의하라는 메시지가 표시됩니다.

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): 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, 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
Account registered.
Requesting a certificate for joomla.example.com
Performing the following challenges:
http-01 challenge for joomla.example.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/httpd/conf.d/joomla.conf
Redirecting all traffic on port 80 to ssl in /etc/httpd/conf.d/joomla.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://joomla.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: ).


IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/joomla.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/joomla.example.com/privkey.pem
   Your certificate will expire on 2022-07-09. 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

결론

축하합니다! Apache와 함께 Joomla CMS를 성공적으로 설치했으며 Alma Linux 8에 SSL을 허용합니다. 멋진 Joomla CMS를 사용하여 이제 프로그래밍이나 코딩 지식 없이도 자신의 웹 사이트를 구축할 수 있습니다. 질문이 있으시면 주저하지 마시고 문의해 주십시오.