解决SecureCRT不能保存 freebsd 密码

当连接centos时,SecureCRT会提醒你是否保存密码:

但是连接freebsd时,却不提醒是否保存,而是每次都需要输入密码,感觉在没有设置密钥的情况下就很麻烦。
原因:
默认SSH配置是keyboard-interactive authentication,所以你不能保存密码。
解决办法:
vi /etc/ssh/sshd_config找到#PasswordAuthentication no修改为PasswordAuthentication yes
重新启动ssh服务:
/etc/rc.d/sshd restart
再次连接,提醒窗口出现。

...

Failed to initialize storage module: files解决

将phpmyadmin从centos移植到bsd下,php从5.2.9升级为了5.2.10,打开phpmyadmin 报错
Failed to initialize storage module: files
网上的解决方法有:
打开你的php.ini文件
找到这一段
Copy code[Session]; Handler used to store/retrieve data.session.save_handler = files
如果你的session.save_handler = user
就有可能出现这个问题
改为files即可
Copy code[Session]; Handler used to store/retrieve data.session.save_handler = files
而我的则是files。怪了。怪异临时目录的问题。取消
;session.save_path = “/tmp”

rsync 3.0.5 - ERROR: buffer overflow in recv_file_entry

环境:freebsd 7.2 X64
RSYNC:3.05
同步时报错:
ERROR: buffer overflow in receive_file_entry [receiver]rsync error: error allocating core memory buffers (code 22) at util.c(121)[receiver=2.6.9]
解决方法:
下载源码包修改rsync.h重新编译
wget http://rsync.samba.org/ftp/rsync/src/rsync-3.0.6.tar.gztar -xzvf rsync-3.0.6.tar.gzcd rsync-3.0.6./configure –prefix=/usr/local/tools/rsync/
#—
vi rsync.h 搜索
#ifndef MAXPATHLEN 在之前加上#undef MAXPATHLEN
make && make install
国外资料参考:
This is the error rsync gives when t...

Linux及FreeBSD下查看CPU信息的方法

一、Linux
查看cpu信息:
[junjie2@ljj ~]$ cat /proc/cpuinfo
二、Freebsd

大致下面几个可以显示 参考下:
dmesg 最简单的方法
freebsd# cat /var/run/dmesg.boot |grep CPU
sysctl hw.model 看cpuid
sysctl machdep.tsc_freq 看cpu频率
另个方法:
sysctl -a | egrep -i ‘hw.machine|hw.model|hw.ncpu’
或者直接通过ports
cd /usr/ports/misc/cpuid
 
make install clean
然后
可以直接通过cpuid来查看
/usr/local/bin/cpuid

...

FreeBSD 下mount ISO

在FB5.0以前是采用vnconfig来实现的, 5.x的版本中改用mdconfig (’md’ stands for ‘memory disks’)。
1、首先确保你的内核配置文件中包含:
代码:device md
一般来说默认的GENERIC配置中已经有该项目了,如果不幸没有,请修改后再重新编译内核。
2、mdconfig的使用:可以从man那里得到足够的信息。对于mount一个iso文件,常见的做法是:
代码:
#mdconfig -a -t vnode -f ./myisofile.iso -u 1
参数 a 表示 attach一个memory disk ; -t vnode表示memory disk type为vnode; -f 表示使用该vn...

apxs: Command not found.

在apache的bin目录运行apxs出错
./apxs: Command not found
# vi apxs
#!/replace/with/path/to/perl/interpreter -w
换成 perl 的位置(我的/usr/bin/perl)
最终变成
#!/usr/bin/perl -w
可以
which perl
查看perl的位置

...

error: previous definition of ap_hack_apr_version_string was here

环境:freebsd 7 x64
编译apache2.2.11在make时出错:
exports.c:1653: error: redefinition of ‘ap_hack_apr_version_string’exports.c:1022: error: previous definition of ‘ap_hack_apr_version_string’ was heremake[2]: *** [exports.lo] Error 1make[2]: Leaving directory `/usr/local/apache2.2.11/server’make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/apache2.2.11/server’make: *** [all-recursive] Error 1
解决办法:
在configure后加上
–with-included-apr
即可
编译通过

...

freebsd下切换到root下su: Sorry 的解决办法

在FreeBSD下,通过ssh客户端连接到FreeBSD端,用普通的用户登录,执行下列命令报错:
$ su rootsu: Sorry$ susu: Sorry$
在FreeBSD上要使用su命令成为root用户,不但要知道root的口令,还需要经过特别设置,否则就不能成功使用这个命令。这是因为 FreeBSD对执行su命令的用户进行了更严格的限制,能使用su命令的用户必须属于wheel组(root的基本属组,组ID为0),否则就不能通过这个命令成为root用户。因此需要编辑组设置文件/etc/group,将需要超级用户权力的管理成员加入到wheel组中。
从终...

freebsd下安装rz,sz上传下载工具(rzsz)

freebsd下安装rz,sz上传下载工具(rzsz)
安装包下载:
http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
<coolcode linenum=”off”>
tar -xzvf rzsz-3.48.tar.gz
cd src
</coolcode>
修改Makefile第四行OFLAG= -O 为 OFLAG= -O -DREGISTERED
否则,编译后,在上传下载完成都会提示:
<coolcode linenum=”off”>
            **** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
      </coolcode>
<coolcode linenum=”off”>
xok# make posix