Howto

共 127 篇文章。

笔记:大型ICP如何将qmail替换为postfix

Cheatsheets

假定你使用的是FreeBSD

  1. 在测试服务器上测试postfix配置文件,确认其能够与qmail提供同样的服务。
  2. 执行svc -d /services/qmail-smtpd,停止进信。
  3. 执行qmailctl flush,下发所有邮件,等待队列空。
阅读全文… ( 本文约 1389 字,阅读大致需要 3 分钟 )

How to make FreeBSD to permit several programs to play sound simutiously?

Development

You may have noticed that FreeBSD by default does not allow many programs to play sound at same time. For instance, you generally can not hear GAIM sound when you are hearing MP3.

Fortunately, this can be resolved if you have read the documentations. Now I write here so you can also Google it :-)

Add a single line into /etc/sysctl.conf:

hw.snd.pcm0.vchans=16

Then, reboot (or if you are careful enough, shut down all programs that is using sound subsystem, then run /etc/rc.d/sysctl restart)

阅读全文… ( 本文约 95 字,阅读大致需要 1 分钟 )

Keeping your ssh connection alive

Security

Sometimes, when you are in a NAT’ed environment, ssh connection may be dropped when the gateway is busy.

OpenSSH has provided a solution against this.

The option is called “ClientAliveInterval”. With this setting in your sshd_config, sshd(8) would send a ping message through the encrypted channel periodically, thus prevent the early drop.

The default setting is 15, meaning the ping period is 15 seconds.

阅读全文… ( 本文约 79 字,阅读大致需要 1 分钟 )

How to install FreeBSD without CD-ROM, Floppy nor PXE?

SysAdmin

Today I have experienced how to install FreeBSD from a USB device - quite simple so you can do it yourself :-)

First, initialize the USB solid state disk with bsdlabel(8):

bsdlabel -wB /dev/da0

Then, initialize a file system:

newfs -O1 /dev/da0a

Third, copy CDROM’s /boot to it.

And you can now boot from the USB disk.

阅读全文… ( 本文约 70 字,阅读大致需要 1 分钟 )