Kerl has only one goal: let's switch between different versions of the OTP. He is a pure bash project. Simple and practical work tool!
The use of the Readme has been explained very clearly. It is recommended to follow the process once.
1. Download
Install (a bash script that doesn't have to be installed at all)
Curl-o https://raw.githubusercontent.com/kerl/kerl/master/kerl&chmod a+x Kerl
2. Working principle
Get all the release package information from official Erlang website, then download the corresponding release and install to the specified directory. You can also use Kerl_build_backend=git
Specifies that source code is downloaded from official.
3. Usage
./Kerlkerl:build andInstallerlang/otpusage:./kerl <command>[Options ...] <command>Command to be executedvalid commands is:BuildBuild specified release or git repositoryInstallInstall The specified release at the given location deploy deploy the specified installation to the give N Host and location update update the list of available releases from your source provider list List releases, builds and installations delete Delete builds and installations active Print the PA Th of the active installation plt Print dialyzer plt Path forThe active installation status print available builds and installations prompt Print astringSuitable forInsertioninchprompt cleanup Remove compilation artifacts (use through installation) version Print current vers Ion (current:1.3.2)
3.1 List all available release packages
$ ./Kerl list releasesr10b-0r10b-TenR10B-1A r10b-2r10b-3r10b-4r10b-5r10b-6r10b-7r10b-8r10b-9r11b-0r11b-1r11b-2r11b-3r11b-4r11b-5r12b-0r12b-1r12b-2r12b-3r12b-4r12b-5r13a R13B01 r13b02-1R13B02 r13b03 r13b04 r13b r14a r14b01 r14b02 r14b03 r14b04 r14b r14b_erts-5.8.1.1R15B01 r15b02 R15b02_with_msvcr100_installer_fix r15b03-1R15B03 r15b r16a_release_candidate r16b01 r16b02 r16b03-1R16B03 r16b17.0-rc117.0-rc217.0 17.1 17.3 17.4 17.5 18.0 18.1 18.2 18.2.1 18.3 19.0Run'./kerl Update Releases'To update the This list from erlang.org
3.2 Download Specify release package and compile
Kerl_configure_options=--enable-hipe./kerl Build19.0 19.0_hipe% Total% Received%xferd Average speed time time dload Upload Total spent - 184 - 184 0 0 the 0 0:xx: on 0:xx: on--:--:-- the 0 64.8M 0 51751 0 0 4277 0 4: -:Geneva 0:xx: A 4: -: the 10189
To get something from the official web under 70M, erlang.org to China is slow, we suggest git source (kerl_build_backend=git)
3.3 View now with Release package list
./Kerl List builds
17.4 17.419.0. 0_hipe
3.4 Installation Package
Install 0_hipe/usr/local/sbin/erl_19_0_hipeinstalling Erlang19.0 (19.0 in /usr/local/sbin//usr/local/sbin/erl_19_0/activatelater on, can leave the installation Typing:kerl_ Deactivate
Wait a moment and you will be prompted to install successfully.
3.5 using the specified version of OTP
If you want to use the installed 19 version of OTP in the current shell, you only need to
$./usr/local/sbin/erl_19_0/activate
Then open the Erlang shell and try:
$erlErlang [erts-8.0] [source] [-bit] [SMP:4:4] [async-threads:ten] [ kernel-poll:false]eshell V8. 0 (Abort with ^G) 1>
Successful use of the 19 release in the current shell.
If you do not want to use it, you can also use the following command to disable
Kerl_deactivate
The above is the basic usage of kerl, and with it, you can install multiple versions of Erlang on this machine. It is very useful to work on multiple versions of the test.
4. Supplement
It may have been noted that this is a recompile from the source code, can be more convenient to specify the parameters of the compilation,
Instead of Kerl_configure_options=--enable-hipe in the command line as above .
This is possible.
Kerl there is a. KERLRC (similar to. bashrc) under home, like my
Emacs ~/. kerlrckerl_configure_options="--disable-hipe--enable-smp-support--enable-threads --enable-kernel-poll --enable-darwin-64bit--with-ssl=/usr/local/cellar/openssl/1.0.2h_1"
In addition to this configure options, there are many items that can be configured in the. KERLRC (detailed instructions can be found in the readme), convenient and not inflexible.
Kerl has a. Kerl under Home (similar to the. SSH directory)
ls Archives builds Otp_builds otp_builds-e otp_installations otp_releases
This is where the Kerl command stores the release and store the install data.
5. Resources
5.1 Elixir also has a corresponding project called Kiex.
5.2 Kerl can even deploy to a remote server to install, as long as you configure SSH key, although not used, but it is too cool.
5.3 Basho using Kerl Installation Documentation: http://docs.basho.com/riak/kv/2.1.4/setup/installing/source/erlang/#kerl-prerequisites
If my fingers were Erlang processes~
[Erlang36]kerl Easy Management installs various OTP versions