-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from Raphux/master
Doc changes and removed outdate install script
- Loading branch information
Showing
13 changed files
with
1,049 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Installation and configuration | ||
############################### | ||
|
||
This chapter describes the installation on different distro, and the main configuration principles. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
installation-on-debian | ||
use-postgresql-as-backend.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
docs/installation-and-configuration/use-postgresql-as-backend.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Use PostgreSQL as database backend | ||
=================================== | ||
|
||
If you want to use PostgreSQL has the database backend you'll need to add a python module : psycopg2. | ||
|
||
As passhport user, install psycopg2 : | ||
|
||
.. code-block:: none | ||
$ /home/passhport/passhport-run-env/bin/pip install psycopg2 | ||
Create a passhport user in you postgreSQL server (may be different on your distro, this is just an example) : | ||
|
||
.. code-block:: none | ||
# su - postgres | ||
$ createuser -D -S -R passhport && createdb -O passhport "passhport" | ||
Add a password to postgreSQL passhport user : | ||
|
||
.. code-block:: none | ||
$ psql | ||
psql (9.2.18) | ||
Type "help" for help. | ||
postgres=# ALTER USER "passhport" WITH PASSWORD 'MySUpErp45sw0rD'; | ||
ALTER ROLE | ||
postgres=# \q | ||
$ | ||
Change the configuration of the *passhportd.ini* file (``/etc/passhport/passhportd.ini``). You need to change the ``SQLALCHEMY_DATABASE_URI`` parameter to : | ||
|
||
.. code-block:: none | ||
SQLALCHEMY_DATABASE_URI = postgresql://passhport:MySUpErp45sw0rD@localhost/passhport | ||
As passhport (system) user, initialize the database : | ||
|
||
.. code-block:: none | ||
$ /home/passhport/passhport-run-env/bin/python /home/passhport/passhport/passhportd/db_create.py | ||
Then you can launch *passhportd* (kill it before if it stills running) : | ||
|
||
.. code-block:: none | ||
$ /home/passhport/passhport-run-env/bin/python /home/passhport/passhport/passhportd/passhportd | ||
PaSSHport now use PostgreSQL backend. |
Oops, something went wrong.