Skip to content

Commit

Permalink
Merge pull request #215 from Raphux/master
Browse files Browse the repository at this point in the history
Doc changes and removed outdate install script
  • Loading branch information
Raphux committed Nov 2, 2017
2 parents ea47cda + 6b3b45c commit da08e4a
Show file tree
Hide file tree
Showing 13 changed files with 1,049 additions and 391 deletions.
12 changes: 11 additions & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Example prerequisites
=====================
For this tutorial, we will use the following infos :

.. image:: images/PaSSHport-getting_started_1_EN.png

1 PaSSHport node
----------------
We'll use a monolithic installation of PaSSHport : passhportd, passhport and passhport-admin are on the same host.
Expand All @@ -25,14 +27,19 @@ We'll use a monolithic installation of PaSSHport : passhportd, passhport and pas
3 types of targets
-------------------
* Linux/Unix servers :

- 1 web server, Linux, www-server / 10.0.1.24
- 1 VPN server, OpenBSD, vpn-srv1 / 10.0.23.51
- 1 NAS server, FreeBSD, nas-srv1 / 10.0.12.87

* Network appliances

- 1 WiFi access points, net-AP9-23 / 172.22.9.23
- 1 router, net-RO10-98 / 172.16.10.98
- 1 network switch, net-SW22-57 / 172.20.22.57

* Other appliances

- 1 IPBX, ipbx1 / 10.192.98.76
- 1 Network printer, prntr44 / 192.168.254.44
- 1 SAN bay, san1 / 10.192.1.10
Expand All @@ -41,5 +48,8 @@ Configure targets
-----------------
First of all, we'll include the targets into PaSSHport.

Let's connect to your PaSSHport node, and add the linux target :
Let's connect to your PaSSHport node, and add the linux target, you can do this as passhport :

.. code-block:: none
#
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Table of content :
:maxdepth: 2

introduction
installation-and-configuration
installation-and-configuration/index
getting-started
passhport-admin
advanced-usage
Expand Down
File renamed without changes
10 changes: 10 additions & 0 deletions docs/installation-and-configuration/index.rst
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
Original file line number Diff line number Diff line change
Expand Up @@ -277,53 +277,3 @@ You can check in you browser, by going to the below URL (replace 0.0.0.0 by the

.. image:: images/passhportd-running.png

Use PostgreSQL has 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.
50 changes: 50 additions & 0 deletions docs/installation-and-configuration/use-postgresql-as-backend.rst
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.

0 comments on commit da08e4a

Please sign in to comment.