官术网_书友最值得收藏!

Configuring PostgreSQL

The first thing we need to do is create a user and database that SonarQube can use. Just for the record, SonarQube can work with SQL Server, MySQL, and Oracle too, but PostgreSQL is always a good (and free) choice.

On Ubuntu, open the PostgreSQL terminal and run the script to create a sonar user and then the script to create a database, making the sonar user the owner:

sudo -u postgres psql
\create user sonar with password 'sonar';
\create database sonar with owner sonar encoding 'UTF8';
\q

The UTF8 encoding is NOT optional, so be sure to include it. Also, don't forget the semicolons at the end of your statements.

On Windows, you can also create a user and database using the command prompt. It only differs from Ubuntu in the first line:

cd "C:\Program Files\PostgreSQL\9.5\bin\psql" -U postgres
[enter password]
\create user sonar with password 'sonar';
\create database sonar with owner sonar encoding 'UTF8';
\q

If you installed PostgreSQL in another folder, you should change that in the command. You may, of course, also create a user and database using pgAdmin. Just right-click on the Login/Group Roles node and create. Same for the new database.

主站蜘蛛池模板: 山阳县| 富平县| 攀枝花市| 尉氏县| 甘泉县| 钦州市| 宜章县| 南部县| 盖州市| 唐山市| 巴里| 新密市| 武平县| 阿拉善右旗| 夏邑县| 邯郸县| 宿迁市| 应用必备| 增城市| 昌平区| 井冈山市| 手机| 阳谷县| 南昌市| 余干县| 静宁县| 托克托县| 都匀市| 林口县| 江陵县| 罗江县| 贞丰县| 子洲县| 财经| 当涂县| 清新县| 天镇县| 鄂尔多斯市| 科技| 镇沅| 怀来县|