System information
Installing and Configuring PostgreSQL and MySQL
In the following sections we will show how to install and configure PostgreSQL and
MySQL on both CentOS and Ubuntu.
*
It is recommended that you only install one
database at a time while working through this section. Pick the database you are most
comfortable with, as there is no wrong choice.
Installing PostgreSQL for CentOS
The following command can be used to install the PostgreSQL server and its depend-
encies from the console:
$ sudo yum install -y postgresql-server
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 6.9 M
Is this ok [y/N]: y
Then start the database, which will take a few seconds to initialize for the first time:
$ sudo service postgresql start
Now head to “Configuring PostgreSQL” on page 343 for instructions on how to per-
form the initial configuration.
Installing PostgreSQL for Ubuntu
To install PostgreSQL on Ubuntu, run the following command. You will be prompted
to also install any additional packages that are dependencies of the application. Press
Enter
to accept the list of dependencies, at which point the packages will be installed
and PostgreSQL will be automatically started and initialized:
$ sudo apt-get install postgresql
...
After this operation, 19.1MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Now head to “Configuring PostgreSQL” on page 343 for instructions on how to per-
form the initial configuration.
* On a large, busy system you will want to install the database on a completely separate box from your Asterisk
system.
342 | Chapter 16: Relational Database Integration