Skip to content

Instantly share code, notes, and snippets.

@giabao
Last active May 23, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giabao/8414868 to your computer and use it in GitHub Desktop.
Save giabao/8414868 to your computer and use it in GitHub Desktop.
Use aria2c to download file1. add params (to speedup downloading): -s16 -x16 -k1M2. add --check-certificate=false3. simulate -o option of curl: dl -o /dir/file url will download file to /dir/file insteads of ./dir/file_______Install:1. apt-get install aria2c2. Download & chmod a+x /usr/bin/dl
alias dl='aria2c -x16 -s16 -k1M'
cd ~/Downloads/
dl --header="Cookie: oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz
sudo mkdir -p /opt/java && cd /opt/java
sudo mv ~/Downloads/jdk-8u91-linux-x64.tar.gz .
sudo tar -xzf jdk-8u91-linux-x64.tar.gz
sudo ln -sfT jdk1.8.0_91 default
sudo rm -f jdk-8u91-linux-x64.tar.gz
update-alternatives --display java
sudo update-alternatives --install /usr/bin/java java /opt/java/default/bin/java 1
java -version
sudo update-alternatives --install /usr/bin/javac javac /opt/java/default/bin/javac 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment