2012. 8. 8. 14:41

리눅스 폴더 전체 압축/해제

  • 리눅스 폴더 전체 압축/해제
  • tar, tar.gz., tgz
  • bz2

목차

 [숨기기

bzip2

  • 파일 확장자는 bz2

압축

tar -jcvf 파일명.bz2 폴더경로

압축 해제

tar -jxvf 파일명.bz2 -C 폴더경로

gzip

  • 파일 확장자는 tar.gz 또는 tgz

압축

tar -zcvf 파일명 폴더경로

압축 해제 - 하위 폴더

흔히 사용하는 간단한 유형이다. test.tgz 파일을 현재 폴더에 푼다. 그런데 보통 test 폴더를 포함하고 있어서 test 아래에 풀린다.

tar xvfz test.tgz

압축 해제 - 폴더 지정

tar -zxvf 파일명 -C 폴더경로
2012. 8. 8. 12:30

Upgrade.Roundcube.Webmail

This tutorial is used to upgrade Roundcube from old release to the latest release. Ideally, you can upgrade whichever old release to the latest Roundcube release with this tutorial. Post issues in our online support forum: http://www.iredmail.org/forum/

  • Backup current Roundcube database first.

Terminal:
# mysqldump -u root -p roundcubemail > /root/mysql-db-roundcubemail.sql

  • Download the latest Roundcube webmail here: http://roundcube.net/. Here we take 0.7.1 for example: /root/roundcubemail-0.7.1.tar.gz
  • Extract it in the right place.

Terminal:
# ---- For RHEL/CentOS/Scientific Linux ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown apache:apache roundcubemail-0.7.1/{temp,logs}

# ---- For Debian/Ubuntu ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/share/apache2/
# cd /usr/share/apache2/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown www-data:www-data roundcubemail-0.7.1/{temp,logs}

# ---- For Gentoo Linux ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown apache:apache roundcubemail-0.7.1/{temp,logs}

# ---- For openSUSE ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /srv/www/
# cd /srv/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown wwwrun:www roundcubemail-0.7.1/{temp,logs}

# ---- For FreeBSD ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/local/www/
# cd /usr/local/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown www:www roundcubemail-0.7.1/{temp,logs}

  • Copy config files db.inc.php and main.inc.php from old release to new release. For example:

Terminal:
# cp -p roundcubemail-0.5.2/config/{db.inc.php,main.inc.php} roundcubemail-0.7.1/config/

  • Remove symbol link and create a new one, link to new release:

Terminal:
# rm roundcubemail
# ln -s roundcubemail-0.7.1 roundcubemail

  • Enable Roundcube installer by update below setting in roundcubemail-0.7.1/config/main.inc.php:

Terminal:
$rcmail_config['enable_installer'] = true;

If the installer reports your server misses some required packages or PHP modules, please install them manually to fix them.

  • Set correct time zone in your PHP config file php.ini. For example:
    • On RHEL/CentOS/Scientific Linux, it's /etc/php.ini
    • On Debian/Ubuntu, it's /etc/php5/apache2/php.ini
    • On Gentoo Linux, it's /etc/php/apache2-php5.3/php.ini
    • On openSUSE, it's /etc/php5/apache2/php.ini
    • on FreeBSD, it's /usr/local/etc/php.ini

Terminal:
date.timezone = "Europe/Paris"

  • Restart Apache web server if you have new required packages or PHP modules installed.
  • Upgrade Roundcube database structure by importing shipped SQL file:

Terminal:
# mysql -uroot -p
mysql> USE roundcubemail;
mysql> SOURCE roundcubemail-0.7.1/SQL/mysql.update.sql;

  • Access Roundcube installer with this URL: httpS://your_server/mail/installer , it will validate required packages, PHP modules and database structure.
  • Roundcube installer also gives the way to download main.inc.php and db.inc.php files, please download them and replace your old config files. Because old config files might miss some parameters. Don't forget to fix file permission after replaced:

Terminal:
# ---- On RHEL/CentOS/Scientific Linux ----
# chown apache:apache roundcubemail-0.7.1/config/*

# ---- On Debian/Ubuntu ----
# chown www-data:www-data roundcubemail-0.7.1/config/*

# ---- On Gentoo Linux ----
# chown apache:apache roundcubemail-0.7.1/config/*

# ---- On openSUSE ----
# chown wwwrun:www roundcubemail-0.7.1/config/*

# ---- On FreeBSD ----
# chown www:www roundcubemail-0.7.1/config/*

  • After Roundcube installer finished upgrading process, disable installer in config file 'roundcubemail-0.7.1/config/main.inc.php' by updating below parameter:

Terminal:
$rcmail_config['enable_installer'] = false;

  • Restrict accessing to sensitive files:

Terminal:
# chmod 0000 roundcubemail-0.7.1/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING,installer,SQL}

That's all.


출처 : http://iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.Roundcube.Webmail

2012. 8. 8. 12:24

Roundcube Mail user interface...

Need Customizations to change the look and feel of the user interface? You can access the relevant CSS files under the default skins directory and begin editing the relevant styles inside common.css or mail.css files. For example if you want to change the color of the message selection bar, you may find and replace the color codes as follows;

# vi /usr/local/www/apache22/data/roundcube/skins/default/common.css
table.records-table tr.selected td
{
  color: #FFFFFF;
  background-color: #FF6000;
}
# vi /usr/local/www/apache22/data/roundcube/skins/default/mail.css
#messagelist tr.selected td
{
  color: #FFFFFF;
  background-color: #FF6000;
}

Adding plugins is a powerful way of making Roundcube more convenient client for satisfying the user habits. Here are the list of plugins I recommend you to install in the first instance;

jqueryui
automatic_addressbook
compose_addressbook
globaladdressbook
vcard_attachments
vacation
managesieve
2011. 6. 10. 20:01

Qmail Hacks on FreeBSD Site.

2011. 6. 1. 20:48

FreeBSD - Bash 쉘 설정

출처 : http://www.cyworld.com/ruo91/3730949


FreeBSD 에서 Bash 쉘 설정을 하는 방법입니다.
root 는 기본적으로 csh 를 사용하는데 이것을 bash 로 변경하는 방법 까지도 나와 있습니다. :D



Bash 를 바이너리로 받아와 설치 합니다.
yongbok# pkg_add -r bash

Bash 설치를 반영 해줍니다.
yongbok# rehash

Bash 가 설치 되있는지 확인 해봅니다.
yongbok# which bash
/usr/local/bin/bash
yongbok# pkg_info
bash-4.0.33         The GNU Project's Bourne Again SHell
gettext-0.17_1      GNU gettext package
libiconv-1.13.1     A character set conversion library

/etc/passwd 파일에 root 와 toor 관리자 계정이 사용하고 있는 쉘을 확인 합니다.
yongbok# cat /etc/passwd | egrep 'root|toor'
root:*:0:0:Charlie &:/root:/bin/csh
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin

root 와 toor 관리자 계정의 쉘을 Bash 로 변경 합니다.
yongbok# chsh -s bash root
chsh: user information updated
yongbok# chsh -s bash toor
chsh: user information updated

Bash 로 반영이 되었는지 확인 하기 위해서 SSH 원격을 다시 재로그인 해보면 됩니다.

yongbok# su toor
[root@yongbok ~]# echo $SHELL
/usr/local/bin/bash