作弊条:如何远程启用/上面的SoftUpdates
说明:这个实际上是一个workaround,不过我暂时没时间修这个bug。这是一个作弊条,主要目的在于解决这一特定问题而非阐述其背后的原理和最佳实践。
共 57 篇文章。
说明:这个实际上是一个workaround,不过我暂时没时间修这个bug。这是一个作弊条,主要目的在于解决这一特定问题而非阐述其背后的原理和最佳实践。
之前一直比较公开的一个秘密是,Google Toolbar实际上是可以在 FreeBSD 上运行的(注意不是通过 Linux ABI 支持)。不过 Firefox 3 发布之后,以前通过 Linux Firefox 安装 toolbar 这条路被堵住了,因此只好寻求新的解决途径。
It seems that a recent ThinkAdvantage update will cause FreeBSD boot manager to have some problem (A “Drive 0” will appear as fifth option, and all other options would not work except a beep). It is possible to recover from this situation by using FreeBSD LiveFS disc (for amd64 platform):
Start from CD-ROM;
Choose “Fixit” and “CD-ROM”;
Now you get the command line prompt;
Mount your hdd to /mnt/;
mv /boot /boot.old && ln -s /mnt2/boot /boot
mv /usr /usr.old && ln -s /mnt2/usr /usr
“boot0cfg -B /dev/ad4” (Note: your SATA controller should be in AHCI mode, otherwise it should be ad0)
Then you will be able to use boot0cfg to configure the boot partition. Reboot system then everything will go well.
我想这可能是很多人比较关心的问题,特别是希望用一台机器,多块网卡,甚至有多个网关来实现伪双线的同学。
默认情况下FreeBSD系统中配置的网关,是不会自动使用多个网卡的。网关会与某一块网卡关联,并且,默认网关只能有一个。
但是,我们经常会遇到一些比较复杂的情况。例如,你有两块网卡,并且都接入了同一个网段,使用同一个网关,此时,所有的流量都会从一块网卡出去,另一块网卡则没有出流量;另一种比较极端的情况是,你有网通、电信各一个IP,但只有1台机器,而且机房也不给做BGP(当然,这是伪双线,我个人强烈建议不要使用这种机房服务),标准的路由方式就不太好用了。这时候,我们可以借助 FreeBSD 内建的 pf (通过route-to规则)来完成一些比较复杂的功能。
防止下次再求助于archive。这是我用来给自己的SMTP/POP3/HTTPS服务器生成证书的全部命令行,仅限服务器证书部分。
cd /usr/local/CA
openssl req -nodes -new -x509 -keyout mykey.pem -out myreq.pem \
-days 365 -config openssl.cnf
openssl x509 -x509toreq -in myreq.pem -signkey mykey.pem -out tmp.pem
openssl ca -config openssl.cnf -policy policy_anything \
-out mycert.pem -infiles tmp.pem
rm -f tmp.pem
其实还是挺简单的。
HTTP_GET_VARS -> _GET
HTTP_POST_VARS -> _POST
HTTP_POST_FILES -> _FILES
HTTP_COOKIE_VARS -> _COOKIE
HTTP_SERVER_VARS -> _SERVER
半作弊条性质。
找到trac环境目录。
进入其下的conf,揪出trac.ini
编辑,找到下面的段落替换为类似的内容
[notification]
always_notify_owner = true
smtp_always_cc = !!你的邮件列表名字!!
smtp_password = !!密码!!
smtp_enabled = yes
smtp_replyto = !!回复给谁?通常是管理员或留空!!
smtp_port = 25
always_notify_reporter = yes
smtp_server = !!邮件服务器名字!!
smtp_from = !!邮件以谁的身份发出?通常是trac管理员!!
smtp_user = !!登录邮件服务器的用户名!!
以下内容为作弊条,仅供参考;只保证在FreeBSD下能用。
为postfix配置TLS的关键是产生自己的CA证书,并签署一年一续的服务证书。注意一定要保管好前者的私钥!
第一步,创建自签名CA:
mkdir /usr/local/etc/ca
cd /usr/local/etc/ca
mkdir certs crl newcerts private
echo 「01」 > serial
cp /dev/null index.txt
cp /etc/ssl/openssl.cnf openssl.cnf
vi openssl.cnf
传统上,SCM系统的用户登录有两种方式,一种是通过启动自己对应的服务,如cvs的cvs pserver或svn的svnserve、Apache DAV等等,而另一种方式是ssh,即不启动服务,而使用ssh来完成身份认证工作,如果通过,则通过ssh远程启动对应的服务,如cvs server和svnserve。