GithubHelp home page GithubHelp logo

Ubuntu about powerdns-admin HOT 41 CLOSED

powerdns-admin avatar powerdns-admin commented on June 15, 2024
Ubuntu

from powerdns-admin.

Comments (41)

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

I've not tried this source code on a Ubuntu machine yet but i am pretty sure it will work :). It's just Python/Flask which is supported to run on Ubuntu, let try and feel free to post any issue here.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I am having a bit trouble at "Enable virtualenv and install python 3rd libraries" step.

http://hastebin.com/ojiricewam.vhdl

That is log of commands. Can you please help?

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Hi @c0fe!

Looks like you're in the wrong directory, make sure you're running pip and the other commands in the same directory as the requirements.txt and create_db.py files.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I am still running into a bit of an issue: http://hastebin.com/ipoloquguw.vhdl

I am also not sure what needs to be changed in config.py

from powerdns-admin.

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

Hi @c0fe ,

It looks like you missed some dependencies to install pip packages. I've tried to install on a Ubuntu 14.04 machine successfully following:

sudo apt-get update
sudo apt-get install git python-pip
sudo pip install virtualenv
sudo apt-get install gcc libmysqlclient-dev python-dev libsasl2-dev libldap2-dev libssl-dev

# go to your source code directory
virtualenv flask
source ./fask/bin/activate
pip install -r requirements.txt

About the config.py file, for basic usage, you can leave the config for LDAP, just set LDAP_TYPE = 'ldap' to avoid syntax error. The important part is DATABASE CONFIG and POWERDNS CONFIG, they need to be corrected base on your environment setting.

@ivanfilippov : I am thinking about adding one more option to enable/disabled LDAP feature, it is not mandatory feature for everyone I think.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

@ngoduykhanh that sounds like a good idea. Do you want another option or a third option for LDAP_TYPE? Like if it's blank or set to none, LDAP is disabled?

from powerdns-admin.

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

@ivanfilippov : yes, that sounds good too. My idea is about reducing the number of unnecessary config in the config.py file. For example, if LDAP_TYPE is absent from config.py we can mark LDAP feature is disabled.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Looks like I am having problems with the dependencies: http://hastebin.com/ojanorikah.vhdl though not sure if MariaDB is too new?

Additionally, do I need to install OpenLDAP or whatever?

from powerdns-admin.

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

@c0fe, can you install libmariadbclient-dev or libmariadbd-dev if you are using MariaDB?

And no, You don't need OpenLDAP server.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Was able to install, http://hastebin.com/uriramojob.vhdl

But same error.

from powerdns-admin.

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

@c0fe , no, since you are using MariaDB, you don't need libmysqlclient-dev anymore. Let try to install pip packages.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I installed all pip requirements getting this error:

root@ns2:/flask/bin# ./activate
-bash: ./activate: Permission denied
root@ns2:
/flask/bin#

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

http://hastebin.com/xoqibabaqo.coffee

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Hi @c0fe!

activate isn't an executable script, you have to run it by running source activate. I'm not sure if it's important to run it from the root of PowerDNS-Admin, (where the run.py, create_db.py, etc files are), but do it from there anyway. So run it like this:

source ./flask/bin/activate

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

It is still erroring out: http://hastebin.com/qonusuhune.coffee

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Looks like you're missing python-dev, you can try apt-get install python-dev. I'm going to set up a quick Ubuntu 14.04 VM and try it out as well.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

It was missing but it still throws up the same error.

from powerdns-admin.

ngoduykhanh avatar ngoduykhanh commented on June 15, 2024

@c0fe , According to http://hastebin.com/uriramojob.vhdl you didn't successfully install following packages:

  • python-dev
  • libsasl2-dev
  • libldap2-dev
  • libssl-dev

Please try to install them before rerunning pip command

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Copy command isn't found: http://hastebin.com/sucitekame.coffee

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

config.py is empty for me too, not sure what to write in there or how. Meaning i have nano to edit just what is the syntax.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Hi @c0fe!

There's a typo on the instructions page, we'll get that fixed, try this instead:
cp config_template.py config.py

That will fix the empty config.py as well.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Got this error:

flask) root@ns2:/etc/powerdns# cp config_template.py config.py
cp: cannot stat β€˜config_template.py’: No such file or directory

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Looks like you're in the wrong directory, based on your previous pastebin it looks like you should be running that command from ~/temp/PowerDNS-Admin.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Yup that was embarrassing, eyes are crossing. Here is what I am running into: http://hastebin.com/zokoyatapi.coffee

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

You'll need to modify config.py a bit. Change the line that says LDAP_TYPE = 'ldap' // or 'ad' to LDAP_TYPE = 'ldap'. This doesn't mean you need ldap, its just to get config.py to be parsed properly

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Not even sure where it is seeing this: qlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2003, 'Can't connect to MySQL server on '192.168.59.103' (110 "Connection timed out")')
(flask) root@ns2:~/temp/PowerDNS-Admin# nano config.py

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

It's trying to connect to a SQL database defined by the SQLALCHEMY_DATABASE_URI option in config.py. Check that to make sure it's pointing to your database server, right now it's pointing to 192.168.59.103.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Got it running but still don't know whe3re to look in the URL. It says running on 127.0.0.1 great but I want to access from a remote computer on the local network.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Change BIND_ADDRESS = '127.0.0.1' in config.py to BIND_ADDRESS = '0.0.0.0' and restart the app. Then you can access it on remote computer by typing in http://yourServerIP:9393

Note, for production purposes I recommend putting this behind a reverse proxy like Apache or Nginx.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I can't even find this: http://hastebin.com/coqagafaqe.vhdl

Also why would you recommend the reverse proxy?

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

Ah, looks like you have a slightly older version of the repository, checkout a new version via git, or download a new zip.

A reverse proxy gives you a bunch of advantages, some are:

  • compressing data in transit to speed up page loads
  • allowing caching of content
  • enabling HTTPS on your PowerDNS-Admin app

and there are other advantages as well that you can find.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Now another issue, can't even run this, somehow its not seeing the files: http://hastebin.com/pusatiquda.coffee

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

It looks like your virtualenv is no longer in sync with your setup. Try these commands one at a time:

cd ~/temp/PowerDNS-Admin/
virtualenv flask
source ./flask/bin/activate
pip install -r requirements.txt
cp config_template.py config.py

Then modify your config.py as needed. Then run the below two commands:

./create_db.py
./run.py

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I got it working. Awesome. Its a bit unfortunate that it loses connectivity (I am not really familiar with flask) once I disconnected the ssh session. But it looks great.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

There are a few ways to keep it running outside your ssh session, you can try screen or even add it as a service to systemd. Glad we were able to help, good luck! πŸ˜„

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Any suggestions on how to add it as a service properly? I don't want to screw it up.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

@ngoduykhanh actually posted a config for systemd in one of the issues here. Check it out here.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Ok I will try that and report back. I am grateful for the support. I would like to offer making a website and clarifying up the tutorial for this project if that is interested, this of course along with the hosting would be free.

from powerdns-admin.

ivanfilippov avatar ivanfilippov commented on June 15, 2024

I've actually been working on a tutorial in the Wiki as we've been going through this issue. Right now it only exists in my branch here but I hope to get it merged into the main repository as well. πŸ˜„

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

I will try this on the Xenial version of Ubuntu since it supposed to have systemd (14.04 doesn't) I will report back on this.

from powerdns-admin.

c0fe avatar c0fe commented on June 15, 2024

Additionally I didn't check but did you write that wiki with the issues I was having? :P

from powerdns-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.