웹메일 설치 · 5 min read · Sep 25, 2025
우분투 18.04 LTS에 최신 RoundCube 웹메일 설치하는 방법

Roundcube는 PHP로 작성된 무료 오픈 소스 웹 기반 웹메일 솔루션입니다. 이는 웹 기반 IMAP 클라이언트이므로 웹 브라우저를 통해 이메일 서버에 접근할 수 있습니다. 데스크탑 메일 클라이언트를 통해 이메일을 읽고 보낼 필요가 없습니다. 이 튜토리얼은 우분투 18.04 LTS(Bionic Beaver)에서 Apache 웹 서버와 Let’s encrypt SSL 인증서로 보안된 RoundCube를 설치하는 방법을 보여줍니다.
RoundCube 기능
- MIME 지원, 메시지 검색 및 맞춤법 검사.
- 주소록을 위한 LDAP 디렉토리 통합.
- 여러 언어 지원.
- 공유/전역 폴더 및 IMAP ACL 지원.
- 빠른 메일박스 접근을 위한 내장 캐싱.
- 외부 SMTP 서버 및 IDNA 지원.
요구 사항
- 우분투 18.04 LTS가 실행되는 서버.
- sudo 권한이 있는 비루트 사용자.
LAMP 서버 설치
시작하기 전에 패키지 목록을 업데이트하고 보류 중인 업데이트를 설치해야 합니다:
sudo apt-get update
sudo apt-get upgrade그런 다음, 다음 명령어로 Apache와 MariaDB를 설치합니다:
sudo apt-get install apache2 mariadb-server php7.2 php7.2-gd php-mysql php7.2-curl php7.2-zip php7.2-ldap php7.2-mbstring php-imagick php7.2-intl php7.2-xml unzip wget curl -y모든 패키지가 설치되면 php.ini 파일에서 시간대 설정을 변경해야 합니다. 다음 명령어로 할 수 있습니다:
sudo nano /etc/php/7.2/apache2/php.ini다음과 같이 변경합니다:
date.timezone = Europe/Berlin파일을 저장하고 닫은 후, 다음 명령어로 Apache와 MariaDB 서비스를 시작하고 부팅 시 시작하도록 활성화합니다:
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mariadb
sudo systemctl enable mariadbRoundcube 다운로드
먼저, 시스템에 최신 버전의 Roundcube를 다운로드해야 합니다. 다음 명령어로 다운로드할 수 있습니다:
cd /tmp
wget https://github.com/roundcube/roundcubemail/releases/download/1.3.8/roundcubemail-1.3.8-complete.tar.gz다운로드가 완료되면 다음 명령어로 다운로드한 파일을 추출합니다:
tar -xvzf roundcubemail-1.3.8-complete.tar.gz다음으로, 추출된 디렉토리를 Apache 웹 루트 디렉토리로 이동합니다:
mv roundcubemail-1.3.8 /var/www/html/roundcube다음으로, roundcube 디렉토리에 적절한 권한을 부여합니다:
sudo chown -R www-data:www-data /var/www/html/roundcube
sudo chmod -R 775 /var/www/html/roundcube데이터베이스 구성
기본적으로 MariaDB 설치는 보안되지 않았습니다. 따라서 먼저 보안해야 합니다. 다음 스크립트를 실행하여 보안할 수 있습니다:
mysql_secure_installation아래와 같이 모든 질문에 답하십시오:
Change the password for root ? N
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? YMariaDB가 보안되면 다음 명령어로 MariaDB 셸에 로그인합니다:
mysql -u root -p루트 비밀번호를 입력한 후, Roundcube를 위한 데이터베이스와 사용자를 생성합니다:
MariaDB [(none)]> CREATE DATABASE roundcubedb;
MariaDB [(none)]> CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON roundcubedb.* to 'roundcube'@'localhost';‘password’라는 단어를 선택한 안전한 비밀번호로 교체하고 이 비밀번호를 기억하십시오. 나중에 roundcube 설치에 필요합니다. 다음으로, 권한을 플러시하고 다음 명령어로 MariaDB 셸에서 나옵니다:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;다음으로, roundcubedb 데이터베이스에 초기 테이블을 가져와야 합니다. 다음 명령어를 사용하여 할 수 있습니다:
cd /var/www/html/roundcube
mysql -u roundcube -p roundcubedb < SQL/mysql.initial.sql요청 시 roundcube 데이터베이스 사용자 비밀번호를 입력하십시오.
Roundcube를 위한 Apache 구성
다음으로, Roundcube를 위한 Apache 가상 호스트 파일을 생성해야 합니다. 다음 명령어로 할 수 있습니다:
sudo nano /etc/apache2/sites-available/roundcube.conf다음 줄을 추가합니다:
ServerName example.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/roundcube
ErrorLog ${APACHE_LOG_DIR}/roundcube_error.log
CustomLog ${APACHE_LOG_DIR}/roundcube_access.log combined
Options -Indexes
AllowOverride All
Order allow,deny
allow from all
example.com을 도메인 이름으로 교체하십시오. 파일을 저장하고 닫은 후, 다음 명령어로 가상 호스트 파일을 활성화합니다:
sudo a2ensite roundcube다음으로, Apache 재작성 모듈을 활성화하고 다음 명령어로 Apache 서버를 재시작합니다:
sudo a2enmod rewrite
sudo systemctl restart apache2RoundCube를 위한 Let’s encrypt로 SSL 활성화
이번 단계에서는 무료 Let’s encrypt SSL 인증서를 사용하여 RoundCube에 SSL을 활성화합니다. 첫 번째 단계는 SSL 인증서를 얻기 위해 사용할 certbot Let’s encrypt 클라이언트를 설치하는 것입니다.
sudo apt-get install certbot python-certbot-apache다음 명령어로 SSL 인증서를 요청합니다:
sudo certbot --apache중요: RoundCube 웹사이트에 사용하는 도메인 이름 또는 서브도메인은 SSL 인증서를 받기 위해 인터넷에서 접근 가능해야 합니다. Certbot이 몇 가지 질문을 할 것입니다. 아래 빨간색으로 된 답변을 참조하십시오.
root@server: 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 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-v01.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 EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: nWhich names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: roundcube.example.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
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for roundcube.example.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/roundcube-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/roundcube-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/roundcube-le-ssl.confPlease 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
Redirecting vhost in /etc/apache2/sites-enabled/roundcube.conf to ssl vhost in /etc/apache2/sites-available/roundcube-le-ssl.conf-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://roundcube.example.comYou should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=roundcube.example.com
-------------------------------------------------------------------------------IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/roundcube.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/roundcube.example.com/privkey.pem
Your cert will expire on 2019-06-25. 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이제 RoundCube vhost에 HTTPS로 접근할 수 있습니다.
웹메일 접근
이제 웹 브라우저를 열고 URL https://example.com/installer를 입력하십시오(예제 도메인 이름을 URL에 교체하십시오!). 다음 페이지로 리디렉션됩니다:

모든 요구 사항이 완료되면 다음 버튼을 클릭하십시오. 다음 페이지가 표시됩니다:
일반 구성:

로그 및 데이터베이스 설정:

여기에서 데이터베이스 설정 단계에서 생성한 roundcubedb의 데이터베이스 세부정보를 입력하십시오.
SMTP 및 IMAP 설정:

플러그인:

여기에서 필요에 따라 모든 세부정보를 제공한 후 구성 생성 버튼을 클릭하십시오. 다음 페이지가 표시됩니다:
다음으로 계속 버튼을 클릭하십시오. 다음 페이지가 표시됩니다:

이제 로그인 확인 버튼을 클릭하십시오. 설치가 완료되면 /var/www/html/roundcube/installer 디렉토리를 제거하십시오:
sudo rm -rf /var/www/html/roundcube/installer이제 URL http://your-ip-address 또는 http://your-domain.com을 사용하여 웹메일에 접근하고 이메일로 로그인하십시오.

RoundCube가 우분투 18.04 LTS에 성공적으로 설치되었습니다.
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.