1 Preparations
1.1 browser to access the installation package download:
https://github.com/yarnpkg/yarn/releases/
Find the need to install version to v1.12.0 for example, the address is:
https://github.com/yarnpkg/yarn/releases/download/v1.12.0/yarn-v1.12.0.tar.gz
1.2 Download Source
$ mkdir -p /usr/local/yarn
$ wget https://github.com/yarnpkg/yarn/releases/download/v1.12.0/yarn-v1.12.0.tar.gz $ tar -zxvf yarn-v1.12.0.tar.gz -C /usr/local/yarn
2 Installation
yarn does not require the installation process, the configuration profile can be used directly after download.
2.1 Set / etc / profile
Vi $ / etc / Profile
# at the end of the file add the following Export the PATH = $ the PATH : / var / local / the Yarn / the Yarn -1.12 . 0 / bin
2.2 immediate effect
source /etc/profile
2.3 Check installation
$ yarn -v
If the installation is successful, it will show:
1.12.0