This project has moved and is read-only. For the latest updates, please go here.

openPDC POSIX Platform Deployment Steps

The document link below lives on the cloud and is updated frequently, it documents the steps for installing and configuring the openPDC running in a POSIX environment, e.g., Linux or Mac OS X:

GPA TeamSite Document: "openPDC POSIX Deployment Instructions"

For Raspberry Pi deployments of the openPDC, an image already exists that can be used to speed setup on these devices, see the Running openPDC on a Raspberry Pi documentation.

Last edited Mar 27, 2015 at 2:22 AM by ritchiecarroll, version 5


allap Apr 5, 2016 at 1:03 PM 
Ubuntu Linux 14.04 LTS (64-bit) Installation with MySQL 5.5

Below is a summary of bash commands that has been undertaken to install a basic openPDC 2.1 on Ubuntu Linux using MySQL without any actual PMUs attached.

Notice that a workaround for Issue Id #12354 is included.

Notice that the MySQL connection string and data provider strings from
have been changed.

# ----- Install MySQL, Mono, and MySQL Connector Net Software --------------------------------------------------------------------------------------------
# Install MySQL (chosen root password "AdmPw002" when asked for a password):
sudo apt-get install mysql-client mysql-server

# Enable remote access to the database (this works for mysql 5.5):
# ("bind-address" line in my.cnf must be commented out for the database to be accessible from outside):
sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
sudo bash -c 'sed -r -e "s/^([[:space:]]*bind-address[[:space:]]*=.*$)/# \1/g" /etc/mysql/my.cnf.orig > /etc/mysql/my.cnf'
sudo service mysql restart

# Install mono:
sudo apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
mono -V

# Install mysql connector net (for mono):
cd /home/pdcadm
mkdir -p sw
cd /home/pdcadm/sw
mkdir -p mysql-connector-net
cd mysql-connector-net
unzip ./
cd v4.5
sudo gacutil -i MySql.Data.dll

# ----- Install openPDC --------------------------------------------------------------------------------------------
# Install openpdc:
cd /home/pdcadm/sw
mkdir -p openpdc
cd openpdc
sudo bash -p

# Install openPDC MySQL database:
cd /opt/openPDC/Database\ Scripts/MySQL
# Patch openPDC.sql (some table names needs to be capitalized when referenced as foreign keys; workaround for issue Id #12354):
sudo mv openPDC.sql openPDC.sql.orig
sudo bash -c 'sed -r -e "s/REFERENCES node/REFERENCES Node/g" \
-e "s/REFERENCES applicationrole/REFERENCES ApplicationRole/g" \
-e "s/REFERENCES securitygroup/REFERENCES SecurityGroup/g" \
-e "s/REFERENCES useraccount/REFERENCES UserAccount/g" \
openPDC.sql.orig > openPDC.sql'
mysql -u root -p < openPDC.sql
mysql -u root -p < InitialDataSet.sql
mysql -u root -p < SampleDataSet.sql

# Create user 'pdcadm' and grant access to database:
TMP_SQL_FILE=$(mktemp --suffix=.sql)
cat << EOF > ${TMP_SQL_FILE}
create user 'pdcadm'@localhost identified by 'AdmPw002';
create user 'pdcadm'@'%' identified by 'AdmPw002';
grant all on openPDC.* to 'pdcadm'@localhost;
grant all on openPDC.* to 'pdcadm'@'%';
flush privileges;
mysql -u root -p < ${TMP_SQL_FILE}

# Ip-address of the chosen eth0 interface (the exact output of ifconfig is probably specific to Ubuntu):
IPADDR=$(ifconfig eth0 | grep -i "inet addr" | sed -r -e 's/^[^i]*inet addr:([^B[:space:]]*)[[:space:]]*Bcast.*$/\1/')
echo ${IPADDR}

# mysql connector net version:
NETVERSION=$(gacutil -l MySql.Data | grep -i "version=" | sed -r -e 's/^[^=]*=([^,]*),.*$/\1/')

# Update configuration file (notice that the ip-address is hard-coded into the 'ConnectionString' and the connector net version number is hard-coded into the 'DataProviderString'):
cd /opt/openPDC/
cp -p openPDC.exe.config openPDC.exe.config.orig
patch -p0 << 'CONFEOF'
--- openPDC.exe.config 2016-04-05 10:27:48.495141052 +0200
+++ 2016-04-05 10:32:13.269682311 +0200
@@ -11,8 +11,8 @@
<add name="ConfigurationType" value="Database" description="Specifies type of configuration: Database, WebService or XmlFile" encrypted="False" />
- <add name="ConnectionString" value="Data Source=ConfigurationCache/openPDC.db; Version=3; Foreign Keys=True; FailIfMissing=True" description="Configuration connection string" encrypted="False" />
- <add name="DataProviderString" value="AssemblyName={Mono.Data.Sqlite, Version=, Culture=neutral, PublicKeyToken=0738eb9f132ed756}; ConnectionType=Mono.Data.Sqlite.SqliteConnection; AdapterType=Mono.Data.Sqlite.SqliteDataAdapter" description="Configuration database ADO.NET data provider assembly type creation string used when ConfigurationType=Database" encrypted="False" />
+ <add name="ConnectionString" value="Server=;Database=openPDC;User ID=pdcadm;Password=AdmPw002;Pooling=false;allow user variables = true;" description="allap modified MySQL database connection string" encrypted="False" />
+ <add name="DataProviderString" value="AssemblyName={MySql.Data, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d}; ConnectionType=MySql.Data.MySqlClient.MySqlConnection; AdapterType=MySql.Data.MySqlClient.MySqlDataAdapter" description="allap test installation 20160405 data provider string" encrypted="False" />
<add name="NodeID" value="e7a5235d-cb6f-4864-a96e-a8686f36e599" description="Unique Node ID" encrypted="False" />
<add name="ProcessPriority" value="Normal" description="Sets desired process priority: Normal, AboveNormal, High, RealTime" encrypted="False" />
<add name="UniqueAdaptersIDs" value="True" description="Set to true if all runtime adapter ID's will be unique to allow for easier adapter specification" encrypted="False" />