ubuntu11.10开发环境配置记录

3284阅读 0评论2012-11-16 mutes
分类:LINUX

ubuntu11.10开发环境配置记录
一、配置静态IP
1、配置静态IP
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.104
gateway 192.168.1.1
netmask 255.255.255.0
2、配置静态DNS
/etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
3、重启网络配置
sudo /etc/init.d/networking restart
二、配置samba
sudo apt-get install samba
增加用户名接入
1、找到/etc/samba/smb.conf文件中的"#security = user"并开启它
   security = user
2、将下列几行新增到文件的最后面,假设允许访问的用户为yzl。而文件夹的共享名为 Share,让XP用户通过这个yzl来和我们进行数据交流
 [share]
   comment = Users profiles
   path = /home/yzl/sharedir
#   guest ok = yes
   browseable = yes
   writable = yes
   public = yes //no表示除了test这个用户,其它用户在进入samba服务器后看不见sharedir这个目录,如果为yes,虽然能看见sharedir这个目录,但除了test这个用户能进入这个目录,其它人进不了。
   valid users = test
 
建立共享目录
#mkdir /home/yzl/sharedir
#chown -R test:test /home/yzl/sharedir
 //因为是root建立的目录,其它用户只有读的权限,所还得把权限改一下。当然也可以简单的用#chmod 777 /home/yzl/sharedir。还有个问题就是共享里目录的文件如果有些能访问有些不能访问,那肯定也是权限的问题,进入/home/yzl/sharedir,直接#chmod 777 *来解决。
给samba服务器添加用户
$ sudo useradd test
$ sudo smbpasswd -a test
New SMB password:
Retype new SMB password:
Added user test.
 
设置samba服务要注意以下两点(即两个两次):
1.添加两次用户:一次添加系统用户#useradd test;再一次是添加samba用户#smbpasswd -a test;
2.设置两次权限:一次是在smb.conf中设置共享文件夹的权限:再一次是在系统中设置共享文件夹的权限#chmod 777 文件夹名。
重启samba服务
sudo service smbd restart
 
linux下测试
sudo mount -o username="test",password="123456" //192.168.1.101/share /mnt/

三、安装必要的工具
sudo apt-get install vim
sudo apt-get install ssh
四、安装编译环境包
sudo apt-get install bison flex 
sudo apt-get install sharutils (install uuencode)
注意:生成的mkfs.jffs2是一个32位程序,在此还得安装在64位机器上运行32位程序的库
有的程序可在64位Ubuntu下运行,不过要使用32位的库。可以使用 sudo 和 apt-get 来安装这些库。
sudo apt-get install ia32-libs*
也可以用 新立得软件包管理器 安装 32 位库。
上一篇:gcc编译器 CFLAGS 标志参数说明
下一篇:shell之if判断的总结