Skip to content

Commit

Permalink
prefer geoip2 due to geoip1 database deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
furlongm committed Oct 10, 2018
1 parent 7e12d0d commit f47d03a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ yum install -y epel-release
### virtualenv + pip + gunicorn

```shell
# apt-get install gcc libgeoip-dev python-virtualenv python-dev geoip-database-extra geoipupdate # (debian/ubuntu)
# yum install gcc geoip-devel python-virtualenv python-devel GeoIP-data GeoIP-update geolite2-city python2-geoip2 # (centos/rhel)
# apt-get install python-virtualenv geoip-database-extra geoipupdate # (debian/ubuntu)
# yum install python-virtualenv GeoIP-update geolite2-city python2-geoip2 # (centos/rhel)
mkdir /srv/openvpn-monitor
cd /srv/openvpn-monitor
virtualenv .
Expand All @@ -56,7 +56,7 @@ See [configuration](#configuration) for details on configuring openvpn-monitor.
##### Debian / Ubuntu

```shell
apt-get -y install python-geoip python-ipaddr python-humanize python-bottle python-semantic-version apache2 libapache2-mod-wsgi git wget geoip-database-extra geoipupdate
apt-get -y install git wget apache2 libapache2-mod-wsgi python2-geoip2 python-ipaddr python-humanize python-bottle python-semantic-version geoip-database-extra geoipupdate
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" > /etc/apache2/conf-available/openvpn-monitor.conf
a2enconf openvpn-monitor
systemctl restart apache2
Expand All @@ -65,7 +65,7 @@ systemctl restart apache2
##### CentOS / RHEL

```shell
yum install -y python-GeoIP python-ipaddr python-humanize python-bottle python-semantic_version httpd mod_wsgi git wget GeoIP-data GeoIP-update geolite2-city python2-geoip2
yum install -y git wget httpd mod_wsgi python2-geoip2 python-ipaddr python-humanize python-bottle python-semantic_version geolite2-city GeoIP-update
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" > /etc/httpd/conf.d/openvpn-monitor.conf
systemctl restart httpd
```
Expand Down
2 changes: 1 addition & 1 deletion openvpn-monitor.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ site=Example
#latitude=40.72
#longitude=-74
maps=True
geoip_data=/usr/share/GeoIP/GeoIPCity.dat
geoip_data=/var/lib/GeoIP/GeoLite2-City.mmdb
datetime_format=%d/%m/%Y %H:%M:%S

[VPN1]
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
GeoIP==1.3.2
geoip2==2.9.0
humanize==0.5.1
ipaddr==2.2.0; python_version <= '2.7'
Expand Down

0 comments on commit f47d03a

Please sign in to comment.