Published on Wednesday, February 27th, 2008 at 10:00 am

==================================
Install Roundcube on FreeBSD 6.3
==================================

1. #cd /usr/ports/mail/roundcube/
2. #make config

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for roundcube 0.1.20080104 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [X] MYSQL Use MySQL backend x x
x x [X] PGSQL Use PostgreSQL backend x x
x x [ ] SQLITE Use SQLite backend (php5 only) x x
x x [X] SPELLCHECK Enable spellchecking x x
x x [X] LOCALCHECK Install internal spellchecker x x
x x x x
x x x x
x x x x
x x x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x [ OK ] Cancel x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

3. #make install clean

===> Found saved configuration for roundcube-0.1.20080104
=> roundcube-0.1-20080104.tar.bz2 doesn’t seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.farrokhi.net/roundcube/.
roundcube-0.1-20080104.tar.bz2 100% of 773 kB 4650 Bps 00m00s
===> Extracting for roundcube-0.1.20080104
=> MD5 Checksum OK for roundcube-0.1-20080104.tar.bz2.
=> SHA256 Checksum OK for roundcube-0.1-20080104.tar.bz2.
===> Patching for roundcube-0.1.20080104
===> Applying FreeBSD patches for roundcube-0.1.20080104
===> Configuring for roundcube-0.1.20080104
===> Installing for roundcube-0.1.20080104
===> roundcube-0.1.20080104 depends on file: /usr/local/include/php/main/php.h - found
===> roundcube-0.1.20080104 depends on file: /usr/local/lib/php/20020429/pcre.so - found
===> roundcube-0.1.20080104 depends on file: /usr/local/lib/php/20020429/mbstring.so - found
===> roundcube-0.1.20080104 depends on file: /usr/local/lib/php/20020429/session.so - found
===> roundcube-0.1.20080104 depends on file: /usr/local/lib/php/20020429/iconv.so - found
===> roundcube-0.1.20080104 depends on file: /usr/local/lib/php/20020429/mysql.so - found
===> Generating temporary packing list
===> Checking if mail/roundcube already installed
/bin/mkdir -p /usr/local/www/roundcube
/bin/mkdir -p /usr/local/share/doc/roundcube
——————————————————————
CONFIGURATION

. Create a new database and a database user for RoundCube
. Create database tables using the queries in file
‘SQL/*.initial.sql’
. Modify the files in config/* to suit your local environment
. Don’t forget to set db.inc.php mode to 600.
. Set the following php.ini options:
- error_reporting E_ALL & ~E_NOTICE (or lower)
- file_uploads on (for attachment upload features)

UPGRADING

If you already had a previous version of RoundCube installed,
refer to the instructions in UPGRADING guide.
——————————————————————
===> Registering installation for roundcube-0.1.20080104
===> Cleaning for roundcube-0.1.20080104

4. #ll /usr/local/share/doc/roundcube/

total 58
-r–r–r– 1 root wheel 29587 Feb 13 18:23 CHANGELOG
-r–r–r– 1 root wheel 4224 Feb 13 18:23 INSTALL
-r–r–r– 1 root wheel 15129 Feb 13 18:23 LICENSE
-r–r–r– 1 root wheel 3025 Feb 13 18:23 README
-r–r–r– 1 root wheel 1837 Feb 13 18:23 UPGRADING

5. #more /usr/local/share/doc/roundcube/README
6. #more /usr/local/share/doc/roundcube/INSTALL
7. #cd /usr/local/www/roundcube/
8. #ll

total 26
drwxr-xr-x 2 www www 512 Jan 4 16:25 SQL
drwxr-xr-x 2 www www 512 Jan 4 16:25 bin
drwxr-xr-x 2 www www 512 Feb 13 18:23 config
-r–r–r– 1 www www 11565 Jan 4 16:25 index.php
drwxr-xr-x 2 www www 512 Jan 4 16:25 logs
drwxr-xr-x 7 www www 512 Jan 4 16:25 program
drwxr-xr-x 3 www www 512 Jan 4 16:25 skins
drwxr-xr-x 2 www www 512 Jan 4 16:25 temp

9. #cd SQL/
10.#mysql -u root -p

10.1) Enter password: XXXXXX

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.0.51-log FreeBSD port: mysql-server-5.0.51

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

10.2) mysql> create database roundcube;
Query OK, 1 row affected (0.07 sec)

10.3) mysql> GRANT ALL ON roundcube.* TO admin@localhostIDENTIFIED BY ‘xxxxxx’;
Query OK, 0 rows affected (0.07 sec)

10.4) mysql> flush privileges;
Query OK, 0 rows affected, 2 warnings (0.04 sec)

10.5) mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |


| roundcube | <=== new database;


+——————–+
19 rows in set (0.54 sec)

10.6) mysql> quit
Bye

11. #ll

total 36
-r–r–r– 1 www www 7608 Jan 4 16:25 mssql.initial.sql
-r–r–r– 1 www www 3855 Jan 4 16:25 mysql.initial.sql
-r–r–r– 1 www www 1845 Jan 4 16:25 mysql.update-0.1a.sql
-r–r–r– 1 www www 750 Jan 4 16:25 mysql.update.sql
-r–r–r– 1 www www 4147 Jan 4 16:25 mysql5.initial.sql
-r–r–r– 1 www www 4745 Jan 4 16:25 postgres.initial.sql
-r–r–r– 1 www www 457 Jan 4 16:25 postgres.update.sql
-r–r–r– 1 www www 3650 Jan 4 16:25 sqlite.initial.sql
-r–r–r– 1 www www 957 Jan 4 16:25 sqlite.update.sql

12. #mysql -u root -p roundcube < mysql.initial.sql

Enter password: xxxxxx

13. #mysql -u root -p

13.1) Enter password: xxxxxx
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.0.51-log FreeBSD port: mysql-server-5.0.51

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

13.2) mysql> use roundcube;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
13.3) mysql> show tables;
+———————+
| Tables_in_roundcube |
+———————+
| cache |
| contacts |
| identities |
| messages |
| session |
| users |
+———————+
13.4) 6 rows in set (0.00 sec)

13.5 ) mysql> quit
Bye

14. # cd ../config/
15. #ll

total 34
-r–r–r– 1 www www 31 Jan 4 16:25 .htaccess
-r–r–r– 1 www www 2286 Feb 13 18:23 db.inc.php
-r–r–r– 1 www www 2286 Jan 4 16:25 db.inc.php.dist
-r–r–r– 1 www www 10441 Feb 13 18:23 main.inc.php
-r–r–r– 1 www www 10441 Feb 13 18:22 main.inc.php.dist

16. #chmod 600 db.inc.php

17. #ll

total 34
-r–r–r– 1 www www 31 Jan 4 16:25 .htaccess
-rw——- 1 www www 2286 Feb 13 18:23 db.inc.php <=== new permission
-r–r–r– 1 www www 2286 Jan 4 16:25 db.inc.php.dist
-r–r–r– 1 www www 10441 Feb 13 18:23 main.inc.php
-r–r–r– 1 www www 10441 Feb 13 18:22 main.inc.php.dist

18. #pico -w db.inc.php

//$rcmail_config[’db_dsnw’] = ‘mysql://roundcube:pass@localhost/roundcubemail’;
$rcmail_config[’db_dsnw’] = ‘mysql://admin:xxxxxx@localhost/roundcube’;

19. #pico -w /usr/local/etc/apache22/extra/httpd-vhosts.conf

Alias /webmail2 /usr/local/www/roundcube
<Directory /usr/local/www/roundcube>
AllowOverride none
Options MultiViews Includes FollowSymLinks
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
</Directory>

20. #/usr/local/etc/rc.d/apache22 restart

Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 16270.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.

=======================
Install courier-imap
=======================

1. #cd /usr/ports/mail/courier-imap/
2. #make build-depends-list
/usr/ports/devel/gmake
/usr/ports/lang/perl5.8
/usr/ports/security/courier-authlib-base

3. #make config

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for courier-imap 4.1.3,1 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [X] OPENSSL Build with OpenSSL support x x
x x [ ] FAM Build in fam support for IDLE command x x
x x [ ] DRAC Build in DRAC support x x
x x [X] TRASHQUOTA Include deleted mails in the quota x x
x x [ ] GDBM Use gdbm db instead of system bdb x x
x x [ ] IPV6 Build with IPv6 support x x
x x [X] AUTH_LDAP LDAP support x x
x x [X] AUTH_MYSQL MySQL support x x
x x [X] AUTH_PGSQL PostgreSQL support x x
x x [X] AUTH_USERDB Userdb support x x
x x [ ] AUTH_VCHKPW Vpopmail/vchkpw support x x
x x x x
x x x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x [ OK ] Cancel x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

4. #make install clean

gmake[1]: Leaving directory `/usr/ports/mail/courier-imap/work/courier-imap-4.1.3′
In case you use authpam, you should put the following lines
in your /etc/pam.d/imap
auth required pam_unix.so try_first_pass
account required pam_unix.so try_first_pass
session required pam_permit.so

You will have to run /usr/local/share/courier-imap/mkimapdcert to create
a self-signed certificate if you want to use imapd-ssl.
And you will have to copy and edit the *.dist files to *
in /usr/local/etc/courier-imap.

===> Compressing manual pages for courier-imap-4.1.3,1
===> Registering installation for courier-imap-4.1.3,1
===> SECURITY REPORT:
This port has installed the following files, which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/courier-imap/couriertcpd
/usr/local/bin/couriertls

This port has installed the following startup scripts, which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/courier-imap-pop3d-ssl.sh
/usr/local/etc/rc.d/courier-imap-imapd-ssl.sh
/usr/local/etc/rc.d/courier-imap-imapd.sh
/usr/local/etc/rc.d/courier-imap-pop3d.sh

If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type ‘make deinstall’
to deinstall the port if this is a concern.

For more information, and contact details about the security
status of this software, see the following webpage:
http://www.courier-mta.org/imap/

5. #cd /etc/pam.d/
6. #cp imap imap.ori
7. #pico -w imap

auth required pam_unix.so try_first_pass
account required pam_unix.so try_first_pass #<=== new config
session required pam_permit.so #<=== newconfig

8. #ll /usr/local/etc/rc.d/



-r-xr-xr-x 1 root wheel 1528 May 22 10:12 courier-authdaemond
-r-xr-xr-x 1 root wheel 959 May 22 10:34 courier-imap-imapd-ssl.sh
-r-xr-xr-x 1 root wheel 898 May 22 10:34 courier-imap-imapd.sh
-r-xr-xr-x 1 root wheel 959 May 22 10:34 courier-imap-pop3d-ssl.sh
-r-xr-xr-x 1 root wheel 898 May 22 10:34 courier-imap-pop3d.sh


9. #pico -w /etc/rc.conf

===> Add config

# POP3 and IMAP service#
courier_authdaemond_enable=”YES”
courier_imap_pop3d_enable=”YES”
courier_imap_imapd_enable=”YES”
courier_imap_pop3d_ssl_enable=”YES”
courier_imap_imapd_ssl_enable=”YES”

10. #/usr/local/etc/rc.d/courier-authdaemond start
11. #/usr/local/etc/rc.d/courier-imap-pop3d start
12. #/usr/local/etc/rc.d/courier-imap-pop3d-ssl start
13. #/usr/local/etc/rc.d/courier-imap-imapd start
14. #/usr/local/etc/rc.d/courier-imap-imapd-ssl start

ref : www.thaibsd.com

Related Posts

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>