Subversion Repository Quickguide

Op de Subversion server

su root

Creeer template

mkdir svn.repos
cd svn.repos
mkdir trunk
mkdir tags
mkdir branches
echo "SVN Repository" > readme.txt
echo "Trunk" > trunk/readme.txt
echo "Tags" > tags/readme.txt
echo "Branches" > branches/readme.txt

Creeer repository

svnadmin create /var/www/svn/samplerepos
svn import svn.repos/ file:///var/www/svn/samplerepos
chown -R apache:apache /var/www/svn/samplerepos

## If you have SELinux enabled (you can check it with "sestatus" command) ##
## then change SELinux security context with chcon command ##

chcon -R -t httpd_sys_content_t /var/www/svn/samplerepos

## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/samplerepos

Initiele checkout om een working copy van de repository te maken.

svn checkout http://shunyo.xs4all.nl/svn/samplerepos/trunk projectname

Inchecken werk.

cd projectname
svn add filename
svn commit -m "Commit Message" 

CTW on Oracle Linux

mv expdat.expdp.BRV11T2.sonder.N4TOST2.B3.0_C1.13 /home/oracle/app/oracle/admin/satu/dpdump/expdat.dmp
impdp

Zegt zelf wel waar hij problemen mee heeft. Mekkert over users, table spaces en niet genoeg ruimte in de table space.

sqlplus /nolog

connect / as SYSDBA

create user N4TOST2 identified by S3marang;

create tablespace N4TOST2 DATAFILE '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' size 1G extent management local autoallocate;

alter database datafile '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' resize 10G;

select dbms_metadata.get_ddl('TABLESPACE','N4TOST2' ) from dual;

=== TNSNAMES ===
[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 14:53:14

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

TNS-03505: Failed to resolve name

[oracle@burung ~]$ vi ./app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 15:05:32

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = burung.mcint.local) (PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = satu)))
OK (20 msec)

perl DBD::mysql Mac OS X 10.8.5

At the moment of this writing there is no MySQL for Mac OS X 10.8, instead use the MySql for 10.7.

When trying to open a connection via Perl the system complains about dylib not being installed in the right place.

su root
find / -name "libmysqlclient.18.dylib" -print 
cp /usr/local/mysql-5.6.14-osx10.7-x86_64/lib/libmysqlclient.18.dylib /usr/lib

N4 build

Check out N4 branch from repository

http://svn.navis.com/N4SPARCS/branches/BRANCHES/n4-app

Edit $\n4-app\apex\build.properties

# uncomment the database type you want to use
#target.db=mysql
target.db=oracle
#target.db=oracle_rac
#target.db=sqlserver-jtds

Edit $\n4-app\apex\database\oracle.properties


database.driver=oracle.jdbc.OracleDriver
database.url=jdbc:oracle:thin:@DATABASE_HOST:1521:SID
database.userid=USERID
database.password=PASSWORD
database.minLimit=6
database.initialLimit=6
database.maxLimit=50
database.inactivityTimeout=1800
database.waitTimout=120
database.maxStatementsLimit=50

database.schema=apex
database.catalog=
database.source=jdbc/apexDS
database.mapping=Oracle9
database.name=oracle
database.hib-dialect=org.hibernatespatial.oracle.OracleSpatial10gDialect
requires.munge-oracle=true

database.systemsource=jdbc/apexSystemDS
database.systemuserid=SYSTEMUSERID
database.systempassword=PASSWORD 

Add $\n4-app\tools\bin\ to the PATH environment variable

Obtain ulc license

check-ulc-key:
[echo] You don’t have a properly installed ULC developer license key file.
[echo] ULC expects your license key file at ‘/Users/pdeneef/.ulc-7.0/DEVELOPER-0700.lic’


edit $/common/etc/ant-stubs/cache_address.properties
# for non-developers to use on vmware images (reserved 1500-1599)
extneefpa=1506 

Build


cd $\apex\
ant superclean all
or
ant all

Run with Tomcat


cd $\tools\tomcat-6.0\bin
dev-tomcat
javaws.exe http://localhost:8280/apex/apex.jnlp

(Point browser to http://localhost:8280/apex/apex.jnlp)

Run local ulc
ant ulc

 

MAC OS X

install JDK 1.7

build svnant.jar and put in tools/ant/lib

 

gen-code-xpscache:
[echo] Generating classes for xpscache module.
[xmlvalidate] 74 file(s) have been successfully validated.

 

 

 
TOMCAT

vi ~/.bash_profile

export CATALINA_HOME=/Library/Tomcat
export JAVA_HOME=`/usr/libexec/java_home -V 1.7`

Installatie in:
/usr/local/bin/apache-tomcat-v###

Symbolic link
ln -s /usr/local/bin/apache-tomcat-v### /Library/Tomcat

Edit
tomcat-users.xml

Startup
$CATALINA_HOME/bin/startup.sh

Apache MySQL PHP Mac OS X

Edit httpd.conf to include php module

find / -name "httpd.conf" -print
/private/etc/apache2/httpd.conf

vi /private/etc/apache2/httpd.conf

LoadModule perl_module libexec/apache2/mod_perl.so
LoadModule php5_module libexec/apache2/libphp5.so

Find MySQl socket

find / -name "mysql.sock" -print

Prepare php.ini

cp /etc/php.ini.default /etc/php.ini

Edit /etc/php.ini


vi /etc/php.ini
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=/private/tmp/mysql.sock

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket = /private/tmp/mysql.sock

Restart Apache

apachectl restart

Start MySQL deamon

Try /usr/local/mysql/bin/mysqld_safe

Example:

sudo /usr/local/mysql/bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter "exit" to exit the shell)

You can also add these to your bash startup scripts:

export MYSQL_HOME=/usr/local/mysql
alias start_mysql='sudo $MYSQL_HOME/bin/mysqld_safe &'
alias stop_mysql='sudo $MYSQL_HOME/bin/mysqladmin shutdown'

Springsource STS

Linux installation as root

Download STS

spring.io/tools/sts/all

Unpack springsource.tar.gz

gunzip spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar.gz
tar xvf spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar
mv springsource /opt

Subversion connectors

Launch STS

/STS

Go to Help -> Eclipse Market Place
Find Subversive and Install

Download the SVN connectors from polarion: http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/. Install the svnkit, javahl and connector in the plugins directory.


wget http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/Subversive-connectors-allplatforms-3.0.3.I20130920-1700.zip
unzip http://community.polarion.com/projects/subversive/download/eclipse/3.0/builds/
#cp plugins/*.jar /plugins/
cd plugins
cp org.polarion.eclipse.team.svn.connector.svnkit17_3.0.2.I20130808-1700.jar \
org.polarion.eclipse.team.svn.connector.javahl17_3.0.2.I20130808-1700.jar \
org.polarion.eclipse.team.svn.connector_3.0.2.I20130808-1700.jar \

/plugins/

EPIC Perl

EPIC is an open source Perl IDE (including editor and debugger) based on the Eclipse platform, compatible with Windows, Linux and Mac OS X.

Rinzo XML Editor

 

Eclipse PHP PDT

http://www.eclipse.org/pdt/downloads/

DPWA database import

Create BIG table space

sqlplus / as sysdba


sql> CREATE BIGFILE TABLESPACE "DPW04N4_DATA" DATAFILE '/home/beagw/dpwa/sparcsn4.dbf' SIZE 120G AUTOEXTEND ON NEXT 4G MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

Set up users, roles etc

sqlplus / as sysdba

create profile DPWORLD_NOEXPIRE limit password_life_time UNLIMITED;
create role webfocus;
create role report_prod;
create user billsys identified by Humvee;
create user sparcsn4 identified by Humvee;
alter user sparcsn4 profile DPWORLD_NOEXPIRE;
alter user sparcsn4 default tablespace DPW04N4_DATA;

Create impdp parameter file to exclude some huge files

# vi n4-imp.par

exclude=TABLE:"IN ('EDI_TRANSACTION','ROAD_DOCUMENTS','FRM_JOB_LOG','EDI_TRANSACTION_KEYWORD','EDI_BATCH_PROCESS','EDI_INTERCHANGE','EDI_EVENT','EDI_SEGMENT','EDI_BATCH','EDI_ERROR')"

Import database

# impdp dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par

[oracle@marauder ~]$ impdp system/Humvee dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par

Import: Release 11.2.0.1.0 - Production on Tue Oct 8 12:40:44 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** dumpfile=sparcsn4_30042013.dmp parfile=n4-imp.par 
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"SPARCSN4" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SPARCSN4"."SRV_EVENT"                      11.21 GB 102943957 rows
. . imported "SPARCSN4"."ARGO_CHARGEABLE_UNIT_EVENTS"    6.960 GB 13282798 rows
. . imported "SPARCSN4"."SRV_EVENT_FIELD_CHANGES"        4.835 GB 123798109 rows
. . imported "SPARCSN4"."ARGO_PROPERTY_SOURCE"           3.030 GB 52470519 rows
..
..
. . imported "SPARCSN4"."CRG_PRODUCT_TYPE"                   0 KB       0 rows
. . imported "SPARCSN4"."XPS_WHEELEDMT_FILT_WEIGHTS"         0 KB       0 rows
. . imported "SPARCSN4"."XPS_WHERENETALARM"                  0 KB       0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
ORA-39083: Object type REF_CONSTRAINT failed to create with error:
ORA-00942: table or view does not exist
Failing sql is:
ALTER TABLE "SPARCSN4"."ROAD_DOCUMENT_MESSAGES" ADD CONSTRAINT "FKE1FA50918010750D" FOREIGN KEY ("DOC_GKEY") REFERENCES "SPARCSN4"."ROAD_DOCUMENTS" ("GKEY") ENABLE
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39083: Object type TABLE_STATISTICS failed to create with error:
ORA-06550: line 1, column 3747:
PLS-00103: Encountered the symbol "~" when expecting one of the following:
..
..
ORA-39083: Object type TABLE_STATISTICS failed to create with error:

Ignore the table statistics creation errors.

Create new database to contain the complete schema.

De tabellen die niet zijn geimporteerd in de eerste database kunnen in iedfer geval via de SQl create scripts vanuit deze tweede database worden gecreeerd.
Maak de tabelspace kleiner want er komt geen data in deze database terecht.



$ dbca 

$ export ORACLE_SID=dpwaschema

$ sqlplus / as sysdba

CREATE BIGFILE TABLESPACE "DPW04N4_DATA" DATAFILE '/home/beagw/dpwaschema/sparcsn4.dbf' SIZE 4G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
create profile DPWORLD_NOEXPIRE limit password_life_time UNLIMITED;
create user sparcsn4 identified by Nephew default tablespace DPW04N4_DATA profile DPWORLD_NOEXPIRE;
create role webfocus;
create role report_prod;
create user billsys identified by Humvee;


$ find . -name "sparcsn4_30042013.dmp" -print
./app/oracle/admin/dpwa/dpdump/sparcsn4_30042013.dmp
[oracle@marauder ~]$ mv ./app/oracle/admin/dpwa/dpdump/sparcsn4_30042013.dmp ./app/oracle/admin/dpwaschema/dpdump/sparcsn4_30042013.dmp

$ impdp dumpfile=sparcsn4_30042013.dmp CONTENT=METADATA_ONLY

Create missing tables
Maak de gemiste tabellen aan in de eerste database.

EDI_INTERCHANGE
EDI_BATCH
EDI_BATCH_PROCESS
EDI_INTERCHANGE
EDI_TRANSACTION
EDI_TRANSACTION_KEYWORD
EDI_ERROR
EDI_EVENT
EDI_SEGMENT

FRM_JOB_LOG

ROAD_DOCUMENTS


sql> truncate table sparcsn4.road_document_messages;

sql> ALTER TABLE "SPARCSN4"."ROAD_DOCUMENT_MESSAGES" ADD CONSTRAINT "FKE1FA50918010750D" FOREIGN KEY ("DOC_GKEY") REFERENCES "SPARCSN4"."ROAD_DOCUMENTS" ("GKEY") ENABLE

Install Oracle Enterprise Linux van USB

Op Windows maak een bootable USB stick
* 8gb USB drive
* Download OEL distributie .iso van Oracle
* Download bootable USB: http://unetbootin.sourceforge.net/
* Format usb drive, label met USB
* Open Unetbootin.exe,
* kies .iso, kies USB, start creatie
* Wacht totdat unetbootin klaar is,
* open usb drive, kopieer .iso naar usb
* Installeer USB is nu klaar.

OEL desktop installatie

* stop Usb in computer, start computer
* kies HDD, /dev/sdb, directory containg .iso : /

ISSUE op MAC OS X

Er is een Guide op ORN die zegt dat je een bootable disk vanuit een OEL machine moet maken. Als je deze volgt in een VMware Fusion OEL op Mac OS X dan werkt de bootable disk niet. De procedure met unetbootin op een Mac OS X werkt ook niet. In het eerste geval blijft zegt de PC dat de USB disk niet bootable is. In het tweede geval start de PC helemaal niet vanaf USB.