Erlang(1)Install and Introduction
1. Install the latest Erlang based on Sources
>wget http://www.erlang.org/download/otp_src_R16B03-1.tar.gz
Unzip the file
>tar zxvf otp_src_R16B03-1.tar.gz
>cd otp_src_R16B03-1
>export LANG=C
>./configure --prefix=/Users/carl/tool/erlang-r16b03-1
>make
>sudo make install
Check the shell version
>bin/erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] Eshell V5.10.4 (abort with ^G)
Soft link the tool directory
>sudo ln -s /Users/carl/tool/erlang-r16b03-1 /opt/erlang-5.10.4
>sudo ln -s /opt/erlang-5.10.4 /opt/erlang
>vi ~/.profile
export PATH=/opt/erlang/bin:$PATH
>. ~/.profile
Verify the Installation
>erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.4
Or we can enter the erlang console
>erl
Use Control + G, q + Enter to exit the console mode.
2. Erlang Introduction
Concurrency Oriented, Message Oriented, Functional
OTP Open Telecom Platform
3. Build and Install Yaws
The Erlang Yaws web server performs the same basic tasks as Nginx and Apache.
Apache with mod_php, each request is handled by a process or thread. The classic Common Gateway Interface(CGI) would start a new process for every request.
These threads and processes are constructions of the OS and are relatively heavyweight objects.
In Erlang the processes are owned not by the OS, but by the language runtime.
Fetch the source codes
>git clone https://github.com/klacke/yaws.git
>cd yaws
>autoconf
-bash: autoconf: command not found
Solution:
Install autoconf
>wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
>tar xzvf autoconf-2.69.tar.gz
>cd autoconf-2.69
>./configure --prefix=/Users/carl/tool/autoconf-2.69
>make
>make install
>sudo ln -s /Users/carl/tool/autoconf-2.69 /opt/autoconf-2.69
>sudo ln -s /opt/autoconf-2.69 /opt/autoconf
Add to the PATH in .profile
Go on Install Yaws
>autoconf
But I do not know the version of the github source codes. I plan to do it from downloading the sources.
>wget http://yaws.hyber.org/download/yaws-1.98.tar.gz
>tar zxvf yaws-1.98.tar.gz
>cd yaws-1.98
>./configure --prefix=/Users/carl/tool/yaws-1.98
>make
Error Message:
gcc -c -fPIC -g -O2 -I/usr/include/security -m64 -DHAVE_SENDFILE -I"/Users/carl/tool/erlang-r16b03-1/lib/erlang/usr/include" setuid_drv.c gcc -m64 -bundle -fPIC -flat_namespace -undefined suppress -o ../priv/lib/setuid_drv.so setuid_drv.o gcc -c -g -O2 -I/usr/include/security -m64 -DHAVE_SENDFILE -I"/Users/carl/tool/erlang-r16b03-1/lib/erlang/usr/include" epam.c epam.c:2:10: fatal error: 'pam_appl.h' file not found #include <pam_appl.h>
Solution:
http://stackoverflow.com/questions/21149481/fails-to-build-yaws-on-mac-os-x-10-9
I begin to try with this command
>sudo xcode-select —install
This command will try to install Command Lne Tools. And it will place some files we need into this directory /usr/include/security
Go on with install Yaws.
>make
>make install
After the Installation, all the info will show as follow:
** etc files went into /Users/carl/tool/yaws-1.98/etc ** executables went into /Users/carl/tool/yaws-1.98/bin ** library files went into /Users/carl/tool/yaws-1.98/lib/yaws ** var files went into /Users/carl/tool/yaws-1.98/var ** default docroot went into /Users/carl/tool/yaws-1.98/var/yaws/www
>sudo ln -s /Users/carl/tool/yaws-1.98 /opt/yaws-1.98
>sudo ln -s /opt/yaws-1.98 /opt/yaws
Start the server
>yaws -i
or
>yaws —daemon
How to configure it
http://yaws.hyber.org/yman.yaws?page=yaws.conf
Comments out the yaws.conf
#<auth> # realm = foobar # dir = / # user = foo:bar # user = baz:bar #</auth>
Visit the Server again
>sudo bin/yaws -i
And you can visit the URL http://localhost/ to access your /tmp directory.
References:
http://blog.csdn.net/xushiweizh/article/details/3466739
http://www.erlang.org/
http://www.erlang.org/doc/installation_guide/INSTALL.html
Sillycat
http://sillycat.iteye.com/blog/1575002
http://sillycat.iteye.com/blog/1565771
http://sillycat.iteye.com/blog/2037218
https://github.com/ChicagoBoss/ChicagoBoss/wiki/Comparison-of-Erlang-Web-Frameworks
http://inaka.net/blog/2013/11/06/your-first-erlang-app-canillita/
http://www.infoq.com/cn/news/2008/06/vinoski-erlang-rest
http://wbj0110.iteye.com/blog/1984410
http://ninenines.eu/docs/en/cowboy/HEAD/guide/
http://yaws.hyber.org/
http://www.cnblogs.com/yourihua/category/329317.html
Install autoconf
http://jsdelfino.blogspot.com/2012/08/autoconf-and-automake-on-mac-os-x.html
http://www.gnu.org/software/autoconf/
http://stackoverflow.com/questions/21149481/fails-to-build-yaws-on-mac-os-x-10-9
- 浏览: 2539820 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
发表评论
-
NodeJS12 and Zlib
2020-04-01 07:44 467NodeJS12 and Zlib It works as ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 464NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 285Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 302Serverless with NodeJS and Tenc ... -
NodeJS MySQL Library and npmjs
2020-02-07 06:21 276NodeJS MySQL Library and npmjs ... -
Python Library 2019(1)requests and aiohttp
2019-12-18 01:12 254Python Library 2019(1)requests ... -
NodeJS Installation 2019
2019-10-20 02:57 564NodeJS Installation 2019 Insta ... -
Monitor Tool 2019(2)Monit on Multiple Instances and Email Alerts
2019-10-18 10:57 255Monitor Tool 2019(2)Monit on Mu ... -
Sqlite Database 2019(1)Sqlite3 Installation and Docker phpsqliteadmin
2019-09-05 11:24 356Sqlite Database 2019(1)Sqlite3 ... -
Supervisor 2019(2)Ubuntu and Multiple Services
2019-08-19 10:53 363Supervisor 2019(2)Ubuntu and Mu ...
相关推荐
Erlang and OTP in Action Martin Logan, Eric Merritt, and Richard Carlsson MEAP Began: August 2008 Softbound print: May 2010 (est.) | 500 pages ISBN: 1933988789 Part One: Getting Past Pure Erlang; ...
Learn and understand Erlang and Elixir and develop a working knowledge of the concepts of functional programming that underpin them. This book takes the author’s experience of taking on a project ...
sudo yum install rabbitmq-server-3.8.17-1.el8.noarch.rpm ``` 完成安装后,还需要启动并启用RabbitMQ服务: ```bash sudo systemctl start rabbitmq-server sudo systemctl enable rabbitmq-server ``` 最后,...
This package contains the Erlang/OTP runtime implementation, which is configured and built with HiPE support (allows compiling to native code), and minimal set of Erlang applications: compiler - ...
- **BEAM虚拟机**:Erlang的运行时系统,全称是BIFs (Built-In Functions)、Erlang、Assembler and Memory管理器。 - **OTP行为**:如Supervisor(监督者)、GenServer(通用服务器)、GenEvent(事件处理器)等,...
实现爱尔兰B公式和爱尔兰C公式,功能齐全,适用于通信网课程中的实验。
sudo yum install erlang-18.3-1.el7.centos.x86_64.rpm ``` 3. 安装完成后,继续安装RabbitMQ的RPM包: ``` sudo yum install rabbitmq-server ``` 4. 最后,启动RabbitMQ服务并设置开机启动: ``` sudo ...
1. 先安装Erlang:因为RabbitMQ依赖于Erlang环境,所以必须先确保Erlang正确安装并配置到系统路径。 2. 获取Erlang OTP的安装包:可以从官方或可靠的第三方源下载适用于Windows的Erlang OTP 25.2.3版本。 3. 安装...
安装rabbitmq需要适配相应的erlang,由于下载速度慢,这里提供了centos7 64系统下可用的erlang23和rabbitmq3.8.3,安装方式:yum install xxxx.rpm即可。注意要优先安装erlang。
1. **下载**:你可以从Erlang Solutions官网或者通过提供的压缩包文件"Erlang 20.3linux░▓╫░░ⁿ"和"Erlang 20.3linux安装包"下载Erlang的Linux二进制包。 2. **解压**:解压缩下载的文件到一个合适的目录,...
1. **版本号**:22.3-1表示这是Erlang的一个特定版本,22.3是主版本号和次版本号,而-1可能代表修订或更新次数。 2. **操作系统兼容性**:el7表明这个版本的Erlang是针对Red Hat Enterprise Linux 7 (RHEL 7)或其...
标题提到的“适用于Windows版本的Erlang24 and RabbitMQ server 3.8.16下载”,意味着这两个组件的最新稳定版本已适配Windows操作系统。Erlang otp_win64_24.0是针对64位Windows系统的Erlang OTP(开放电信平台)...
### 1. 函数式编程基础 Erlang基于函数式编程范式,这意味着程序由纯函数构成,没有副作用。函数式编程强调数据不可变性和函数的数学属性,使代码更易于理解、测试和并行处理。 ### 2. 并发与轻量级进程 Erlang的...
- 使用yum安装Erlang:`sudo yum install erlang-23.3.4.3-1.el7.x86_64.rpm` 2. **安装RabbitMQ**: - 下载RabbitMQ RPM包:`wget https://your_download_link/rabbitmq-server-3.8.17-1.el7.noarch.rpm` - ...
安装过程通常通过命令行工具如`yum`或`dnf`进行,命令可能是`sudo yum install erlang-19.0.4-1.el7.centos.x86_64.rpm`或`sudo dnf install erlang-19.0.4-1.el7.centos.x86_64.rpm`,具体取决于你的系统配置。...
4. **安装**:完成编译后,使用`sudo make install`将Erlang安装到系统路径中。 对于开发者来说,了解这些更新和变化至关重要,因为它们可能影响到现有项目的行为,或者提供新的工具和技术来解决特定问题。学习和...