pgrouting icon indicating copy to clipboard operation
pgrouting copied to clipboard

Update installation instructions to be more clear

Open MarPetra opened this issue 4 years ago • 6 comments
trafficstars

Update installation instructions to be more clear

  1. Open a terminal:

sudo apt-get install cmake

  1. Visit https://docs.pgrouting.org/dev/en/pgRouting-installation.html#get-the-sources and install postgres sources

  2. To find out what version of postgis we have installed

psql --version

  1. Follow the instructions available at https://www.postgresql.org/download/linux/ubuntu/
sudo apt-get -y install postgresql

sudo apt-get install postgresql-server-dev-13

sudo apt-get install libboost-graph-dev
  1. In this case, when trying to create a test database createdb foo, the following error emerged:

createdb: error: could not connect to database template1: FATAL: role "user" does not exist

  1. Then, an error with the postgres user:

psql -U postgres psql: error: FATAL: Peer authentication failed for user "postgres"

  1. Fix that editing the following file with vi or the editor you prefer:
`vi /etc/postgresql/13/main/pg_hba.conf`
  • Once inside, change the first "peer" to "trust", save and exit
  1. sudo service postgresql restart
  • Now psql -U postgres works!
CREATE ROLE youruser SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN PASSWORD 'yourpasword';
\q
  1. Now follow the Short version: https://docs.pgrouting.org/dev/en/pgRouting-installation.html#short-version
  • sudo apt-get install postgresql-13-postgis-3
  1. Then, from the root of the repository:
python3 -m venv pgr-env
source pgr-env/bin/activate
pip install -r requirements.txt
  1. To create the documentation:
cd build
ls
rm -rf *
cmake -DWITH_DOC=ON -DES=ON  ..
make doc
  1. Configure your user information:
git config --global user.name "MyUser"
git config --global user.email [email protected]

MarPetra avatar Jan 23 '21 23:01 MarPetra

Thanks for creating the issue. Will work on the installation instructions soon based on the process you made

cvvergara avatar Jan 25 '21 15:01 cvvergara

We can improve the instruction 7. Fix that editing the following file with vi or the editor you prefer: more.

By running this command:

 `vi /etc/postgresql/13/main/pg_hba.conf`

the following error occurs:

"/etc/postgresql/13/main/pg_hba.conf" [Permission Denied]

Instead we can edit with admin right as:

`sudo vi /etc/postgresql/13/main/pg_hba.conf`

 or

`sudo nano /etc/postgresql/13/main/pg_hba.conf`

Now it will work fine.

veenits123 avatar Mar 04 '21 15:03 veenits123

We can also address this error, While Uploading Data to the database using this command:

osm2pgrouting \
>     -f Bucaresti_RO.osm \
>     -d city_routing \
>     -U user 

the following error emerged:

could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?

Fix that by editing this file: sudo vi /etc/postgresql/13/main/postgresql.conf

Inside this file change:

#listen_addresses = 'localhost'   to   #listen_addresses = '*'

and

port = 5433   to  port = 5432

Exit and run this: sudo service postgresql restart

Now, this

osm2pgrouting \
>     -f Bucaresti_RO.osm \
>     -d city_routing \
>     -U user 

will work!

veenits123 avatar Apr 13 '21 09:04 veenits123

@cvvergara I will like to work on this issue from tomorrow evening IST. Got an exam tomorrow so would be working on that before beginning this task.

sbdtu5498 avatar May 03 '22 09:05 sbdtu5498

@sbdtu5498 ok

cvvergara avatar May 04 '22 00:05 cvvergara

Assigned this issue to you. Work is to be done on develop and main branches. The installation file is in doc/src/pgRouting-installation.rst Start the work on the main branch. after that you can cherry-pick to develop branch

cvvergara avatar May 04 '22 00:05 cvvergara