configure openwrt nfs server & share the portage tree & eix-sync in cron
Pubdate:2013-01-27 07:52:10 Categories: linux 1440 ViewsTags: gentoo, linux
- In opwnwrt:
opkg update && opkg install unfs3
edit the /etc/exports:
# cat /etc/exports
/usr/portage 192.168.1.0/24(sync,no_root_squash,rw,no_subtree_check)
start these 2 services:
root@OpenWrt:~# /etc/init.d/portmap start
root@OpenWrt:~# /etc/init.d/unfs3 start
make these 2 services auto start at boot.
- In the client machine:
Add an entry into /etc/fstab for the share:
192.168.1.1:/usr/portage /usr/portage nfs defaults,rw 0 0
Try to mount it automatically
/etc/init.d/nfsmount start
and add it to your default level
rc-update add nfsmount default
If you want to save some space, remove your local portage copy
umount /usr/portage
rm -r /usr/portage/*
mount /usr/portage
Configuring eix
If you use eix for package searches, you'll need to change the method which eix uses to find out about packages. Edit /etc/eixrc and add the following line to the end of the file:
#cat /etc/eixrc
PORTDIR_CACHE_METHOD="parse"
Syncing Cache
Portage keeps a cache of package information relevent to the system which speeds up queries. This is normally updated during emerge --sync. Since your server is the only machine that runs emerge --sync, you will need to update the cache on the clients using:
emerge --metadata
If you want to have a cronjob for eix-sync create for example a file named /etc/cron.weekly/eix.cron
and put something like
#!/bin/sh
/usr/bin/eix-sync
in it.
In the client that don't run eix-sync, put
/usr/bin/eix-update
/usr/bin/emerge --metadata
in it.
Comments(0)