2018-02-20 20:32:38 +00:00
|
|
|
|
|
|
|
## daemon user
|
|
|
|
|
|
|
|
#adduser ipfs -nologin -home /var/spool/ipfs/
|
|
|
|
#GID=`id -g ipfs`
|
|
|
|
#UID=`id -u ipfs`
|
|
|
|
|
|
|
|
|
|
|
|
## init skript
|
|
|
|
|
|
|
|
cp ipfs.initd /etc/init.d/ipfs
|
|
|
|
#sed -i 's/IPFS_GID=1001/IPFS_GID=$GID/g'
|
|
|
|
#sed -i 's/IPFS_UID=1001/IPFS_UID=$GID/g'
|
|
|
|
update-rc.d ipfs defaults
|
|
|
|
|
|
|
|
|
|
|
|
## install ipfs
|
|
|
|
|
|
|
|
# wget ipfs_go_{arch}_{vers}.tar.gz
|
|
|
|
# tar xzf ipfs_go_{arch}_{vers}.tar.gz
|
|
|
|
# rm ipfs_go_{arch}_{vers}.tar.gz
|
|
|
|
# ./go-ipfs/install.sh
|
|
|
|
# chmod 770 `whereis -b ipfs | cut -d ":" -f 1`
|
|
|
|
# chown ipfs:ipfs `whereis -b ipfs | cut -d ":" -f 1`
|
|
|
|
|
2018-02-20 20:35:01 +00:00
|
|
|
## init ipfs
|
|
|
|
su ipfs -c "ipfs init"
|
|
|
|
#sed -i 's/127.0.0.1/0.0.0.0/g' /var/spool/ipfs/.ipfs/config
|
|
|
|
|
2018-02-20 20:32:38 +00:00
|
|
|
|
|
|
|
service ipfs start
|