Ubuntu 20.04에 ElkArte 포럼 소프트웨어를 설치하는 방법
이 페이지에서
- 전제 조건
- Apache, PHP 및 MariaDB 설치
- MariaDB 데이터베이스 구성
- ElkArte 다운로드
- ElkArte용 Apache 구성
- Lets Encrypt SSL로 안전한 ElkArte\n
- ElkArte 웹 인터페이스 액세스
- 결론
ElkArte는 Simple Machines Forum을 기반으로 하는 강력한 무료 오픈 소스 커뮤니티 포럼 구축 소프트웨어입니다. PHP로 작성되었으며 모바일 및 무선 장치에 완벽하게 반응하는 커뮤니티 포럼을 만들 수 있습니다. 모든 기능을 갖춘 커뮤니티 포럼에 필요한 모든 기능을 즉시 제공하도록 설계되었습니다.
ElkArte는 쉽게 사용자 정의할 수 있는 간단하고 직접적인 포럼 플랫폼을 찾고 있다면 올바른 선택입니다.
이 튜토리얼에서는 Ubuntu 20.04에서 Lets Encrypt SSL을 사용하여 ElkArte를 설치하는 방법을 보여줍니다.
전제 조건
- Ubuntu 20.04를 실행하는 서버.\n
- 서버를 가리키는 유효한 도메인 이름입니다.\n
- 서버에 루트 암호가 구성되어 있습니다.\n
Apache, PHP 및 MariaDB 설치
ElkArte는 PHP를 기반으로 웹 서버에서 실행되며 MariaDB를 데이터베이스 백엔드로 사용합니다. 따라서 서버에 Apache, MariaDB, PHP 및 기타 PHP 확장을 설치해야 합니다. 다음 명령을 사용하여 모든 패키지를 설치할 수 있습니다.
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
모든 패키지가 설치되면 php.ini 파일을 열고 몇 가지 유용한 설정을 조정합니다.
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
파일을 저장하고 닫은 다음 Apache 서비스를 다시 시작하여 변경 사항을 적용합니다.
systemctl restart apache2
MariaDB 데이터베이스 구성
먼저 MariaDB 설치를 보호하고 다음 명령을 사용하여 MariaDB 루트 암호를 설정합니다.
mysql_secure_installation
아래와 같이 모든 질문에 답하십시오.
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
그런 다음 다음 명령을 사용하여 MariaDB 셸에 로그인합니다.
mysql -u root -p
로그인 후 ElkArte에 대한 데이터베이스 및 사용자를 생성합니다.
MariaDB [(none)]> CREATE DATABASE elkdb;
MariaDB [(none)]> CREATE USER 'elk'@'localhost' IDENTIFIED BY 'password';
그런 다음 다음 명령을 사용하여 elkdb에 모든 권한을 부여합니다.
MariaDB [(none)]> GRANT ALL ON elkdb.* TO 'elk'@'localhost' WITH GRANT OPTION;
그런 다음 권한을 플러시하고 다음 명령을 사용하여 MariaDB 셸을 종료합니다.
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
데이터베이스가 구성되면 다음 단계로 진행할 수 있습니다.
다운로드
먼저 다음 명령을 사용하여 Git 리포지토리에서 최신 버전의 ElkArte를 다운로드합니다.
wget https://github.com/elkarte/Elkarte/releases/download/v1.1.6/ElkArte_v1-1-6_install.zip
다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일을 Apache 웹 루트 디렉터리에 압축 해제합니다.
unzip ElkArte_v1-1-6_install.zip -d /var/www/html/elkarte
그런 다음 다음 명령을 사용하여 elkarte 디렉토리에 적절한 권한을 부여하십시오.
chown -R www-data:www-data /var/www/html/elkarte/
chmod -R 755 /var/www/html/elkarte/
완료되면 다음 단계로 진행할 수 있습니다.
ElkArte용 Apache 구성
다음으로 ElkArte에 대한 새로운 Apache 가상 호스트 구성 파일을 만듭니다.
nano /etc/apache2/sites-available/elkarte.conf
다음 줄을 추가합니다.
<VirtualHost *:80> ServerAdmin 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>
완료되면 파일을 저장하고 닫습니다. 그런 다음 Apache 가상 호스트를 활성화하고 다음 명령을 사용하여 모듈을 다시 작성합니다.
a2ensite elkarte.conf
a2enmod rewrite
마지막으로 Apache 서비스를 다시 시작하여 변경 사항을 구현합니다.
systemctl restart apache2
Lets Encrypt SSL로 안전한 ElkArte
먼저 Certbot Lets Encrypt Client를 설치하여 웹 사이트의 SSL을 관리합니다.
apt-get install certbot python3-certbot-apache -y
Certbot이 설치되면 다음 명령을 실행하여 웹 사이트용 Lets Encrypt SSL을 다운로드하고 설치합니다.
certbot --apache -d elk.linuxbuz.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 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
다음으로 아래와 같이 HTTP 트래픽을 HTTPS로 리디렉션할지 여부를 선택합니다.
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
2를 입력하고 Enter 키를 누르면 아래와 같이 설치가 완료됩니다.
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.
이 시점에서 ElkArte는 Lets Encrypt SSL로 보호됩니다.
ElkArte 웹 인터페이스에 액세스
이제 웹 브라우저를 열고 URL https://elk.linuxbuz.com을 입력하십시오. ElkArte 시작 페이지로 리디렉션됩니다.
계속 버튼을 클릭합니다. 데이터베이스 서버 설정 페이지가 표시되어야 합니다.
데이터베이스 세부 정보를 제공하고 계속 버튼을 클릭합니다. 포럼 설정 페이지가 표시됩니다.
포럼 URL, 포럼 이름을 제공하고 계속 버튼을 클릭합니다. 다음 페이지가 표시됩니다.
계속 버튼을 클릭합니다. 관리자 계정 생성 페이지가 표시됩니다.
관리자 사용자 이름, 비밀번호, 이메일을 제공하고 계속 버튼을 클릭합니다. 설치가 완료되면 다음 페이지가 표시됩니다.
새로 설치된 포럼을 클릭합니다. 다음 페이지에서 ElkArte 대시보드를 볼 수 있습니다.
결론
축하합니다! Apache와 함께 ElkArte를 성공적으로 설치했으며 Ubuntu 20.04에서 SSL을 암호화할 수 있습니다. 이제 ElkArte로 자신만의 커뮤니티 포럼을 쉽게 호스팅할 수 있습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.