Search code examples
ubuntuadvertisement-server

Has anyone tried to install nginad on Ubuntu?


I'm trying to configure a nginad server, but the documentation says it needs a CentOS machine.

Has anyone tried to install it on Ubuntu machine?

Thanks


Solution

  • It's for the old version in 2014, there maybe some change now. I just provide what I've done at that time.

    Not a native English speaker...^_^

    • Download Nginad

      git clone the nginad and put the "upload" folder under you web server's web folder.

    • install dependencies in the upload folder, call composer.phar self-update composer.phar install

    • remove the ".dist" of the php files under config/autoload cd config/autoload cp database.local.php.dist database.local.php cp delivery.local.php.dist delivery.local.php cp email.local.php.dist email.local.php cp rtb.config.local.php.dist rtb.config.local.php
    • configure your database connection configuration

      please only do the database related part in link. It creates all the tables needed by nginad.

      you should have php, mysql environment ready.

      what I've done is: mysql -u root -p //login mysql create database nginad; grant usage on *.* to nginad@`%` identified by 'password'; grant all privileges on nginad.* to nginad@`%` ; flush privileges; quit;        

      and //nginad.sql is the sql download from the nginad website mysql -u nginad -p nginad < nginad.sql

      at last, configure your nginad connection file (/config/autoload/database.local.php) $dbParams = array( 'dbname' => 'nginad', 'user' => 'root', 'pass' => '', 'host' => 'localhost', );

    • In order to make you Ad request work, you should also change the request domain, please see the public/ad/nginad.js file. modify the first line: var adserver_domain = "" set the adserver_domain to your nginad server.

    • About the admin password, the nginad has an initial admin account, but I didn't know the password. So I've just modified the sql database....(now it has documentation about the initial account, but I can't remember the url..)