Skip to content

Instantly share code, notes, and snippets.

@techgaun
Last active May 30, 2024 00:30
Show Gist options
  • Save techgaun/335ef6f6abb5a254c66d73ac6b390262 to your computer and use it in GitHub Desktop.
Save techgaun/335ef6f6abb5a254c66d73ac6b390262 to your computer and use it in GitHub Desktop.
Running elixir 1.8.1 on amazon linux

Script

#!/bin/bash

yum install ncurses-devel openssl-devel -y
yum groupinstall "Development Tools" -y

cd /tmp
wget "http://erlang.org/download/otp_src_21.3.tar.gz" -O otp21.tar.gz
tar xfz otp21.tar.gz
cd otp_src_21.3/
./configure
make && make install

cd /tmp
wget "https://github.com/elixir-lang/elixir/archive/v1.8.1.tar.gz"
tar xfz v1.8.1.tar.gz
cd elixir-1.8.1/
export PATH="${PATH}:/usr/local/bin"
make && make install

mix local.hex --force
mix local.rebar --force

Step-by-step Process

pre-install

yum install ncurses-devel openssl-devel

install erlang

wget "http://erlang.org/download/otp_src_21.3.tar.gz" -O otp21.tar.gz
tar xfz otp21.tar.gz
cd otp_src_21.3/
./configure
make && make install

install elixir

cd ..
wget "https://github.com/elixir-lang/elixir/archive/v1.8.1.tar.gz"
tar xfz v1.8.1.tar.gz
cd elixir-1.8.1/
export PATH="${PATH}:/usr/local/bin"
make && make install

install deps

mix local.hex --force
mix local.rebar --force
@gmodarelli
Copy link

I had to change the following to make it work for me:

install erlang

sudo yum groupinstall "Development Tools"
...
make && sudo make install

install elixir

...
sudo make install -e PATH="${PATH}:/usr/local/bin"

@lioPixiumDigital
Copy link

just installed OTP 24.1.7 and Elixir 1.13.1 on an AWS EC2 AmazonLinux2 server
(thanks @gmodarelli for your comment)
it worked like a charm.

@tpneumat
Copy link

tpneumat commented May 30, 2024

Wonderful thx! I just did this and it worked well:

cd /usr/local/src
wget "http://erlang.org/download/otp_src_25.3.tar.gz" -O otp25.3.tar.gz
tar xfz otp25.3.tar.gz
cd otp_src_25.3/
./configure
make && make install
cd ..

cd /usr/local/src
wget "https://github.com/elixir-lang/elixir/archive/v1.15.8.tar.gz"
tar xfz v1.15.8.tar.gz
cd elixir
make && make install
export PATH="${PATH}:/usr/local/bin"
cd ..
mix local.hex --force
mix local.rebar --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment