Install on unix from sources
From PVPGN
Compiling the PvPGN server from sources - UNIX
Firstly the files / software that you need:
- the pvpgn server files
- the pvpgn server support files
- the mysql server ( optional )
You can get the pvpgn server files from the official website ( http://pvpgn.berlios.de/ ).
At the time the latest pvpgn server files are:
- stable – version 1.8.5
- pvpgn support files - version 1.2.
Getting the files:
Form the http://pvpgn.berlios.de/ website:
- point your browser to the above website
- select your required files ( pvpgn server stable and pvpgn support files )
- save them on your local hard-drive.
*since this is a linux installation tutorial we’ll get the *.tar.gz files ( so that we can work with them easy on linux ).
From linux console you can get the files by using the following commands:
[root@mybox]# cd /usr/src – to change the current directory to /usr/src directory [root@mybox]# wget http://download.berlios.de/pvpgn/pvpgn-1.8.5.tar.gz - for the stable version [root@mybox]# wget http://download.berlios.de/pvpgn/pvpgn-support-1.2.tar.gz - for the support files
After getting the pvpgn files we also need to download the mysql server sources in order to compile
it before pvpgn server so that we can make use of the mysql storage driver from pvpgn server.
You can get the free mysql server form http://dev.mysql.com/downloads/mysql/5.1.html
On this page you’ll need to scroll to the bottom of page and find the source download:
Then you must click the Pick a mirror link and select the best mirror place for your internet connection.
In my example i’ll use Romania [Fibernet Communications] because is the best for me. After you done that
you’ll find the direct link to get your file using wget in linux, in my case:
[root@mybox]# wget ftp://ftp.astral.ro/mirrors/mysql.com/Downloads/MySQL-5.1/mysql-5.1.32.tar.gz
*note that we are still in the same /usr/src directory.
After we got all this files in one place we’ll start the real job.
Firstly extract the files from their archives, this we will be done using the tar archive tool
( usually comes in all linux distributions ):
[root@mybox]# tar xfz pvpgn-1.8.5.tar.gz [root@mybox]# tar xfz pvpgn-support-1.2.tar.gz [root@mybox]# tar xfz mysql-5.1.32.tar.gz
After extracting all the files you’ll have in your /usr/src directory 4 new directories with the following names:
/usr/src/pvpgn-1.8.5 /usr/src/pvpgn-support-1.2 /usr/src/mysql-5.1.32
Now we must compile and install mysql server:
[root@mybox]# cd mysql-5.1.32 [root@mybox]# ./configure ( with no arguments you’ll get the default settings and paths, please see mysql documentation for a more detailed setup INSTALL-SOURCE ). [root@mybox]# make ( if the previous step completed successfully ) [root@mybox]# make install ( if the previous step completed successfully ).
After making the config file for mysql server ( default it is in /etc/ with the my.cnf name )
and making all the necessary dependencies like users/group and the default database, setting up
the root password for mysql ( you can read a step by step how to from the INSTALL-SOURCE file
locate in the /usr/src/mysql-5.1.32 directory ) you can start the mysql server using the command:
[root@mybox]# mysqld_safe --user=mysql &
After issuing the above command your mysql server should be running in background ( daemon ).
You can check this by using the command:
[root@mybox]# ps ax | grep mysqld_safe
If everything is ok the above command should output something similar to:
32485 ? S 0:00 /bin/sh /usr/local/dbmysql/bin/mysqld_safe --user=mysql 25641 pts/1 S+ 0:00 grep mysqld_safe
If you got this up and running then we can go further with the installation of pvpgn server itself.
We must leave the mysql-5.1.32 directory and enter the pvpgn-1.8.5 directory.
We can do this by issuing the command from inside the mysql-5.1.32 directory:
To compile the pvpgn server you must do the following:
[root@mybox]# cd src/ - from inside the pvpgn-1.8.5 folder [root@mybox]# ./configure --with-mysql - from inside the src folder [root@mybox]# make - from inside the src folder [root@mybox]# make install - from inside the src folder
After completing the above steps you must copy the support files in the needed place:
[root@mybox]# cd ../ pvpgn-support-1.2 - getting in the support files directory
[root@mybox]# cp * /var/files/ - copying all the files from the pvpgn-support-1.2 directory in the default
directory of pvpgn server.
For the pvpgn server to start you need to edit the /etc/bnetd.conf file in which you must enter
the mysql server information so that the pvpgn server can use it as a storage method:
- firstly you must create an empty database in the mysql server so that it can be used be pvpgn server.
You can do that by login into your mysql server:
[root@mybox]# mysql –u root –p
After this command you’ll be asked for the mysql root user password ( you set it earlier at the configure mysql step,
but we’ll take for example “mysql” as password ). If you entered the correct credentials you will get a similar output:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 599680 Server version: 5.1.32 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
At this time you must use the following command to create a new database:
mysql>CREATE DATABASE pvpgn; mysql>quit
Now you have created an empty database named pvpgn.
- secondly you must create a proper entry in your /etc/bnetd.conf which will allow pvpgn server to
use the mysql server and database:
Open the /etc/bnetd.conf file in your preferred editor ( I’ll use vi or vim, a text based editor ):
[root@mybox]# cd /etc/ [root@mybox]# vi bnetd.conf
After opening the file in the editor you must search for the default settings for storage engine,
a line that is starting with:
storage_path = file:mode=plain;dir=
After you found it, you must comment it so that the pvpgn server ignores it. You can do this by a placing a #
character in front, like:
# storage_path = file:mode=plain;dir=
Now you must setup your own storage engine configuration. To do it you must write in the file immediately
after the above commented line:
storage_path = sql:mode=mysql;host=localhost;name=db_name;user=mysql_user;pass=mysql_pass;default=0
where:
db_name is the database name – in our case – pvpgn mysql_user is the mysql user used to connect to mysql server – in our case – root mysql_pass is the mysql user password – in our case – mysql
so the entire line will be:
storage_path = sql:mode=mysql;host=localhost;name=pvpgn;user=root;pass=mysql;default=0
After completing this steps you should be able to start a minimal pvpgn server by issuing the following command:
[root@mybox]# bnetd
You can check to see if your pvpgn is up and running by issuing:
[root@mybox]# ps ax | grep bnetd
If everything works you should see a similar output:
29730 ? S 0:29 ./sbin/bnetd 26383 pts/1 S+ 0:00 grep bnetd
If you encounter any problem you can check the log file generated automatically by the pvpgn server in /var/bnetd.log.

