Setup of Development Environment for CentOS: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
Line 11: Line 11:
== installing packages ==
== installing packages ==
These instructions have been tested with CentOS 6.3, 64 bit:
These instructions have been tested with CentOS 6.3, 64 bit:
 
=== General ===
  # install the epel repository
  # install the epel repository
  rpm -Uhv http://ftp.uni-kl.de/pub/linux/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
  rpm -Uhv http://ftp.uni-kl.de/pub/linux/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
Line 18: Line 18:
  # install mono-openpetra
  # install mono-openpetra
  rpm -Uhv http://sourceforge.net/projects/openpetraorg/files/openpetraorg/mono-openpetra/centos-6/mono-openpetra-3.0.6-2.x86_64.rpm/download
  rpm -Uhv http://sourceforge.net/projects/openpetraorg/files/openpetraorg/mono-openpetra/centos-6/mono-openpetra-3.0.6-2.x86_64.rpm/download
# install postgresql
=== Postgresql ===
  rpm -Uhv http://yum.pgrpms.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
  rpm -Uhv http://yum.pgrpms.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
  yum install postgresql92 postgresql92-server
  yum install postgresql92 postgresql92-server
Line 30: Line 30:
  service postgresql-9.2 start
  service postgresql-9.2 start
  chkconfig postgresql-9.2 on
  chkconfig postgresql-9.2 on
   
 
=== Bazaar ===
bzr 2.1.1 is quite old and slow for downloading a branch; see http://wiki.bazaar.canonical.com/SourceDownloads
  sudo yum install gcc python-devel
wget https://launchpad.net/bzr/2.5/2.5.1/+download/bzr-2.5.1.tar.gz
tar xzf bzr-2.5.1.tar.gz
cd bzr-2.5.1
sudo python setup.py install
 
== get the code ==
== get the code ==
as a unprivileged user, run this:
as a unprivileged user, run this:

Revision as of 17:04, 16 March 2013

General

Please also have a look at the instructions that already exist for other Operating systems (Setup of Development environment).

mono-openpetra package

There is now a project at Github, that maintains an RPM package with Mono and some tools included, that are very useful for the development of OpenPetra:

The packages are available at Sourceforge:

installing packages

These instructions have been tested with CentOS 6.3, 64 bit:

General

# install the epel repository
rpm -Uhv http://ftp.uni-kl.de/pub/linux/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
# install required packages
yum install openssh-clients pkgconfig bzr libgdiplus liberation-mono-fonts
# install mono-openpetra
rpm -Uhv http://sourceforge.net/projects/openpetraorg/files/openpetraorg/mono-openpetra/centos-6/mono-openpetra-3.0.6-2.x86_64.rpm/download

Postgresql

rpm -Uhv http://yum.pgrpms.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
yum install postgresql92 postgresql92-server
service postgresql-9.2 initdb

vi /var/lib/pgsql/9.2/data/pg_hba.conf

 add to top:  
   local all  postgres    ident
   host all petraserver 127.0.0.1/0 md5
service postgresql-9.2 start
chkconfig postgresql-9.2 on

Bazaar

bzr 2.1.1 is quite old and slow for downloading a branch; see http://wiki.bazaar.canonical.com/SourceDownloads

sudo yum install gcc python-devel
wget https://launchpad.net/bzr/2.5/2.5.1/+download/bzr-2.5.1.tar.gz
tar xzf bzr-2.5.1.tar.gz
cd bzr-2.5.1
sudo python setup.py install

get the code

as a unprivileged user, run this:

mkdir bzr
cd bzr
bzr init
bzr checkout lp:openpetraorg

first steps

cd bzr/openpetraorg
export PATH=/opt/mono-openpetra/bin:$PATH
export PKG_CONFIG_PATH=/opt/mono-openpetra/lib/pkgconfig
nant generateSolution
nant createDatabaseUser
nant recreateDatabase resetDatabase
nant test-without-display

compile just one project:

nant compileProject -D:file=delivery/projects/sharpdevelop4/Ict.Petra.Server.lib.MPartner.connect.csproj