Chinaunix首页 | 论坛 | 博客
  • 博客访问: 377084
  • 博文数量: 82
  • 博客积分: 1855
  • 博客等级: 上尉
  • 技术积分: 846
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-12 12:28
文章存档

2013年(3)

2012年(8)

2011年(71)

分类: LINUX

2011-10-13 11:28:10

                                    软件环境:Ubuntu 9.04
一、中文环境设置
1. 设置 ubuntu 中文现实
   点击最上面菜单 的 系统 -> 系统管理 -> 语言支持(英文菜单则是 System -> Administration ->
   Language Support),在列表中选择 Chinese 条目。同时将默认语言修改为 Chinese(中国) ,按确定
   关闭设置程序。
2. 配置字体
    sudo fontconfig-voodoo -f -s zh_CN
3. 安装 fcitx 输入法
    sudo apt-get install im-switch libapt-pkg-perl fcitx
    sudo im-switch -s fcitx
4. PDF 浏览器
    sudo apt-get install acroread

二、ubuntu 开发环境设置
1. 安裝 C/C++的 Man 手冊
    sudo apt-get install manpages-dev
2. 安裝 gcc,g++,make
    sudo apt-get install build-essential
3. 安裝头文件和库
    sudo apt-get install libc6-dev libstdc++6-4.0-dev
4. 安装 libncurses5-dev
    sudo apt-get install libncurses5-dev
5. 安装 gdb 调试器
    sudo apt-get install gdb
6. 安装安装图形界面 ddd 调试器
    sudo apt-get install ddd
7. 安装 automake 工具
    sudo apt-get install automake
    sudo apt-get install autoconf
    sudo apt-get install autogen
    *autoconf 是一个用于生成可以自动地配置软件源代码包以适应多种 UNIX 类系统的 shell 脚本的工具。
    *automake 是一个从文件 Makefile.am 自动生成 Makefile.in 的工具。
8. 安装indent
    sudo apt-get install indent
    调整 C 原始代码文件的格式。
    sudo apt-get install libtool
    GNU libtool 是一个通用库支持脚本,将使用动态库的复杂性隐藏在统一、可移植的接口中。
9. 安装文档
    sudo apt-get install binutils-doc cpp-doc gcc-4.0-doc gcc-doc glibc-doc libstdc++6-4.0-doc stl-manual
    cpp-4.0-doc
10. 安装编辑器
    sudo apt-get install emacs21

三、ubuntu 文件共享、传输设置
1. 配置 tftp
(1)安装程序
    sudo apt-get install tftp tftpd前者是客户端,后者是服务程序。
    tftp 是要 inetd 来控制的, ubuntu 或 debian 类的系统,默认是没有安装 inetd 的,安装如下:
    sudo apt-get install netkit-inetd
(2)在/目录下建一个 tftpboot, 把属性改成 777。
    cd /
    sudo mkdir tftpboot
    sudo chmod 777 tftpboot
(3)修改/etc/inetd.conf
    tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
(4)重新加载 inetd 进程
    sudo /etc/init.d/inetd reload
(5)测试
    在/tftpboot 文件夹下新建立一个文件
    touch aaa
    进入用户文件夹
    cd /home/user1/
    tftp localhost
    tftp> get aaa
2. 配置 Samba
(1)安装 samba
   sudo apt-get install samba
(2)创建和配置共享文件夹
   mkdir /home/user1/share
   chmod 777 /home/ user1/share
(3)备份并编辑 smb.conf 允许网络用户访问
   sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
   sudo gedit /etc/samba/smb.conf
找到
   ; security = user
替换为
   # security = user
   security = user
   username map = /etc/samba/smbusers
找到
   workgroup = MSHOME
替换为
   workgroup = WORKGROUP
   display charset = UTF-8
   unix charset = UTF-8
   dos charset = cp936
在最后添加:
   [winshare]
   comment = Shared Folder with username and password
   path = /home/user1/share
   public = yes
   writable = yes
   valid users = network
   create mask = 0700
   directory mask = 0700
   force user = nobody
   force group = nogroup
   available = yes
   browseable = yes
(4)添加 network 这个网络访问帐户
代码:
   sudo useradd network
   sudo smbpasswd -a network
   sudo gedit /etc/samba/smbusers
添加:
   system_username = “shijian”
   network = "network"
(5)重启 samba
   sudo /etc/init.d/samba restart这样就可以在其他 windows PC 下访问本机 ubuntu 的共享
(6)ubuntu 访问其他 windows 的方法
   使用快捷键 ALT+F2.
   输入"smb://IP 地址",回车。
3. 配置 NFS
(1)安装 NFS
   Debian/Ubuntu 上默认是没有安装 NFS 服务器的,首先要安装 NFS 服务程序:
   sudo apt-get install nfs-kernel-server
   (安装 nfs-kernel-server 时,apt 会自动安装 nfs-common 和 portmap)
(2)配置/etc/exports
   NFS 挂载目录及权限由/etc/exports 文件定义
   将/armsys2440/root 目录让 192.168.0.*的 IP 共享, 则在该文件末尾添加下列语句:
   /armsys2440/root 192.168.2.*(rw,sync,no_root_squash)
   或者:
   /armsys2440/root 192.168.0.0/24(rw,sync,no_root_squash)
  运行
   sudo exportfs -r
  更新
  运行
   sudo /etc/init.d/nfs-kernel-server restart
重启 nfs 服务
(3)测试 NFS
   可以尝试一下挂载本地磁盘(假设本地主机 IP 地址为:192.168.0.1,将/home/zp/share 挂载到/mnt)
   sudo mount -t nfs 192.168.0.1: /armsys2440/root /mnt
   运行 $ df 看看结果
   sudo umount /mnt
   可以使用一定的参数:
   mount -o nolock,rsize=1024,wsize=1024,timeo=15 192.168.2.130:/tmp/ /tmp/
(4)客户端挂载远程共享
   mount -t nfs 192.168.0.***:/home/***/share /mnt/share
4. 配置 minicom
   安装 minicom
   sudo apt-get install minicom

阅读(2140) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~