Results 1 to 3 of 3

Thread: Problem with installing from source (pvpgn)

  1. #1
    Join Date
    Jan 2008
    Location
    Parktown, Johannesburg
    Beans
    56
    Distro
    Kubuntu 9.10 Karmic Koala

    Problem with installing from source (pvpgn)

    I wanted to try out the pvpgn server on my Ubuntu Desktop 7.10.

    I used the guide from http://pvpgn.imigi.ro/index.php/Inst...x_from_sources to set it up.

    However i noticed a problem, i followed the exact steps, using the pvpgn-1.8.2.tar.gz and pvpgn-support-1.1.tar.gz packages.

    I wasnt going to use MYSQL (since i just wanted to get the feel of it) so these are the commands i used to install :

    I extracted the files from the tar archives into its folders on my Desktop.

    I got into terminal, and in the pvpgn-1.8.2 directory i typed :

    Code:
    ./configure
    Code:
    make
    Code:
    sudo make install
    Now the instructions were to copy the support files into /var/files/ but i noticed that it installed to /usr/local/var rather.
    So i still copied it to the /usr/local/var/files directory. The bnetd.conf was in /usr/local/etc and not in /etc/ as stated in the guide.

    After that, i uncommented the line in bnetd.conf which refers it to be a plain storage mode (i left the default settings) :

    Code:
    storage_path = file:mode=plain;dir=
    Then i ran
    Code:
    bnetd
    To check if the installation was succesful i typed :
    Code:
    ps ax | grep bnetd
    But all i got was
    Code:
    12657 pts/0    S+     0:00 grep bnetd
    Pls do help

  2. #2
    Join Date
    Jun 2007
    Beans
    19
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Problem with installing from source (pvpgn)

    It's most likely a permissions issue. When you install the (currently out-of-date) package, it runs bnetd through an boot script located in /etc/init.d/pvpgn. These scripts are run as root. I notice the same thing on my system if I manually start pvpgn as a user, but if I run it as root, it shows up in the process list.

    Sorry also for the delayed response. I'm surprised no one else here uses PvPGN. I actually only stopped by to see if some more advanced user than I came in and released some updated package that I could use as a stopgap until the Ubuntu developers respond to my bug report.

    In summary, use sudo to run bnetd. Also, you may have better luck with package-specific issues for (relatively) unpopular or uncommon packages on the application's forums. Also, if you go there, make sure to be polite about grammar and such things as most of the users there (as well as the lead developer) are not native English speakers.
    Last edited by pxc; July 30th, 2008 at 05:18 PM.

  3. #3
    Join Date
    Jun 2007
    Beans
    19
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Problem with installing from source (pvpgn)

    Some new discoveries!
    Code:
    pxc@cista:~$ bnetd -h
    usage: bnetd [<options>]
        -c FILE, --config=FILE   use FILE as configuration file (default is /etc/pvpgn/bnetd.conf)
        -d FILE, --hexdump=FILE  do hex dump of packets into FILE
         -f, --foreground         don't daemonize
        -D, --debug              run in debug mode (run in foreground and log to stdout)
        -h, --help, --usage      show this information and exit
        -v, --version            print version number and exit
    Note the --foreground option.
    Code:
    pxc@cista:~$ bnetd -f
    Jul 30 13:12:54 [error] eventlog_open: could not open file "/var/lib/pvpgn/bnetd.log" for appending (fopen: Permission denied)
    Jul 30 13:12:54 [fatal] eventlog_startup: could not use file "/var/lib/pvpgn/bnetd.log" for the eventlog (exiting)
    On my box I did the following to add a new system user for pvpgn with no rights and no shell, and give it complete access to pvpgn-related files.
    Code:
    sudo useradd -g nogroup -s /bin/false -d /home/pvpgn-srv -r pvpgn-srv
    sudo chown pvpgn-srv /etc/pvpgn /var/lib/pvpgn /usr/games/pvpgn /usr/share/games/pvpgn
    Now I can run PvPGN as someone other than root (which makes me feel much safer about running a service facing the internet). I start it (through my init script) more or less like this.
    Code:
    sudo start-stop-daemon --start --exec /usr/sbin/pvpgn --chuid pvpgn-srv
    If you set up the user with the same command, you can launch your source compiled version like this:
    Code:
    su -c '/path/to/bnetd' pvpgn-srv
    Just make sure you replace /path/to/bnetd with the path to your executable.

    Good luck!
    Last edited by pxc; July 30th, 2008 at 10:34 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •