Difference between revisions of "Install BMS"

From BiblePay Wiki
Jump to: navigation, search
Line 49: Line 49:
 
sudo ufw enable
 
sudo ufw enable
 
sudo ufw allow from your_home_ip
 
sudo ufw allow from your_home_ip
 +
 +
 +
''' Installing Local MySQL database '''
 +
 +
(MySQL is used to store the internal sidechain transactions and blocks).
 +
 +
 +
sudo apt install mysql-server
 +
 +
 +
sudo systemctl start mysql.service
 +
 +
 +
#now you have mysql running, and by default you are superuser but we need to secure the node
 +
 +
sudo mysql_secure_installation
 +
 +
 +
#Would you like to enable validate password component?
 +
 +
Answer NO
 +
 +
#Set root password:  Set a password that you will remember, and re-enter it  (this is for you, store it somewhere in case you need to manage the node).
 +
 +
 +
#Remove anonymous users? 
 +
YES
 +
 +
#Disallow root login remotely?
 +
NO
 +
 +
#Remove test database?
 +
NO
 +
 +
#Reload privilege tables?
 +
Y
 +
 +
 +
#now we need to go in and create the bms user:
 +
 +
mysql
 +
 +
#Ubuntu responds with mysql>
 +
 +
create database bms;
 +
 +
 +
#responds with OK
 +
 +
create user bmslocal@'%' identified by 'bms';
 +
GRANT ALL PRIVILEGES ON bms.* to 'bmslocal'@'%' WITH GRANT OPTION;
 +
FLUSH privileges;
 +
quit;
 +
 +
#this puts you back at command prompt
 +
 +
 +
 +
''' Continue with final steps of installation '''
 +
 +
 +
  
  

Revision as of 23:39, 28 April 2022

Install BMS on Ubuntu 20.04

cd /

mkdir bms

cd bms

#Install dotnet 20.04:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb 

sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get install -y apt-transport-https

sudo apt-get update 

sudo apt-get install -y dotnet-sdk-3.1

#optional: To see if its OK type "dotnet --info"

dotnet dev-certs https

#It may say "certificate already present", but still necessary.

#retrieve the node software

rm bms.zip  #will say no such file, thats OK

wget https://social.biblepay.org/bms/bms.zip

unzip bms.zip

#prime the node
dotnet BiblePay.BMSD.dll

#You will see: ERROR: missing bms.conf file: This is OK

#Now we need to create a config file

nano /inetpub/wwwroot/bms/bms.conf
bindurl=https://your.sanc.ip:8443


sudo ufw allow 8443/tcp
sudo ufw allow 40000/tcp
sudo ufw allow 40001/tcp
sudo ufw enable
sudo ufw allow from your_home_ip


 Installing Local MySQL database 

(MySQL is used to store the internal sidechain transactions and blocks).


 sudo apt install mysql-server


 sudo systemctl start mysql.service


#now you have mysql running, and by default you are superuser but we need to secure the node

 sudo mysql_secure_installation


#Would you like to enable validate password component?

 Answer NO

#Set root password:  Set a password that you will remember, and re-enter it  (this is for you, store it somewhere in case you need to manage the node).


#Remove anonymous users?  
 YES

#Disallow root login remotely? 
 NO

#Remove test database? 
 NO

#Reload privilege tables? 
 Y


#now we need to go in and create the bms user:

 mysql

#Ubuntu responds with mysql>

 create database bms;


#responds with OK

 create user bmslocal@'%' identified by 'bms';
 GRANT ALL PRIVILEGES ON bms.* to 'bmslocal'@'%' WITH GRANT OPTION;
 FLUSH privileges;
 quit;

#this puts you back at command prompt



 Continue with final steps of installation 





#now start the node
dotnet BiblePay.BMSD.dll

#The node should respond with a top level menu and continue running.


To test the node, point a web browser at:

https://your_sanc_ip:8443/BMS/Status
#You will see WARNING: SSL Certificate invalid.  Just click Details, Proceed anyway (this is OK for the local machine).  In mainnet, the node will use our wildcard SSL cert.