软件的配置

Contents
squid
ssh
ssh 无密码配置
SFS 服务器配置
Alsa
Mplayer 字幕配置
在apache 使用utf-8
.serverauth.????问题的解决
fcitx
普通用户使用ntfs
rsync 的@ERROR: chdir failed错误
DNS 服务器配置

topsquid

配置如下:
http_port 59.64.5.62:3128
cache_mem 100 MB
acl wang src "/home/arch/.proxy"#保存代理服务器用户的IP
http_access allow wang

topssh

出错提示如下:
# sshd
Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
解决方法
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
sshd 使用/etc/hosts.allow和hosts.deny.要注意配置

topssh 无密码配置

假设S为远程服务器,C为本地客户端,两台机器都有用户wang.

在C里运行

ssh-keygen -t rsa
一路回车即可.
scp ~/.ssh/id_rsa.pub S:/tmp
ssh S
cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
rm  /tmp/id_rsa.pub
以后 ssh S时则直接以wang登录不需要密码了.

注意S上~/.ssh权限为 755.

topSFS 服务器配置

pacman -S sfs
mkdir /etc/sfs
sfskey gen -P /etc/sfs/sfs_host_key

mkdir -p /var/sfs/root/usr1
mkdir -p /var/sfs/root/usr2

echo "Export /var/sfs/root /" >>/etc/sfs/sfsrwsd_config
echo "Export /mnt/pp/fs2 /usr2" >>/etc/sfs/sfsrwsd_config
echo "Export /mnt/skate/fs1 /usr1" >>/etc/sfs/sfsrwsd_config

echo "/var/sfs/root localhost(rw)" >> /etc/exports
echo "/mnt/pp/fs2 localhost(rw)" >> /etc/exports
echo "/mnt/skate/fs1 localhost(rw)" >> /etc/exports
#配置完成~

topAlsa

alsactl restore

topMplayer 字幕配置

关键是字体没有可读权限,搞了半天.
font=/usr/share/texmf-local/fonts/truetype/simsun.ttf
subcp=cp936
subfont-text-scale=5

top在apache 使用utf-8

在apache配置文件中
AddDefaultCharset ISO-8859-1 -> AddDefaultCharset off

top.serverauth.????问题的解决

使用startx启动X,主目录下有.serverauth.????文件, 详细见http://www.shallowsky.com/blog/index.cgi/linux/serverauth.html
编辑/usr/bin/startx
将
xserverauthfile=$HOME/.serverauth.$$
替换为
xserverauthfile=$XAUTHORITY

topfcitx

export LC_ALL=zh_CN.gbk
export LANG=zh_CN.gbk
export XMODIFIERS=@im=fcitx
应设置在fcitx启动之前.

top普通用户使用ntfs

在fstab中
/dev/sda6 /mnt/e ntfs ro,user,noauto,umask=222,iocharset=utf8 0 0

toprsync 的@ERROR: chdir failed错误

配置文件从网页上直接拷贝,要删除额外的符号和空格,使用TAB来对齐,即可解决.

topDNS 服务器配置

启动时 提示
named: capset failed: Operation not permitted: please ensure that the capset kernel module is loaded.  see  insmod(8)
加载capset模块时发现不存在,在mailist上看到应该加载模块capability,应该是模块改名了
modprobe capability