Installing Firebird and node-firebird on the Raspberry Pi
The following steps describe how to install and test Firebird then node-firebird on the Raspberry Pi. You need to install Node.js before node-firebird. You should find this installation easier if you have worked through our Smart Pascal section on networking. The section covers the use of socket.io (that we also employ here for real-time updating of clients).
Type or copy the commands below at the prompt and accept any invitations to continue. When invited, set the sysdba password, to which we will refer as NEWPASS.
We have tried to include all the many necessary steps for the Debian OS on a Pi. Please inform us about anything that would make it easier for a student to succeed in this challenging but rewarding project.
- sudo apt-get install firebird2.5-super
- sudo dpkg-reconfigure firebird2.5-super
Copy CONTRIBUTIONS.FDB to the home folder and change directory if necessary to this folder.
If you would prefer to create a database on the Raspberry Pi, follow the instructions in the main Pascal database tutorial.
sudo chown firebird.firebird CONTRIBUTIONS.FDB
This gives the database the required ownership.
sudo mv CONTRIBUTIONS.FDB /var/lib/firebird/2.5/data
This moves the database to its expected location.
gsec -user sysdba -pass NEWPASS -add student -pw pp4s
This creates the user with name student and password pp4s.
This is the equivalent of isql in windows to obtain the Firebird prompt.
- connect /var/lib/firebird/2.5/data/CONTRIBUTIONS.FDB user 'student' password 'pp4s';
- SELECT * from Programmer
- npm install node-firebird
You should see confirmation that the server is running.
- To test thoroughly the server and set-up, work through the demo on the following page.