以下のテキストは、執筆時当時の情報を元に書いたものであり、 現在の情勢にそぐわないことを含む場合があるので注意されたい。 また、テキストは最終提出原稿で校正を経る前のものなので、実際にOSM 本誌に記載されたものとは異なる。誤字脱字等そのままである。
致命的な誤り以外は加筆修正等は行なわないので情報の鮮度に気をつけつつ 利用して欲しい。
→目次
====================================================================== Part3: ���������������������������������������������� ====================================================================== �� �������������������������������������� �� ������������������������������������������������������������������������ ������������������������������������������������������������������������ ������������������������������������������������������������������������ ��������������������������������������������������mp3�������������������� ������������������������������������������������������������������������ ������������������������������������������������������������������������ ���������������������������������������������������������� * �������������������������������������������������������� * HTTP��FTP������������������������������ ������������������������������������������������������������������������ ������������������������������������������������������������������������ �������������������������������������� ��������������������������HTTP/FTP�������������������������������������� ������������������������2��3�������������������������������������������� ������������������������������������������������������������������������ ������������������������������������������������������������������������ ������������������������������������������������������������������ ������������������������������������������������������������������������ ������������������������������������������������������������������������ ������������������������������������������������ �� ��FUSE �� FUSE(Filesystem in Userspace)������������������(����������)������������ ����������������������������������������API���������������������������� ������������������������������������������������������������������������ ��������������������������������������������FUSE��������������Web������ http://fuse.sourceforge.net/ ������������������Hello World!������������������������������������������ ���������������������� ������ ---[�� ��]------------------------------------------------------------ ������������������ FUSE - Free Unix Spectrum Emulator http://fuse-emulator.sourceforge.net/ ����������������������������������FreeBSD ports�������� FUSEFS, fusefs ������������������������������FUSE(FileSystem)����������fuse-emulator �� ����������������������������������FUSE���������������������������������� ����FAQ���������������������� ---------------------------------------------------------------------- FUSE������ Linux �� FreeBSD �������������� ��FUSE+SSHFS��������������(Linux) ����Linux��������������������������������������������������������RPM���� ������������������������������������������������������������������������ ��������������FedoraCore 5 �������������������������������������������� ������������������������ # yum install fuse-sshfs ���������������������������������������������������������� http://sourceforge.net/project/showfiles.php?group_id=121684&package_id=132802 ���� fuse-2.5.3.tar.gz ���� http://sourceforge.net/project/showfiles.php?group_id=121684&package_id=140425 ���� sshfs-fuse-1.6.tar.gz ������������(������������������������������)�� % tar zxpf fuse-2.5.3.tar.gz % cd fuse-2.5.3 % ./configure && make % sudo make install ������ /usr/local ������������������������������������ /lib/modules/����������/kernel/fs/fuse ���������������������������������� ���������� # modprobe fuse ����fuse������������������������ ����sshfs��������������������glib-2.0 ���������������������������������� �������������������������������� # apt-get install glib2-devel sshfs���������������������������������������� % tar zxpf sshfs-fuse-1.6.tar.gz % cd sshfs-fuse-1.6 % ./configure % LD_RUN_PATH=/usr/local/lib make % sudo make install �������������������������������������������������������������� % sudo modprobe fuse ��FUSE+SSHFS��������������(FreeBSD) FreeBSD��������port������������������������������������������ # cd /usr/ports/sysutils/fusefs-sshfs # make install clean ��������������fusefs����������������������������������FUSE�������������� �������������������������������������������������� # kldload fuse ��������������������������������������������sysctl���������������������� ������ # sysctl -w vfs.usermount=1 ������vfs.usermount�������������������������������������� /etc/sysctl.conf �� vfs.usermount=1 ������1������������������ ��SSHFS������������������ ������������������������������������������������������������������������ ��������������������������������������������������������NFS(Network File System)������������������������������������������������������������������ �������������������������������������������������������������������������� ������������������LAN���������������������������������� ��������������������������������������������������������VPN�������������� ������������������������������������SSH���������������������������������� �������������������������������������������������������������������������� ���������������������������� fuse-sshfs ������������������������������������������������������������ ����������������ssh�������������������������������� % sshfs [����������] [������@]��������������:���� �������������������� ������������������������������������������������������������������������ ������������ chibi �� ~/oyahome ���������������������������������������� �� oya ����/home/taro �������������������������������������������������� % ssh oya hostname (oya��ssh������������������������) oya % sshfs oya:/home/taro ~/oyahome % ls ~/oyahome (������ oya �� /home/taro ������������������) ������FreeBSD��������sshfs���������������������������������� mount_fusefs ����������������������������������������������������port�� ���������������������� /usr/local/sbin ������������������������������ $PATH�������� % env PATH=/usr/local/sbin:$PATH sshfs oya:/home/taro ~/oyahome ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ������������������������������������������������������������������������ �������� % fusermount -u ���������������� (Linux������) % umount ���������������� (FreeBSD������) �������� sshfs�������������������������������� ������������ ---[�� ��]------------------------------------------------------------ ��sshfs������������ -o �������������� SSHFS��������������(����)������ -h --help ���������� -V --version �������������� ��SSHFS ��������������(-o����������������) -p ���������� ssh���������������� -C ssh������������������ -1 SSH-1���������������� -o reconnect �������������� -o sshfs_sync ������������ -o no_readahead ������������(������������) -o sshfs_debug ������������������ -o cache=YESNO ������������������ yes �� no ������(��������yes) -o cache_timeout=N ��������������������������������(��������20) -o cache_X_timeout=N stat��dir��link���������������������������� -o workaround=rename ��������������mv(rename)�������������������� ������������ -o workaround=nodelay ssh������tcp nodelay�������������� -o workaround=truncate ����sftp��������������������������(truncate) ������������������������(���� ��) -o workaround=all ���������������������������� -o workaround=none ���������������������� -o idmap=none uid gid��������������(������) -o idmap=user ������������ uid ����uid����������(��������) -o ssh_command=�������� ssh�������������������������������� -o ssh_protocol=N SSH��������������������(�������� 2) -o sftp_server=���� sftp����������������������(�������� sftp) -o directport=PORT directly connect to PORT bypassing ssh -o transform_symlinks ����������������������������symlink������ �������������������������������������������������� -o SSHOPT=���������� ssh������������������������ ��FUSE ��������������: -d -o debug ��������������������(-f����������ON) -f ���������������������� -s �������������������������� -o allow_other ���������������������������������������������� -o allow_root �������������������������������������� �������� -o nonempty �������������������������������������� ���������������������� -o default_permissions ������������������������������������������ -o fsname=���� ���������������������� -o large_read large read �������������������� (Linux2.4����) -o max_read=N read������������������ -o hard_remove open��������������������������unlink���� -o use_ino ����������������������inode���������� -o readdir_ino readdir��d_ino�������������������� -o direct_io ����������I/O���������� -o kernel_cache open()�������������������������������������� ����FUSE������������������������������������ ���������������������������������������������� ���������� -o umask=M ����������umask����8����M�� -o uid=N ����������������uid��N�� -o gid=N ����������������gid��N�� -o entry_timeout=T ������������������������������������ T����(������1.0��) -o negative_timeout=T �������������������������������������������� ��T����(������0��) -o attr_timeout=T ��������������������������������������T�� ��(������1.0��) ---------------------------------------------------------------------- ---[�� ��]------------------------------------------------------------ FreeBSD�� fusefs-sshfs ����truncate������������������������ ---------------------------------------------------------------------- ������sshfs���������������������������������������� ������������������(FreeBSD)�� ----------------------------------------------------------------------�������� lead% id ~~ uid=2020(yuuji) gid=20(staff) groups=20(staff), 0(wheel), 5(operator) lead% ls -lFa /usr/home ~~~~~~~~~~~~~~~~~ total 1 drwxr-xr-x 4 root wheel 512 Aug 8 11:51 ./ drwxr-xr-x 19 root wheel 512 Jul 31 19:04 ../ drwxr-xr-x 2 taro staff 512 Aug 8 11:51 taro/ drwxr-xr-x 11 yuuji staff 1024 Aug 8 11:15 yuuji/ ----------------------------------------------------------------------�������� (��������yuuji��/usr/home ����taro����������������������yuuji/��������) ����������������(Linux)�� ----------------------------------------------------------------------�������� cx% id ~~ uid=2020(yuuji) gid=2020(yuuji) ������������=2020(yuuji) cx% mkdir leadhome ~~~~~~~~~~~~~~ cx% sshfs -o idmap=user lead:/usr/home leadhome ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cx% df -tfuse -h ~~~~~~~~~~~~ ���������������� ������ ������ ���� ����% ������������ sshfs#lead:/usr/home 7.5T 0 7.4T 0% /home/yuuji/leadhome cx{yuuji}% ls -lFa leadhome ���� 13 drwxr-xr-x 1 root root 512 Aug 8 2006 ./ drwxr-xr-x 15 yuuji yuuji 1024 Aug 7 12:40 ../ drwxr-xr-x 1 2021 games 512 Aug 8 2006 taro/ drwxr-xr-x 1 yuuji games 1024 Aug 8 2006 yuuji/ ----------------------------------------------------------------------�������� taro���������������������������������� ----------------------------------------------------------------------�������� cx% touch leadhome/taro/hoge ~~~~~~~~~~~~~~~~~~~~~~~~ touch: `leadhome/taro/hoge' ����������������: ���������������� ----------------------------------------------------------------------�������� ������������������������������ ----------------------------------------------------------------------�������� cx% touch leadhome/yuuji/hoge ~~~~~~~~~~~~~~~~~~~~~~~~~ cx% ls -lF leadhome/yuuji/hoge ~~~~~~~~~~~~~~~~~~~~~~~~~~ -rw-r--r-- 1 yuuji games 0 Aug 7 12:59 leadhome/yuuji/hoge ----------------------------------------------------------------------�������� ������������������������������������������������������������ ----------------------------------------------------------------------�������� cx% ls -lF leadhome/yuuji/m[TAB] �� cx% ls -lF leadhome/yuuji/make[Return] drwxr-xr-x 1 yuuji yuuji 512 May 1 2005 amd/ -rw-r--r-- 1 yuuji yuuji 27565669 Apr 27 2005 ports.tar.gz ----------------------------------------------------------------------�������� �������������������������������������������������������������� ----------------------------------------------------------------------�������� cx% gtar vztf leadhome/yuuji/make/ports.tar.gz|head -2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drwxrwxr-x archive/archive 0 2005-04-27 10:08:30 ports/ drwxrwxr-x archive/archive 0 2005-04-18 10:11:11 ports/Mk/ cx% cp ~/.zshrc leadhome/yuuji && echo Success ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sucess ----------------------------------------------------------------------�������� ��FUSE-CURLFTPFS FUSE����������������������������������������������������������CurlFtpFS���� ��������������Linux�������� http://curlftpfs.sourceforge.net/ http://sourceforge.net/project/showfiles.php?group_id=160565 ����������(�������� curlftpfs-0.8)������������ ���������������������� ������&������������������������ ������ ---[�� ��]------------------------------------------------------------ �������� Fedora Core 5 ������������������������������������������������ ���������� ---------------------------------------------------------------------- % tar zxpf curlftpfs-0.8.tar.gz % ./configure && make % sudo make install ---[�� ��]------------------------------------------------------------ ��������������curl������������������(����������7.15.2����)�������������� ������������curl��������������������������������������������������curl�� ������������ # curl ftp.vinelinux.org:/pub/Vine/apt/unstable/SRPMS.plus/curl-7.15.3-0vl1.src.rpm # apt-get build-dep curl-7.15.3-0vl1.src.rpm # apt-get -s source curl-7.15.3-0vl1.src.rpm # apt-get install ~/rpm/RPMS/i386/curl-* ---------------------------------------------------------------------- FreeBSD �������� /usr/ports/sshfs-curlftpfs �� make install clean ������ /usr/local/bin �� curlftpfs ������������������������������ ��CurlFtpFS������ Anonymous FTP �������� curlftpfs������������sshfs������ftp����URL������������������������������ ������������������������������������������RING�������������� Anonymous FTP ���������������������������������������������� ----------------------------------------------------------------------�������� cx% mkdir ~/ring ~~~~~~~~~~~~ cx% curlftpfs ftp://ftp.ring.gr.jp/pub ~/ring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cx% ls -F ~/ring ~~~~~~~~~~~~ CPAN@ NetBSD/ X/ doc/ graphics/ linux/ misc/ pc/ text/ GNU/ OpenBSD/ XFree86/ elisp/ lang/ mac/ net/ pgp/ ----------------------------------------------------------------------�������� ��/etc/fuse.conf FUSE������������������������������������������������ /etc/fuse.conf ���� ������������������������2������������������������ mount_max = NNN ������������FUSE��������������������������������������1000�� user_allow_other �������������������� allow_other ������ allow_root ���� ������������������������������ ����������FUSE���������������������� http://fuse.sourceforge.net/wiki/index.php/FileSystems ����FUSE���������������������������������������������������������������� ������������������������������������ Fusedav WebDAV���������������������� GmailFS Gmail(www.gmail.com)������2GB�������������� �������������������� ���������������������������������������������������������������� ��������������������������������Python������������BSD���������� ������������������������������������������������������ ---[�� ��]------------------------------------------------------------ ������������������������2006/8/15 ����2700MB�������������������� ---------------------------------------------------------------------- CvsFS CVS�������������������������������������������������������������� FunionFS: An UnionFS over FUSE FUSE��������������Unionfs������������������������ ���������������������������� Unionfs���������������������������������������� unionfs-fuse ������������Unionfs������������������������������ ���������������������������������� �� ��portalfs �� 4.4BSD������������portalfs����������������open����portal���������������� ����������������������portalfs �������������������������������������������� ���������������������������������������������� �������������������������� ������������������������������������������������������������������������ �������� ---[�� ��]------------------------------------------------------------ ������������������������������������������������������������������������ ��portafls��������������������open������������������������������������ ������ ---------------------------------------------------------------------- ����������portalfs���������������������������������������������� #prefix type arg-prefix tcp/ tcp tcp/ ������������������������������ tcp/ ������prefix�������������� ����������tcp������������������������������������������������������������ ���������������������� /etc/portal.conf ������������������������������ # mkdir /p # mount_portalfs /etc/portal.conf /p (FreeBSD������) # mount_portal /etc/portal.conf /p (NetBSD������) ��������/p �������������������������������� /p/tcp/����������/�������������� ��������������������������������������������������������(tcp)������������ ������������������������ # head -1 /p/tcp/mailsv01.softbank.co.jp/25 ����������������mailsv01.softbank.co.jp �� tcp 25���������������������� ��������SMTP��������������������������������1���������������� �������������������������������� �������������� ���� ���� ---------+----------------------+---------------------------------------- ������ |/p ���������������� |���� ---------+----------------------+---------------------------------------- fs |fs/PATH |PATH����������(chroot�������������� | | �������������������������������� | | ����������) | | tcp |tcp/ADDR/PORT |ADDR��PORT(tcp)������������������ | |����������(FreeBSD����) tcplisten|tcplisten/ADDR/PORT |ADDR��PORT(tcp)��listen����(FreeBSD����) pipe |pipe/CMD |CMD�������������������������������� | | (FreeBSD����) | | rfilter |rfilter/PATH |PATH������������portal.conf���������� | | ���������������������������������� | | (NetBSD����) wfilter |wfilter/PATH |����������portal.conf���������� | | ������������������������������ | | PATH����������(NetBSD����) | | ---------+----------------------+---------------------------------------- ��������pipe(FreeBSD)��rfilter(NetBSD)���������������������������������� ����������������������Part4���������������������������������������������� ����������������������������
yuuji@