Solved Postgresql does not accept commands

I was wondering if I have the wrong commands but I read the commands at https://www.postgresql.org/docs/9.1/static/sql-createtable.html
and I still make mistakes, can anyone point out how should I go on with this?

I am trying to install Bacula and Postgresql using this guide https://dan.langille.org/2015/01/10/bacula-on-freebsd-with-zfs/
and the commands that are working are

# pkg install bacula-server
# pkg install postgresql93-server
# service postgresql initdb
# service postgresql start
# su pgsql
# cd /usr/local/share/bacula/


When in pgsql I created user using this command and it went well

$ createuser -d bacula

But after that line I get problems when creating bacula database, the next command is

./create_bacula_database

and returns an error of "./create_bacula_database: not found"
after researching on what to do I found out that command needs to be
createdb -O bacula bacula
the first bacula in the command is the database user to own the new database and the second bacula is the name of the new database.

The remaining commands that I need to execute are
Code:
./make_bacula_tables
./grant_bacula_privileges
I can't find anywhere what are the right commands to replace those to make it working.
I also tried $ make bacula tables and it gives off an error "make: don't know how to make bacula. Stop make: stopped in /usr/home/freebsd" as well as the command ./grant_bacula_privileges.

And what does the author mean about ./ when in pgsql it only displays $ when typing commands. I installed the same pkg as listed above and pgsql does not recognize it.

Hopefully after configuring postgresql, I can finish the guide smoothly. Its very hard to find guides on the internet about bacula and freebsd I can only find this guide and hope it works. Thank you! ;)
 
The ./make_bacula_tables and ./grant_bacula_privileges commands are Bacula scripts. More information about them and how to run them is on the 'Installing and Configuring PostgreSQL' manual page here.
 
Back
Top