August 18th, 2010 — 11:22am
继上次狗血的执行了rm -rf *,这次我又不小心把为ITX主板做的
filesystem解压覆盖给了根目录,结果可想而知……FML。
幸运的是,还挂载了一块相同配置的硬盘在主机下,所以只需要再
次配置一下原先运行的服务就好了。
安装
sudo apt-get install samba
sudo apt-get install smbfs
配置smb.conf
添加 netbios name =
修改 workgroup =
删除 server string =
共享文件夹
[Share]
path = /home/Share/
avilable = yes
read only = no
browsable = yes
public = yes
writable = yes
guest ok = yes
Comment » | 技术
June 10th, 2010 — 9:22pm
工作需要,记录下。
1.nfs
安装
sudo apt-get install nfs-kernel-server
编辑
sudo gedit /etc/export
/nfsroot是创建的目录 权限777
/nfsroot *(rw,sync,no_root_squash)
重启
sudo /etc/init.d/nfs-kernel-server restart
检测
IP,/nfsroot自己替换,/mnt为挂载目录
sudo mount -t nfs 192.168.1.103:/nfsroot /mnt
查看挂载
mount
出现如下为成功
192.168.1.103:/nfsroot on /mnt type nfs (rw,addr=192.168.1.103)
卸载
sudo umount /mnt
2.tftp
安装
sudo apt-get install xinetd tftpd-hpa tftp-hpa
创建文件
sudo touch /etc/xinetd.d/tftpd
添加内容
/home/tftpd根据自己情况修改
service tftp
{
disable = no
socket_type = dgram
wait = no
user = root
protocol = udp
server = /usr/sbin/in.tftpd
server_args = -s /home/tftpd
log_on_success = PID HOST DURATION
log_on_failure = HOST
}
建立目录,权限777
sudo mkdir /home/tftpd
sudo chomod 777 /home/tftpd
修改文件
sudo gedit /etc/inetd.conf
/home/tftpd根据自己情况修改
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.t ftpd -s /home/tftpd
修改/etc/default/tftpd-hpa
sudo gedit /etc/default/tftpd-hpa
/home/tftpd根据自己情况修改
#Defaults for tftpd-hpa
RUN_DAEMON=”yes”
OPTIONS=”-l -s /home/tftpd”
权限
chmod 777 *
测试
首先创建文件
touch test
另一台机器下载,IP自行替换
tftp -i 192.168.1.103 get test
3.程序开机启动
/etc/rc.local
自行添加启动命令或脚本
Comment » | 技术
May 8th, 2008 — 9:33pm
1.开机自动连接问题
官方WIKI有解答
2.禁用IPV6
⒈打开文件 /etc/modprobe.d/aliases
⒉把 alias net-pf-10 ipv6 那行用 # 注释掉
⒊打开文件 /etc/modprobe.d/blacklist
⒋加入一行 blacklist ipv6
⒌重启
⒍在terminal输入命令行: ip a | grep inet6
3.双网卡问题
sudo ifconfig eth1 down 或者 up
sudo ifconfig eth0 up 或者 down
sudo dhclient
4.终极解决方案
1.sudo gedit /etc/ppp/peers/dsl-provider
复制一下代码,替换原先的:
# Configuration file for PPP, using PPP over Ethernet
# to connect to a DSL provider.
#
# See the manual page pppd(Cool for information on all the options.
##
# Section 1
#
# Stuff to configure…
# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
#user myusername@myprovider.net
# Use the pppoe program to send the ppp packets over the Ethernet link
# This line should work fine if this computer is the only one accessing
# the Internet through this DSL connection. This is the right line to use
# for most people.
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1452"
# An even more conservative version of the previous line, if things
# don’t work using -m 1452…
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"
# If the computer connected to the Internet using pppoe is not being used
# by other computers as a gateway to the Internet, you can try the following
# line instead, for a small gain in speed:
#pty "/usr/sbin/pppoe -I eth0 -T 80"
# The following two options should work fine for most DSL users.
# Assumes that your IP address is allocated dynamically
# by your DSL provider…
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
# Comment out if you already have the correct default route installed.
defaultroute
##
# Section 2
#
# Uncomment if your DSL provider charges by minute connected
# and you want to use demand-dialing.
#
# Disconnect after 300 seconds (5 minutes) of idle time.
#demand
#idle 300
##
# Section 3
#
# You shouldn’t need to change these options…
hide-password
lcp-echo-interval 20
lcp-echo-failure 3
# Override any connect script that may have been set in /etc/ppp/options.
connect /bin/true
noauth
persist
mtu 1492
# RFC 2516, paragraph 7 mandates that the following options MUST NOT be
# requested and MUST be rejected if requested by the peer:
# Address-and-Control-Field-Compression (ACFC)
noaccomp
# Asynchronous-Control-Character-Map (ACCM)
default-asyncmap
plugin rp-pppoe.so eth0
# Configuration file for PPP, using PPP over Ethernet
# to connect to a DSL provider.
#
# See the manual page pppd(Cool for information on all the options.
##
# Section 1
#
# Stuff to configure…
# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
#user myusername@myprovider.net
# Use the pppoe program to send the ppp packets over the Ethernet link
# This line should work fine if this computer is the only one accessing
# the Internet through this DSL connection. This is the right line to use
# for most people.
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1452"
# An even more conservative version of the previous line, if things
# don’t work using -m 1452…
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"
# If the computer connected to the Internet using pppoe is not being used
# by other computers as a gateway to the Internet, you can try the following
# line instead, for a small gain in speed:
#pty "/usr/sbin/pppoe -I eth0 -T 80"
# The following two options should work fine for most DSL users.
# Assumes that your IP address is allocated dynamically
# by your DSL provider…
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
# Comment out if you already have the correct default route installed.
defaultroute
##
Comment » | Uncategorized
February 7th, 2006 — 8:13pm
又有问题。能打开Lumaqq,但是点击登陆然后就没有反映了。
在终端下运行,出现错误(忘记下来了)
解决方法:删除桌面下的 .Lumaqq
rm -rf ~/.Lumaqq
附送Lumaqq加速大法
1:进入Lumaqq目录
2:gedit lumaqq
3:找到以下代码(一般是在最后)
if [ -e $PREFIX/java ]; then
$PREFIX/java/bin/java -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
elif [ ! -z $JAVA_HOME ]; then
$JAVA_HOME/bin/java -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
else
found=0
for i in `find /usr -name "java" | grep bin`; do
if [ -x "$i" ]; then
$i -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
found=1
break
fi
done
if [ $found -eq 0 ]; then
for i in `find /opt -name "java" | grep bin`; do
if [ -x "$i" ]; then
$i -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
found=1
break
fi
done
fi
if [ $found -eq 0 ]; then
for i in `find $HOME -name "java" | grep bin`; do
if [ -x "$i" ]; then
$i -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
break
fi
done
fi
fi
替换为
or i in `find /usr/bin -name "java" | grep bin`; do
if [ -x "$i" ]; then
$i -Djava.library.path=$PREFIX/swt -classpath $cp edu.tsinghua.lumaqq.LumaQQ "$HOME/.lumaqq" &
found=1
break
fi
done
原理:缩小lumaqq脚本搜索java环境的范围
2块硬盘引导的问题还没有解决,头疼…
Comment » | Uncategorized
February 6th, 2006 — 8:34pm
把装Ubuntu的那块硬盘放到AMD的机器上了。还有些问题。现show一下

Comment » | Uncategorized