Let's Encrypt SSL을 사용하여 Rocky Linux 8/AlmaLinux 8에 DokuWiki 설치 |
DokuWiki는 GPLv2에 따라 라이센스가 부여되고 PHP 프로그래밍 언어로 작성된 오픈 소스 위키입니다. DokuWiki는 매우 다양하며 데이터베이스가 필요하지 않습니다. MediaWiki와 더 유사하지만 가볍고 사용자 정의가 가능하므로 더 권장됩니다.
DokuWiki는 2004년 6월 Andreas Gohr에 의해 개발되었으며 첫 번째 공개 릴리스는 7월에 이루어졌습니다. 내장된 액세스 제어 및 인증 커넥터와 같은 여러 가지 개선을 통해 DokuWiki는 기능을 향상시키기 위해 커뮤니티에서 수많은 플러그인을 추가하여 기업 부문에서 유용해졌습니다.
DokuWiki는 다음과 같은 이유로 매우 선호됩니다:
- 설치 및 사용이 쉽습니다.
- 내장형 액세스 제어 목록
- 다양한 확장 기능
- 낮은 시스템 요구 사항에서 작동
- 50개 이상의 언어 지원
- 장치 독립적입니다.
- 전체 텍스트 검색 – 사용자가 위키에서 키워드와 구문을 검색할 수 있는 통합 색인 검색입니다.
DokuWiki는 다음과 같이 사용될 수 있습니다:
- 소프트웨어 매뉴얼
- 개인 노트
- 기업 기술 자료
- CMS – 인트라넷
- 프로젝트 작업공간
이 가이드를 끝까지 따르면 Rocky Linux 8/AlmaLinux 8 With Let's Encrypt SSL에 DokuWiki를 설치할 수 있습니다.
1. 서버 준비
시스템 패키지를 사용 가능한 최신 버전으로 업데이트하십시오.
sudo yum -y update시스템에 필요한 패키지를 설치하십시오.
sudo yum -y install git vim bash-completion curl wget unzip tar epel-release unzip socat호스트 이름을 설정합니다.
sudo hostnamectl set-hostname wiki.domain.com2. PHP 및 해당 확장 설치
DokuWiki는 PHP로 작성되었기 때문에 계속 진행하기 전에 PHP와 확장 기능을 설치해야 합니다. 이는 다음 명령을 사용하여 달성할 수 있습니다.
sudo dnf install php php-gd php-xml php-json설치가 완료되면 PHP 버전을 확인하세요.
$ php --version
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies3. Rocky Linux 8/AlmaLinux 8에 DokuWiki를 설치하세요.
DokuWiki의 최신 버전은 공식 DokuWiki 다운로드 페이지에서 다운로드할 수 있습니다. 다음과 같이 DokuWiki의 최신 안정 버전을 다운로드할 수도 있습니다:
sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgzDokuWiki 문서 루트 디렉터리를 만듭니다.
sudo mkdir -p /var/www/wiki파일을 추출하여 생성된 디렉터리로 이동합니다.
sudo tar xzf dokuwiki-stable.tgz --strip-components=1 -C /var/www/wiki/설치가 완료되면 DokuWiki 경로의 권한을 설정하세요.
sudo chown -R apache:apache /var/www/wiki4. DokuWiki용 SELinux 구성
SELinux를 활성화한 경우 생성된 DokuWiki 경로에 액세스할 수 있도록 아래 조정을 수행해야 합니다. 이를 수행하는 가장 쉬운 방법은 Apache 서비스에 대해서만 허용 모드로 전환하는 것입니다.
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wiki/conf(/.*)?"
sudo restorecon -Rv /var/www/wiki/conf
sudo restorecon -Rv /var/www/wiki/data
sudo setsebool -P httpd_can_network_connect on
sudo setsebool -P httpd_can_sendmail on
sudo setsebool -P httpd_unified 1
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wiki/lib/plugins(/.*)?"
sudo restorecon -Rv /var/www/wiki/lib/plugins
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wiki/lib/tpl(/.*)?"
sudo restorecon -Rv /var/www/wiki/lib/tpl5. DokuWiki용 Apache 웹 서버 구성
아래와 같이 DokuWiki용 가상 호스트 파일을 생성하겠습니다.
sudo vim /etc/httpd/conf.d/dokuwiki.conf파일에 아래 줄을 추가하세요.
<VirtualHost *>
ServerName wiki.domain.com
DocumentRoot /var/www/wiki
<Directory ~ "/var/www/wiki/(bin/|conf/|data/|inc/)">
<IfModule mod_authz_core.c>
AllowOverride All
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory>
ErrorLog /var/log/httpd/dokuwiki_error.log
CustomLog /var/log/httpd/dokuwiki_access.log combined
</VirtualHost>AllowOverride All을 활성화하면 .htaccess 파일의 이름이 아래와 같이 변경됩니다.
sudo cp /var/www/wiki/.htaccess{.dist,}아파치 시작 및 활성화
sudo systemctl start httpd && sudo systemctl enable httpd방화벽을 통해 HTTP를 허용합니다.
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --add-port=443/tcp --permanent
sudo firewall-cmd --reload6. DokuWiki 웹 인터페이스 접속
URL http://wiki.domain.com/install.php 또는 http://IP_address/install.php를 사용하여 웹을 통해 DokuWiki 구성을 진행하겠습니다.
위 페이지에서 필수 세부정보를 입력하세요. 또한 초기 ACL 정책에서 다음 설정을 지정합니다.
- 위키 열기 – 모두에게 공개
- 공개 위키 – 등록된 사용자가 모두 읽고 업로드하고 편집할 수 있습니다.
- 비공개 위키 – 등록된 사용자만 접근 가능
변경 사항을 저장하면 Dokuwiki가 준비됩니다.
새 DokuWiki를 클릭하여 홈페이지로 이동하세요.
사용자 자격 증명을 제공하여 로그인
성공적으로 로그인하면 관리 탭 아래에 아래와 같은 몇 가지 옵션이 있습니다.
사용자를 추가하려면 사용자 관리자를 클릭하세요.
세부정보를 입력하고 추가를 클릭하세요. 추가된 사용자는 아래와 같습니다.
추가된 사용자와 함께 "액세스 제어 목록 관리"에서 ACL을 설정하고 진행할 수 있습니다.
환영 페이지에서 아래와 같이 시작을 클릭하여 첫 번째 페이지를 만듭니다.
페이지에 선호하는 콘텐츠를 추가하세요.
아래와 같이 내용을 저장하고 미리 볼 수 있습니다.
이 시점에서는 install.php 파일을 삭제해도 안전합니다.
sudo rm /var/www/wiki/install.php7. Let's Encrypt SSL 인증서를 사용하여 DokuWiki를 보호하세요.
이제 우리는 HTTPS로 접근할 수 있는 DokuWiki 페이지를 보호하려고 합니다. 여기서는 Let’s Encrypt를 사용하여 도메인 이름에 대해 신뢰할 수 있는 SSL 인증서를 발급하겠습니다. 계속하기 전에 FQDN이 있는지 확인하세요.
시스템에 Certbot을 설치하십시오.
sudo dnf install certbot python3-certbot-apache설치가 완료되면 아래와 같이 도메인 이름에 대한 인증서를 발급합니다.
sudo certbot --apache표시된 대로 진행하세요.
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: wiki.domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for wiki.domain.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/wiki.domain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/wiki.domain.com/privkey.pem
This certificate expires on 2022-06-02.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for wiki.domain.com to /etc/httpd/conf.d/dokuwiki-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://wiki.domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
이제 HTTPS를 통해 Dokuwiki 페이지에 접속하세요.
그게 다야!
Let’s Encrypt SSL을 사용하여 Rocky Linux 8/AlmaLinux 8에 DokuWiki를 설치하는 방법에 대한 이 가이드가 큰 가치가 있었기를 바랍니다.
더 많은 내용에 관심이 있으십니까?
- Kubernetes 클러스터에 Wiki.js 설치 및 구성
- Nginx와 함께 Dokuwiki를 설치하고 CentOS 7에서 SSL을 암호화합시다
- CentOS 7에 DokuWiki 설치 및 구성 | 센트OS 8











