小明的網誌

一個工程師的故事

By

好用的 Redmine

因最近要弄一個專案, 本來想用 google 試算本 + 一些 PM plugin 的工具, 來畫 Gantt 圖
但使用起來, 不是很順

在網路上逛逛後, 找到 Redmine, 本來只是在看 bug tracker 的東西, 只是沒有想到 Redmine 有幾乎完整的專案管理功能

它是用 Ruby + Rails 寫出來的, 在 FreeBSD 也可以安裝使用(花了一些功夫), 可參考這篇(http://cytseng.ibb.tw/?p=1040)

最後可以用它來畫 Gantt 啦, 如 FB 上的圖

Gantt

Redmine Gantt

By

安裝 roundcube

在很久以前就把 postfix 3.1 + clamav + amavisd-new + spam assassin + dovecot2 弄起來, 但忘了調那些東西了, 有空再來回想

之前也有 survey 不錯用的 webmail, 最後選擇 roundcube , 至少感覺介面簡單, 操作方便

FreeBSD 安裝又很簡單

cd /usr/ports/mail/roundcube
make all install

make config 的選項

DOCS, GD, NSC, PSPELL, MYSQL

而我是用 lighttpd 當 web server, 所以只要把 /usr/local/www/roundcube link 到 lighttpd 的 document root 之下就行, Ex:

cd /srv/web
ln -s /usr/local/www/roundcube [FQDN]

其中 [FQDN] 就是要用的網址

注意: 要確認 /usr/local/www/roundcube 目錄之下, 有幾個目錄的權限
所有的目錄或檔案都是 root:wheel , file: 0644, folder: 0755
除了 config/config.inc.php, logs, temp 要改成 www:www

cd /usr/local/www/roundcube/config
cp config.inc.php.sample config.inc.php
cd ..
chown -R www:www config/config.inc.php logs temp

之後透過 http[s]://[server ip/FQDN]/roundcube/installer 進行設定, 只要依上面所說的, 把所有需求調整完, 就能設定好 roundcube

並想辦法生出 mime.types and mimetypes.php, 但忘了如何產生了

等到 installer 的測試都沒有問題後, 要再改權限

cd /usr/local/www/roundcube
chmod 000 installer
chown root:wheel config/config.inc.php

並 disable installer 之功能

cd /usr/local/www/roundcube/config
vi config.inc.php

在最後一行加上 $config[‘enable_installer’] = False;

$config['enable_installer'] = False;

為了讓 roundcube 和 dovecot2 能在非 143 port 都能溝通, 需要修改 config.inc.php

$config['default_port'] = 1143;

這樣就能讓 roundcube 正常運作, 可利用 http[s]://[server ip / FQDN]/roundcube 進行連線使用

 

By

修改 dovecot port

當有需要修改 dovecot port 時, 利用 google 查到這篇

FreeBSD 10.3
dovecot 2.2.25

cd /usr/local/etc/dovecot/conf.d
vi 10-master.conf

找到 service imap-login 和 service pop3-login, 把以下內容進行修改
修改前

service imap-login {
  inet_listener imap {
    #port = 1143
  }

修改後

service imap-login {
  inet_listener imap {
    port = 1143
  }

修改前

service pop3-login {
  inet_listener pop3 {
    #port = 1110
  }

修改後

service pop3-login {
  inet_listener pop3 {
    port = 1110
  }

重新啟動 dovecot

/usr/local/etc/rc.d/dovecot restart

 

By

Git Server 搬家 + 安裝步驟

環境:
FreeBSD 10.3
Git 2.9.2

Step:
1. cd /usr/ports/devel/git ; make install clean
enable option:
CONTRIB, CURL, CVS, ICONV, NLS, P4, PCRE, PERL, SEND_EMAIL, SVN

2. setup /etc/rc.conf

git_daemon_enable="YES"
git_daemon_directory="/path/of/git/repository" # 存放 git repository 的地方
git_daemon_flags="--verbose --export-all --syslog --reuseaddr --enable=receive-pack --base-path=/path/of/git/repository --detach" # 一些 git 的參數

3. backup at old server and remove to new server
@old server

cd /path/of/git
tar cvfz /path/to/backup/folder/backupfile.tgz repository

@new server

scp old-server-ip:/path/to/backup/folder/backupfile.tgz /path/of/git
cd /path/of/git
tar zxvf backupfile.tgz
/usr/local/etc/rc.d/git_daemon restart

要重頭建立 git server 的話, 參考這篇

3.1 簡化版
@ old server

cd /path/of/git
tar cvfz - repository | ssh 'new server ip' "tar zxf - -C /path/of/git"

By

compile proftpd on FreeBSD

想讓 proftpd 支援 mysql
但 FreeBSD ports 裡的 proftpd 沒有直接支援

所以要加上這些

./configure --localstatedir=/var/run --libexecdir=/usr/local/libexec/proftpd \
--with-pkgconfig=libdata/pkgconfig --sysconfdir=/usr/local/etc \
--enable-ctrls --enable-dso --disable-sendfile --disable-ipv6 --enable-nls \
--enable-pcre --disable-memcache --with-shared=mod_ban:mod_copy:
mod_ctrls_admin:mod_deflate:mod_dynmasq:mod_exec:mod_ifsession:\
mod_ifversion:mod_qos:mod_quotatab:mod_quotatab_file:\
mod_quotatab_radius:mod_quotatab_sql:mod_radius:mod_ratio:\
mod_readme:mod_rewrite:mod_sftp:mod_sftp_pam:mod_sftp_sql:\
mod_shaper:mod_site_misc:mod_sql:mod_sql_mysql:mod_sql_passwd:\
mod_tls:mod_tls_shmcache:mod_unique_id:mod_wrap2:mod_wrap2_file:\
mod_wrap2_sql --with-includes=/usr/local/include \
--with-libraries=/usr/local/lib --prefix=/usr/local --mandir=/usr/local/man \
--infodir=/usr/local/info/ --build=amd64-portbld-freebsd9.1

By

Root on ZFS @ FreeBSD 9

ROOT ON ZFS FREEBSD 9 (UPDATED)

http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/

 

ROOT ON ZFS FREEBSD 9 (NON LEGACY MOUNTPOINT – 4K OPTIMIZED)

http://www.aisecure.net/2012/01/16/rootzfs/

By

安裝 vmware tools on FreeBSD 9

會有一點點小問題, 可以參考這篇來解決

http://www.rhyous.com/2012/05/09/installing-vmware-tools-on-freebsd-9-without-xorg/

Verified by MonsterInsights