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

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.

主站蜘蛛池模板: 荔波县| 荥阳市| 丰镇市| 江达县| 来安县| 汶川县| 铁岭县| 德化县| 滕州市| 三穗县| 吉木萨尔县| 崇阳县| 蒲江县| 靖远县| 北辰区| 闻喜县| 兖州市| 平邑县| 平武县| 德清县| 兴文县| 邛崃市| 临泉县| 彰化县| 军事| 枣庄市| 伊宁县| 天柱县| 满洲里市| 东光县| 威远县| 马鞍山市| 合水县| 庐江县| 托里县| 长春市| 东兰县| 甘孜| 浦北县| 桑日县| 吉木乃县|