ubuntu 9.04设置localapp

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
hjyyx
帖子: 15
注册时间: 2009-03-14 9:17

ubuntu 9.04设置localapp

#1

帖子 hjyyx » 2009-08-31 16:11

ubuntu LTSP客户端进程用的是服务器的资源,所以当LTSP的客户端数量多的话,LTSP客户端运行速度就会变的很慢。为了解决ubuntu LTSP运行速度慢的问题,ubuntu 9.04版本推出了ubuntuapp,ubuntuapp将实现LTSP客户端使用自己的cpu和内存,这样就降低了服务器的资源消耗,即能解决客户端运行速度慢的问题也能使服务器拉更多的客户机降低成本。
现在机子的配置已经很高了,ubuntuapp的实现也不存在很大的问题。

在安装好ubuntu9.04 LTSP之后
1.更新源 在终端输入
sudo gedit /etc/apt/sources.list
选择杭州双线服务器的源粘帖进文件,保存退出 #你可以选择你当地网速比较快的源
#杭州双线服务器的源
deb http://mirror.lupaworld.com/Ubuntu jaunty main restricted universe multiverse
deb http://mirror.lupaworld.com/Ubuntu jaunty-security main restricted universe multiverse
deb http://mirror.lupaworld.com/Ubuntu jaunty-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/Ubuntu jaunty-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/Ubuntu jaunty-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/Ubuntu jaunty main restricted universe multiverse
deb-src http://mirror.lupaworld.com/Ubuntu jaunty-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/Ubuntu jaunty-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/Ubuntu jaunty-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/Ubuntu jaunty-proposed main restricted universe multiverse
2.更新服务器 在终端输入
sudo apt-get update
3.安装更新 在终端输入
sudo apt-get upgrade
4.更新管理器和语言
5.配置dhcp文件 在终端输入
sudo gedit /etc/ltsp/dhcpd.conf
编辑dhcpd.conf文件如下:
#
#Default LTSP dhcpd.conf config file
#
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0{ #设置子网和掩码
range 192.168.0.1 192.168.0.3; #设置IP分配范围
option domain-name “example”;
option domain-name-servers 202.101.172.35; #设置DNS
option broadcast address 192.168.0.127; #设置广播地址
option routers 192.168.0.65; #设置网关
# next-server 192.168.0.1;
# get-lease-hostname true;
option subnet-mask 255.255.255.0; #设置子网掩码
option root-path “/opt/ltsp/i386;
if substring( option vendor-class-identifier, o, 9 )= ”PXEclient”{
fiename ”/ltsp/i386/pxelinux.0”;
}else{
filename”/ltsp/i386/nbi.img”;
}
}
保存退出


客户端更新
复制源文件 在终端输入
sudo cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/
转到客户端目录下
sudo chroot /opt/ltsp/i386
挂载
mount -t proc proc /proc
更新
apt-get update
安装更新包括内核
apt-get dist-upgrade
在客户端安装firefox和openoffice
sudo apt-get install firefox openoffice.org openoffice.org-l10n-zh-cn flashplugin-installer language-pack-zh language-pack-gnome-zh language-support-zh gimp #红色部分为你的服务器上已经安装的文件,具体可以在系统/系统管理/新立得软件包管理器里面查看
卸载
umount /proc
退出
exit

新建文件resolv.sh 在终端输入 #为了解决firefox localapp本机运行的bug
sudo gedit /opt/ltsp/i386/etc/init.d/chmod-resolv.sh
在resolv.sh文件中输入
#! /bin/sh
chmod 644 /etc/resolv.conf
保存退出
更改resolv.conf文件的权限和所有者
sudo chown root:root /opt/ltsp/i386/etc/init.d/chmod-resolv.sh
sudo chmod 755 /opt/ltsp/i386/etc/init.d/chmod-resolv.sh
#设置ubuntu ltsp localapp
新建文件lts.conf 在终端输入
sudo gedit /var/lib/tftpboot/ltsp/i386/lts.conf
在lts.conf文件中输入
[Default]
LOCAL_APPS=True
LOCAL_APPS_MENU = True
LOCAL_APPS_MENU_ITEMS = firefox,openoffice.org-calc,openoffice.org-draw,openoffice.org-impress,openoffice.org-math,openoffice.org-startcenter,openoffice.org-writer

#为了解决firefox在localapp运行的bug还需添加以下内容
SEARCH_DOMAIN = nameserver ||更改为你自己的网络环境,具体更改在终端输入
cat /etc/resolv.conf 输入结果的第一部分如nameserver 202.101.172.35
DNS_SERVER = 202.101.172.35 || 更改为你自己的网络环境,具体更改在终端输入
cat /etc/resolv.conf 输入结果的第二部分如nameserver 202.101.172.35
RCFILE_01=/etc/init.d/chmod-resolv.sh
保存退出

更新内核
sudo ltsp-update-kernels
更新ltsp授权
sudo ltsp-update-sshkeys
更新文件映像
sudo ltsp-update-image
重启电脑
回复