Ubuntu Setup
1. Install Requirements
sudo apt-get update
sudo apt-get install inotify-tools && sudo apt install make && sudo apt install g++
sudo apt-get install libudev-dev zip unzip build-essential cmake -y
sudo apt-get install git \
automake \
libtool inotify-tools \
libgmp-dev \
libgmp10 \
build-essential \
cmake -y
2. Install ASDF
Clone ASDF Plugin
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
Edit your ubuntu profile
nano .profile
add this line in end break
. $HOME/.asdf/asdf.sh and ctrl + x (or Save)
Refresh your profile after the update
source ~/.profile
Test active asdf after refresh
asdf version
v0.13.1-fad23bc Note: Response following successful install
Add asdf plugin for erlang, elixir, and nodejs
asdf plugin add erlang
asdf plugin add elixir
asdf plugin add nodejs
install additional prerequisites
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
3. Install PostgreSQL-14
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt install postgresql-14
sudo systemctl status postgresql
4. Add user and database in postgres-14
Create user on localpc or server
adduser dbusername Note: Replace dbusername with your username.
You will be prompted to create a new profile, just follow the flow.
After Adduser now connect to postgres-14
su - postgres (for Root) or sudo -i -u postgres (for user)
Display when entering postgres user section looks like this in terminal
postgres@ubuntu:~$
Create user
createuser --interactive dbusername
Create database
createdb blockscout
connect to psql
psql
Create Password database in dbusername Note
ALTER USER dbusername WITH PASSWORD 'dbuserpassword'; Note: Replace dbusername and dbuserpassword that you created
Create Privileges on dbusername to database
GRANT ALL PRIVILEGES ON DATABASE blockscout TO dbusername;
Note: Replace dbusername
exit psql
\q
Exit to profile postgresql
postgres@ubuntu:~$ exit
Restart postgresql
sudo systemctl restart postgresql
Check new profile that you created at start of adduser replaceing dbusername with your username.
su - dbusername (for Root) or sudo su - dbusername (for user) Note: Replace your dbusername
Run this command
psql -d blockscout
If everything is correct, you will see this response
blockscout=#
Quit psql
\q
Exit for Database Account page
dbusername@ubuntu:~$ exit
5. Install Rustup / Cargo
After Setup Database, You can Install Rust before installing Blockscout
6. After installing everything, clone the Blockscout repository and install .tool-version from the repository
Clone Repository Blockscout
git clone https://github.com/blockscout/blockscout blockscout-backend
Enter to folder clone blockscout
cd blockscout-backend
Install plugin requirements Erlang, Elixir, and Nodejs before install blockscout backend
asdf install
🎉 You are ready for manual deployment! Proceed to step 3 in the "Prepare the Backend section"
Last updated