Difference between revisions of "Install BMS"

From BiblePay Wiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 38: Line 38:
 
#You will see: ERROR: missing bms.conf file: This is OK
 
#You will see: ERROR: missing bms.conf file: This is OK
  
#Now we need to create a config file
+
#Now we need to create BMS config file, we do this by executing:
  
 
nano /inetpub/wwwroot/bms/bms.conf
 
nano /inetpub/wwwroot/bms/bms.conf
 +
 
bindurl=https://your.sanc.ip:8443
 
bindurl=https://your.sanc.ip:8443
  
 +
</pre>
  
sudo ufw allow 8443/tcp
+
''' PHASE II:  Additional Items added to BMS.conf as of of May 29th, 2022 to lock in the sidechain with the sanc'''
sudo ufw allow 40000/tcp
+
<pre>
sudo ufw allow 40001/tcp
+
nano /inetpub/wwwroot/bms/bms.conf
sudo ufw enable
 
sudo ufw allow from your_home_ip
 
  
 +
#Add these items:
 +
testnetrpchost=localhost:20001
 +
testnetrpcuser=your_testnet_rpc_user
 +
tesnetrpcpassword=your_testnet_rpc_password
 +
rpchost=localhost:20000
 +
rpcuser=your_mainnet_rpc_user
 +
rpcpassword=your_mainnet_rpc_password
  
''' Installing Local MySQL database '''
 
  
(MySQL is used to store the internal sidechain transactions and blocks).
 
  
 +
#Additionally, Phase II changes requires us to add more settings to our testnet biblepaycore SANCTUARY biblepay.conf file (you can find this at ~/biblepay/biblepaytest.conf):
  
sudo apt install mysql-server
+
testnet=1
 +
masternodeblsprivkey=your_bls_priv_key #this is already set since you set up your testnet sanc
 +
[test]
 +
rpcuser=your_testnet_rpc_username
 +
rpcpassword=your_testnet_rpc_password
 +
server=1
 +
listen=1
 +
daemon=1
 +
rpcbind=0.0.0.0
 +
rpcallowip=127.0.0.1
 +
rpcallowip=your_home_ip
 +
rpcport=20001
  
 +
#Additionally, Phase II changes requires us to add more settings to our MAINNET biblepaycore SANCTUARY config settings to the BiblePay.conf Mainnet file: You can find this at ~/.biblepay/biblepay.conf:
  
sudo systemctl start mysql.service
+
masternodeblsprivkey=your_mainnet_bls_priv_key #(already set)
 +
rpcuser=your_mainnet_rpc_username
 +
rpcpassword=your_mainnet_rpc_password
 +
server=1
 +
listen=1
 +
daemon=1
 +
rpcbind=0.0.0.0
 +
rpcallowip=127.0.0.1
 +
rpcallowip=your_home_ip
 +
rpcport=20000
  
 +
</pre>
 +
'''END OF Phase II changes for May 29th, 2022'''
  
#now you have mysql running, and by default you are superuser but we need to secure the node
+
<pre>
  
sudo mysql_secure_installation
 
  
  
#Would you like to enable validate password component?
+
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
 +
#If you plan to run a randomx pool on ports 3001 (mainnet) and 3002 (testnet):
 +
sudo ufw allow 3001/tcp
 +
sudo ufw allow 3002/tcp
  
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
+
#now start the node
 +
dotnet BiblePay.BMSD.dll
  
#Ubuntu responds with mysql>
+
#The node should respond with a top level menu and continue running.
  
create database bms;
 
  
 +
To test the node, point a web browser at:
  
#responds with OK
+
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.
  
create user bmslocal@'%' identified by 'bms';
+
</pre>
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 '''
+
''' How to Manually Upgrade BMS '''
  
 +
<pre>
  
 +
#Click ctrl-c a few times to close the old copy of BMS and this gives you the command prompt again.
  
 
+
cd /bms
 
+
rm bms.zip
#now start the node
+
wget https://social.biblepay.org/bms/bms.zip
 +
unzip bms.zip
 +
#When it asks should we overwrite files, answer [A] for ALL and press enter.
 +
#At this point the old files are overwritten.
 +
#Now you can start the node again:
 
dotnet BiblePay.BMSD.dll
 
dotnet BiblePay.BMSD.dll
 +
#The node should start
  
#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
+
</pre>
#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.
 

Latest revision as of 19:27, 22 January 2023

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 BMS config file, we do this by executing:

nano /inetpub/wwwroot/bms/bms.conf

bindurl=https://your.sanc.ip:8443

PHASE II: Additional Items added to BMS.conf as of of May 29th, 2022 to lock in the sidechain with the sanc

nano /inetpub/wwwroot/bms/bms.conf

#Add these items:
testnetrpchost=localhost:20001
testnetrpcuser=your_testnet_rpc_user
tesnetrpcpassword=your_testnet_rpc_password
rpchost=localhost:20000
rpcuser=your_mainnet_rpc_user
rpcpassword=your_mainnet_rpc_password



#Additionally, Phase II changes requires us to add more settings to our testnet biblepaycore SANCTUARY biblepay.conf file (you can find this at ~/biblepay/biblepaytest.conf):

testnet=1
masternodeblsprivkey=your_bls_priv_key #this is already set since you set up your testnet sanc
[test]
rpcuser=your_testnet_rpc_username
rpcpassword=your_testnet_rpc_password
server=1
listen=1
daemon=1
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=your_home_ip
rpcport=20001

#Additionally, Phase II changes requires us to add more settings to our MAINNET biblepaycore SANCTUARY config settings to the BiblePay.conf Mainnet file: You can find this at ~/.biblepay/biblepay.conf:

masternodeblsprivkey=your_mainnet_bls_priv_key #(already set)
rpcuser=your_mainnet_rpc_username
rpcpassword=your_mainnet_rpc_password
server=1
listen=1
daemon=1
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=your_home_ip
rpcport=20000

END OF Phase II changes for May 29th, 2022




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
#If you plan to run a randomx pool on ports 3001 (mainnet) and 3002 (testnet):
sudo ufw allow 3001/tcp
sudo ufw allow 3002/tcp










#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.



How to Manually Upgrade BMS


#Click ctrl-c a few times to close the old copy of BMS and this gives you the command prompt again.

cd /bms
rm bms.zip
wget https://social.biblepay.org/bms/bms.zip
unzip bms.zip
#When it asks should we overwrite files, answer [A] for ALL and press enter.
#At this point the old files are overwritten.
#Now you can start the node again:
dotnet BiblePay.BMSD.dll
#The node should start