1、NFS安装配置
(1) apt-get install nfs-kernel-server
apt-get install portmap nfs-common
(2)
编辑/etc/exports
/home/administrator/nfsroot *(rw,sync,no_root_squash)
(3)
修改挂载点的属性
chmod 777 /nfsroot
(4)
重启nfs
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/portmap restart
5)
在本机上测试:showmount -e
===================================================
2、安装配置tftp服务
sudo apt-get install tftp tftpd
sudo apt-get install netkit-inetd
sudo apt-get install xinetd
sudo in.tftpd -l /tftpboot
在/目录下建一个tftpboot, 把属性改成777。
cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot
修改/etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
重新加载inetd进程
打开目录 /etc/xinetd.d/新建文件tftp
sudo /etc/init.d/xinetd reload
sudo /etc/init.d/xinetd restart
或
service xinetd reload
service xinetd restart
测试:在/tftpboot文件夹下新建立一个文件:touch aaa
进入另外一个文件夹
tftp 192.168.0.101
tftp> get aaa
#使用
#define CALL(f, p) (printf("Call function %s\n", #f), f(p))
printf("1. ret=%d\n", CALL(square, 3));
##使用
#define STRUCT(type) typedef struct _tag_##type type; \
struct _tag_##type
STRUCT(Student) {};