In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the process of installing and managing Erlang with Kerl under Ubuntu". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the process of installing and managing Erlang with Kerl under Ubuntu".
1. Installation depends on sudo apt-get updatesudo apt-get install make sudo apt-get install build-essentialsudo apt-get install M4 sudo apt-get install rsync sudo apt-get install lrzsz sudo apt-get install bc sudo apt-get install sysstat sudo apt-get install lsof sudo apt-get install wget sudo apt-get install automake sudo apt-get install autoconfsudo apt-get install libssl-devsudo apt-get install libreadline-devsudo apt-get install libncurses5-devsudo apt-get install xsltprocsudo apt-get install libxml2-utilssudo apt-get install unixodbc unixodbc-devsudo apt-get install Libtoolsudo apt-get install libxml2-utils xsltproc fopsudo apt install libwxbase3.0-devsudo apt-get install mesa*sudo apt-get install tk
Some of the installation may fail due to network speed. Try it a few more times.
two。 Install kerl
Installation location:
Cd / home/summergao/kerl
download
Curl-O https://raw.githubusercontent.com/kerl/kerl/master/kerl
Or
Wget https://github.com/kerl/kerl/archive/1.8.4.tar.gztar-xvf 1.8.4.tar.gzcd kerl-1.8.4/cp kerl.. /
Modify execution permissions
Chmod axix kerl3. Mating environment variable sudo vim ~ / .bashrc
Add at the end of the open file:
Export KERL_HOME=/home/summergao/kerlexport PATH=$ {KERL_HOME} /: $PATH
To make the configuration effective:
Source / .bashrc
Formal ubuntu configuration mode
Vim / etc/profile
Add the following code under export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL:
Export KERL_HOME=/home/summergao/kerlexport PATH=$ {KERL_HOME} /: $PATH
Make the configuration effective
Source / etc/profile
Verify that the environment variable is configured successfully
Kerl version
4. Update the version kerl update releases from the erlang official website
5. Show all released versions of kerl list releases6. Build the specified version (compiled using Java by default, which requires installation of JDK and configuration of environment variables)
Method 1. Use Java to compile by default
Kerl build 22.0 22.0
Method 2. (cancel java compilation) use gcc to compile
KERL_CONFIGURE_OPTIONS=--without-javac kerl build 22.0 22.0
As an experimental feature, it can also be built from the git repository
Kerl build git https://github.com/erlang/otp.git dev 19.2_dev
It takes a while to build. It is recommended to wait patiently.
[summergao@SummerGao builds] # kerl build 22.0 22.0
Verifying archive checksum...
Checksum verified (9842663e49f48e967c44b7574423f9e9)
Extracting source code
Building Erlang/OTP 22.0 (22.0), please wait...
APPLICATIONS DISABLED (See: / home/summergao/.kerl/builds/22.0/otp_build_22.0.log)
* jinterface: No Java compiler found
APPLICATIONS INFORMATION (See: / home/summergao/.kerl/builds/22.0/otp_build_22.0.log)
* wx: wxWidgets not found, wx will NOT be usable
If the above information appears, you need to open another terminal to install JDK JDK.
When JDK is installed successfully, it prompts:
Erlang/OTP 22.0 (22.0) has been successfully built
Download installation package may be very slow, to this end, you can use Thunderbolt to download the installation package first, such as installation 22.0: first visit https://www.erlang.org/downloads/22.0 to find: OTP 22.0 Source File (91806805) right copy link address to Xunlei download. After the download is complete, copy (or upload) to the / home/summergao/.kerl/archives directory (pay attention to flexibility, change to your own directory), and re-execute step 6.
7. Show the built version of kerl list builds
The displayed results are separated by,. The first column is the version number listed in the kerl list releases command, and the second column is the build name, which can be used by subsequent kerl install commands.
[summergao@SummerGao home] # kerl list builds
22.0,22.0
[summergao@SummerGao home] #
8. Display status kerl status
[summergao@SummerGao home] # kerl status
Available builds:
22.0,22.0
-
Available installations:
There are no installations available
-
No Erlang/OTP installation is currently active
[summergao@SummerGao home] #
9. Install a specific version of kerl install 22.0 ~ / kerl/22.0
Installing Erlang/OTP 22.0 (22.0) in / home/summergao/kerl/22.0...
You can activate this installation running the following command:
. / home/summergao/kerl/22.0/activate
Later on, you can leave the installation typing:
Kerl_deactivate
Installation will take some time. Please wait patiently.
10. Displays the installed version of kerl list installations11. Activate a specific version. / home/summergao/kerl/22.0/activate
Activating will back up your $PATH and add it to the installed bin / directory. Therefore, it is only valid for the current shell session until you activate another installation or call kerl_deactivate.
twelve。 View activated Erlang version kerl active
[summergao@SummerGao home] # kerl active
The current active installation is:
/ home/summergao/kerl/22.0/activate
[summergao@SummerGao home] #
13. Trial operation of erlerl
[summergao@SummerGao home] # erl
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Eshell V10.4 (abort with ^ G)
1 >
Expansion: 14. Delete a specific build kerl delete build 22.013. Configuration
You can execute the built configuration options on the command line, or you can configure them in the configuration file.
① configuration compilation options
The command line is specified by compilation parameters, such as:
KERL_CONFIGURE_OPTIONS=--enable-hipe kerl build 22.0 22.0_hipe
The ② configuration file is specified in $HOME/.kerlrc
# $HOME/.kerlrcKERL_CONFIGURE_OPTIONS= "- disable-debug-- without-javac-- enable-shared-zlib-- enable-dynamic-ssl-lib-- enable-hipe-- enable-smp-support-- enable-threads-- enable-kernel-poll-- with-wx" ③ configuration application
Build a minimum Erlang environment that contains only three kernel,stdlib,sasl applications
KERL_CONFIGURE_APPLICATIONS= "kernel stdlib sasl" kerl build 22.0 22.0_minimal ④ disables applications
Exclude ODBC applications from the built Erlang environment
KERL_CONFIGURE_DISABLE_APPLICATIONS= "odbc" kerl build 22.0 22.0_no_odbc ⑤ installation Erlang
Install to the specified directory, in order to be able to install multiple versions, the installation directory should be identified by the version number
Kerl install
For example
Kerl install 22.0_hipe / tmp/erlang/22.0_hipe15. Deployment
Deploy the specified Erlang build to a remote server, so that in a cluster, we can compile on one server and deploy the Erlang runtime environment of all cluster nodes.
Kerl deploy [directory] [remote_directory] kerl deploy test@192.168.1.100 / deploy/erlang/22.0_hipe
Note:
To configure the public key, ssh can log in to the remote server directly without a password.
Just add the public key to the $HOME/.ssh/authorized_key file on the remote server
The local default public key location is $HOME/.ssh/id_rsa.pub
Thank you for your reading, these are the contents of "the process of installing and managing Erlang with Kerl under Ubuntu". After the study of this article, I believe you have a deeper understanding of the process of installing and managing Erlang with Kerl under Ubuntu, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.