Monthly Archives: October 2013

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.