u
This commit is contained in:
parent
dd3c8ab167
commit
6e950b54cd
@ -2,7 +2,7 @@ FROM debian:11.5
|
||||
LABEL org.opencontainers.image.authors="luk"
|
||||
|
||||
RUN apt update && apt install curl -y
|
||||
RUN curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-config.sh > ~/debian-config.sh && echo -e "l\n\n\n\n\n" | bash ~/debian-config.sh
|
||||
RUN curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && echo -e "l\n\n\n\n\n" | bash ~/debian-setup.sh
|
||||
|
||||
CMD bash
|
||||
|
2
debian-config.sh → debian-setup.sh
Executable file → Normal file
2
debian-config.sh → debian-setup.sh
Executable file → Normal file
@ -2,7 +2,7 @@
|
||||
|
||||
echo "Usage: this.sh [NewUser]"
|
||||
echo "Example: this.sh alice"
|
||||
echo "curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-config.sh > ~/debian-config.sh && bash ~/debian-config.sh"
|
||||
echo "curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && bash ~/debian-setup.sh"
|
||||
|
||||
if [ "$1" ]
|
||||
then
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
defaultVERSION=1.10.26
|
||||
defaultVERSION=1.11.2
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
@ -15,6 +15,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
ARCH=amd64
|
||||
|
||||
echo "=== Install geth:[b] for 二进制, [s] for 源代码,[anything else or leave blank] for no change"
|
||||
read -p ">>> " BINARY_OR_SOURCE
|
||||
@ -25,21 +26,20 @@ then
|
||||
# cd ./geth-temp
|
||||
if [ "$VERSION" == '1.10.26' ]
|
||||
then
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.26-e5eb32ac.tar.gz -O geth-linux-amd64-$VERSION.tgz
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-$ARCH-$VERSION-e5eb32ac.tar.gz -O geth-linux.tgz
|
||||
elif [ "$VERSION" == '1.10.25' ]
|
||||
then
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.25-69568c55.tar.gz -O geth-linux-amd64-$VERSION.tgz
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-$ARCH-$VERSION-69568c55.tar.gz -O geth-linux.tgz
|
||||
else
|
||||
echo "=== please find the download link in https://geth.ethereum.org/downloads"
|
||||
read -p ">>> " DOWNLINK
|
||||
wget $DOWNLINK -O geth-linux-amd64-$VERSION.tgz
|
||||
wget $DOWNLINK -O geth-linux.tgz
|
||||
fi
|
||||
tar xzf ./geth-linux-amd64-$VERSION.tgz # --strip-components 1 ## 去掉tar包中顶级目录,因为顶级目录含有checksum,不方便在下一步进入
|
||||
tar xzf ./geth-linux.tgz # --strip-components 1 ## 去掉tar包中顶级目录,因为顶级目录含有checksum,不方便在下一步进入
|
||||
echo "--- 安装到 /usr/local/bin/geth"
|
||||
mv ./geth-linux-amd64-*/geth /usr/local/bin/
|
||||
# echo "--- 删除原始文件"
|
||||
# cd ..
|
||||
# rm -fr ./geth-temp
|
||||
mv ./geth-linux-*/geth /usr/local/bin/
|
||||
echo "--- 删除原始文件"
|
||||
rm -fr ./geth-linux.tgz ./geth-linux-$ARCH-$VERSION-*/
|
||||
elif [ "$BINARY_OR_SOURCE" == 's' ]
|
||||
then
|
||||
echo "--- 克隆并编译 geth"
|
||||
|
@ -12,11 +12,24 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Download https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-amd64.tar.gz
|
||||
curl https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-amd64.tar.gz -o kubo_v$VERSION.tgz
|
||||
if [[ "$(uname -m)" = "aarch64" ]];
|
||||
then
|
||||
ARCH=arm64
|
||||
elif [[ "$(uname -m)" = "armv7l" ]];
|
||||
then
|
||||
ARCH=arm
|
||||
elif [[ "$(uname -m)" = "x86_64" ]];
|
||||
then
|
||||
ARCH=amd64
|
||||
fi
|
||||
|
||||
echo Download https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-${ARCH}.tar.gz
|
||||
curl https://dist.ipfs.tech/kubo/v$VERSION/kubo_v${VERSION}_linux-${ARCH}.tar.gz -o kubo_v$VERSION.tgz
|
||||
tar xzf kubo_v$VERSION.tgz
|
||||
rm -fr kubo_v$VERSION.tgz
|
||||
## install ./kubo/ipfs to /usr/local/bin/ipfs
|
||||
cd kubo && sudo bash install.sh
|
||||
cd .. && rm -fr kubo/
|
||||
|
||||
# echo "alias ipfs=`pwd`/kubo/ipfs" >> ~/.bashrc_custom
|
||||
# alias ipfs=`pwd`/kubo/ipfs
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
git clone https://github.com/nvm-sh/nvm.git ~/.nvm
|
||||
|
||||
echo If in China, set mirror before nvm install
|
||||
echo ########################################################################
|
||||
echo
|
||||
echo '############## If in China, set mirror before nvm install ##############'
|
||||
echo export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
|
||||
echo ########################################################################
|
||||
echo '########################################################################'
|
||||
|
Loading…
Reference in New Issue
Block a user