웹사이트 검색

Ubuntu 20.04에 Gibbon LMS를 설치하는 방법


이 튜토리얼은 다음 OS 버전에 대해 존재합니다.

  • 우분투 20.04(Focal Fossa)
  • 우분투 16.04(Xenial Xerus)

이 페이지에서

  1. 전제 조건
  2. 시작하기\n
  3. Apache, MariaDB 및 PHP 설치
  4. MariaDB 데이터베이스 구성
  5. Gibbon 설치
  6. Gibbon용 Apache 구성
  7. Gibbon 웹 인터페이스 액세스
  8. Lets Encrypt SSL로 Gibbon 보호\n
  9. 결론

Gibbon은 교사, 학생, 학부모 및 지도자를 위해 특별히 설계된 무료 오픈 소스 학교 관리 시스템입니다. 교사가 학생을 찾고, 연락하고, 도울 수 있도록 도와줍니다. 이를 통해 교사는 하나의 간소화된 프로세스에서 작업을 계획, 교육, 수집, 평가 및 반환할 수 있습니다. 모든 정보를 한 곳에서 사용할 수 있게 해주는 훌륭하고 효율적인 원스톱 상점 도구입니다. 교사가 이동 중에 모든 학생 세부 정보에 액세스하는 데 도움이 되는 간단한 웹 기반 인터페이스가 함께 제공됩니다.

이 튜토리얼에서는 Ubuntu 20.04 서버에서 Lets Encrypt SSL을 사용하여 Gibbon LMS를 설치하는 방법을 보여줍니다.

전제 조건

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

시작하기

먼저 시스템 패키지를 최신 버전으로 업데이트하는 것이 좋습니다. 다음 명령으로 업데이트할 수 있습니다.

apt-get update -y

모든 패키지가 업데이트되면 다음 단계로 진행할 수 있습니다.

Apache, MariaDB 및 PHP 설치

다음으로 시스템에 Apache 웹 서버, MariaDB, PHP 및 기타 PHP 확장을 설치해야 합니다. 다음 명령으로 모두 설치할 수 있습니다.

apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-sqlite3 php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-xml php-cli php-zip unzip git -y

모든 패키지가 설치되면 php.ini 파일을 편집하고 원하는 값을 설정합니다.

nano /etc/php/7.4/apache2/php.ini

필요한 값으로 다음 줄을 변경합니다.

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

완료되면 파일을 저장하고 닫습니다. 그런 다음 다음 단계를 진행할 수 있습니다.

MariaDB 데이터베이스 구성

다음으로 Gibbon에 대한 데이터베이스와 사용자를 생성해야 합니다. 먼저 다음 명령을 사용하여 MySQL 셸에 로그인합니다.

mysql

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

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

다음으로 다음 명령을 사용하여 Gibbon 데이터베이스에 모든 권한을 부여합니다.

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

다음으로 권한을 플러시하고 다음 명령을 사용하여 MySQL 셸을 종료합니다.

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

데이터베이스가 구성되면 다음 단계를 진행할 수 있습니다.

기본 설치

먼저 공식 웹사이트에서 최신 버전의 Gibbon을 다운로드해야 합니다. 다음 명령으로 다운로드할 수 있습니다.

wget https://github.com/GibbonEdu/core/archive/v20.0.00.zip

다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일의 압축을 풀 수 있습니다.

unzip v20.0.00.zip

그런 다음 다음 명령을 사용하여 추출된 디렉터리를 Apache 루트 디렉터리로 이동합니다.

mv core-20.0.00 /var/www/html/gibbon

다음으로 다음 명령을 사용하여 Gibbon의 소유권과 권한을 변경합니다.

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

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

Gibbon용 Apache 구성

다음으로 Gibbon을 서비스하도록 Apache를 구성해야 합니다. 이렇게 하려면 다음 명령을 사용하여 Apache 가상 호스트 구성 파일을 만듭니다.

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

다음 줄을 추가합니다.

<VirtualHost *:80>
     ServerAdmin 
     DocumentRoot /var/www/html/gibbon
     ServerName gibbon.example.com

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
    
     <Directory /var/www/html/gibbon/>
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*) index.php [PT,L]
    </Directory>
</VirtualHost>

완료되면 파일을 저장하고 닫습니다. 그런 다음 다음 명령어를 실행하여 Gibbon 가상 호스트를 사용 설정합니다.

a2ensite gibbon.conf

다음으로 Apache 재작성 모듈을 활성화하고 Apache 서비스를 다시 시작하여 chconfigurationg anges를 적용합니다.

a2enmod rewrite
systemctl restart apache2

이 시점에서 Apache 웹 서버는 Gibbon LMS를 제공하도록 구성됩니다. 완료되면 다음 단계로 진행할 수 있습니다.

Gibbon 웹 인터페이스에 액세스

이제 웹 브라우저를 열고 URL http://gibbon.example.com을 사용하여 Gibbon 웹 인터페이스에 액세스하십시오. 다음 페이지로 리디렉션됩니다.

모든 시스템 요구 사항을 확인하고 영어를 선택한 후 제출 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

데이터베이스 이름, 사용자 이름, 암호를 제공하고 제출 버튼을 클릭하십시오. 다음 페이지가 표시됩니다.

계정 구성, 시스템 설정 및 조직 설정을 제공한 다음 제출 버튼을 클릭하십시오. 설치가 완료되면 다음 페이지가 표시됩니다.

다음으로 Gibbon 홈페이지로 이동을 클릭하면 다음 페이지에 Gibbon 로그인 페이지가 표시됩니다.

관리자 사용자 이름, 암호를 제공하고 로그인 버튼을 클릭합니다. 다음 페이지에서 Gibbon 대시보드를 볼 수 있습니다.

Lets Encrypt SSL로 Gibbon 보호

다음으로 Lets Encrypt SSL로 웹 사이트를 보호하는 것이 좋습니다. 먼저 다음 명령을 사용하여 Certbot 클라이언트를 설치합니다.

apt-get install python3-certbot-apache -y

설치가 완료되면 다음 명령을 실행하여 Lets Encrypt SSL로 웹 사이트를 보호하십시오.

certbot --apache -d gibbon.example.com

아래와 같이 이메일을 제공하고 서비스 약관에 동의하라는 메시지가 표시됩니다.

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 gibbon.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/gibbon-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/gibbon-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/gibbon-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 키를 눌러 웹사이트에 Lets Encrypt SSL을 설치합니다.

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/gibbon.conf to ssl vhost in /etc/apache2/sites-available/gibbon-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://gibbon.example.com

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/gibbon.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/gibbon.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

이제 URL https://gibbon.example.com을 사용하여 안전하게 Gibbon LMS에 액세스할 수 있습니다.

결론

축하합니다! Ubuntu 20.04에서 Lets encrypt SSL을 사용하여 Gibbon LMS를 성공적으로 설치 및 구성했습니다. 이제 학교에서 쉽게 구현하고 Gibbon에서 새로운 기능을 탐색할 수 있습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.