Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsantiago committed Sep 27, 2022
1 parent 52cc29a commit 3d51e70
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,23 @@ Before installing pyodbc you must install the packages from Debian/Ubuntu system

1.1 INSTALLING ON DEBIAN-BASED LINUX DISTRIBUTIONS.

Install python and odbc modules

```
sudo apt update
sudo apt install libpq-dev python-dev python3-dev
sudo apt install python3.5-dev python3.6-dev
sudo apt install unixodbc-dev
sudo apt install libpq-dev python-dev python3-dev python3.6-dev
sudo apt install build-essential
```

Install unixodbc

```
sudo apt install unixodbc-dev unixodbc
```

To connect to IBM iSeries systems we will need to download a .deb file, this library can be downloaded from the IBM page https://www.ibm.com/support/pages/ibm-i-access-client-solutions. So let's create an account, log in, and download the IBM i Access for Linux package.

Example installation instructions:
Copy the downloaded iseries odbc driver to the server and install:
```
sudo apt install ./ibm-iaccess-1.1.0.15-1.0.ppc64el.deb
```
Expand All @@ -35,28 +42,27 @@ pip install pyiaccess
Create a .env file in the root of your project

```
ISERIE_DSN = LIBRARY
ISERIE_HOST = HOST
ISERIE_USER = USER
ISERIE_PASSWORD = PASSWORD
IBMI_DSN = YOUR DATABASE
IBMI_HOST = YOUR IP
IBMI_USER = YOUR USER
IBMI_PASSWORD = YOUR PASSWORD
IBMI_PORT = YOUR PORT # Define or not is required
SFTP_PORT = 22
SFTP_REMOTE_PATH = "/home/repo/"
SFTP_HOST = YOUR IP
SFTP_USER = YOUR USER
SFTP_PASSWORD = YOUR PASSWORD
SFTP_PORT = 22 # Default 22 or change port
SFTP_REMOTE_PATH = "/home/"
```

Configuration of environment variables of the project or application

```python
import os
from pyiaccess.manage import set_env

# Define .env file with absolute or complete path.
path_env = '/home/user/proyect/.env'

# Define .env file with relative path of the project or application.
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
path_env = os.path.join(BASE_DIR, ".env")

# Load the environment variables.
set_env(path_env)
```

0 comments on commit 3d51e70

Please sign in to comment.