summaryrefslogtreecommitdiff
path: root/system/oracle-xe
diff options
context:
space:
mode:
authorDhabyX <slack.dhabyx@gmail.com>2016-08-02 00:33:03 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-03 07:29:30 +0700
commita06f065001ac20c01dc321623ad8bc0e4fa406da (patch)
treeb5e82e7a0a948514c4c782796d5a53b67ce62bdc /system/oracle-xe
parent7f392e61526e595e55534725085b3d33679cf68c (diff)
downloadslackbuilds-a06f065001ac20c01dc321623ad8bc0e4fa406da.tar.gz
system/oracle-xe: Added (Oracle Database Express Edition).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/oracle-xe')
-rw-r--r--system/oracle-xe/10-oracle.xe.conf.new8
-rw-r--r--system/oracle-xe/README14
-rw-r--r--system/oracle-xe/README.Slackware52
-rw-r--r--system/oracle-xe/doinst.sh41
-rw-r--r--system/oracle-xe/oracle-xe.SlackBuild150
-rw-r--r--system/oracle-xe/oracle-xe.info10
-rw-r--r--system/oracle-xe/slack-desc19
7 files changed, 294 insertions, 0 deletions
diff --git a/system/oracle-xe/10-oracle.xe.conf.new b/system/oracle-xe/10-oracle.xe.conf.new
new file mode 100644
index 0000000000..1d9dd0d8e6
--- /dev/null
+++ b/system/oracle-xe/10-oracle.xe.conf.new
@@ -0,0 +1,8 @@
+kernel.sem=250 32000 100 128
+kernel.shmmax=4294967295
+kernel.shmmni=4096
+kernel.shmall=2097152
+fs.file-max=6815744
+net.ipv4.ip_local_port_range=9000 65000
+vm.swappiness=40
+
diff --git a/system/oracle-xe/README b/system/oracle-xe/README
new file mode 100644
index 0000000000..d5100304df
--- /dev/null
+++ b/system/oracle-xe/README
@@ -0,0 +1,14 @@
+Oracle Database 11g Express Edition (Oracle Database XE)
+
+Oracle Database Express Edition is an entry-level,
+small-footprint database based on the Oracle Database 11g
+Release 2 code base. It's free to develop, deploy, and
+distribute; fast to download; and simple to administer.
+
+You need accept license before download oracle-xe and
+you have to use a web browser to download it.
+
+Oracle-XE is only available for 64 bits systems.
+
+See README.Slackware for setup, configuration and usage
+hints.
diff --git a/system/oracle-xe/README.Slackware b/system/oracle-xe/README.Slackware
new file mode 100644
index 0000000000..f1067059e0
--- /dev/null
+++ b/system/oracle-xe/README.Slackware
@@ -0,0 +1,52 @@
+The installation process needs a user and a group previuosly
+configured, *oracle* for the user and *dba* for the group.
+
+You must be run the following commands:
+
+# groupadd -g 329 dba
+# useradd -d /u01/app/oracle -s /bin/bash -u 329 -g 329 oracle
+
+Oracle recomend some system requirements in kernel parameters,
+acording to oracle-xe installation guide at:
+https://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#BABJFAIA
+
+This slackbuild provides an sysctl configurations at
+/etc/sysctl.d/10-oracle.xe.conf; you only need restart or run:
+
+# sysctl --system
+
+After installing you must configure the database:
+
+# /etc/rc.d/rc.oracle-xe configure
+
+Some environment variables need to be configured or exported before
+you start to use Oracle; by default all variables is configured with
+"en_US.UTF-8" but you can change to your locale preferences at:
+
+/etc/profile.d/oracle-env.sh
+
+And you can load with:
+
+# source /etc/profile.d/oracle-env.sh
+
+or logout and login for load all environment variables.
+
+To start and stop the database at boot/shutdown, make sure
+/etc/rc.d/rc.oracle-xe is executable and update the following files:
+
+/etc/rc.d/rc.local
+==================
+# Startup oracle-xe
+if [ -x /etc/rc.d/rc.oracle-xe ]; then
+ /etc/rc.d/rc.oracle-xe start
+fi
+
+/etc/rc.d/rc.local_shutdown
+===========================
+# Stop oracle-xe
+if [ -x /etc/rc.d/rc.oracle-xe ]; then
+ /etc/rc.d/rc.oracle-xe stop
+fi
+
+You can read more detailed instructions at:
+https://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm
diff --git a/system/oracle-xe/doinst.sh b/system/oracle-xe/doinst.sh
new file mode 100644
index 0000000000..563eeec10e
--- /dev/null
+++ b/system/oracle-xe/doinst.sh
@@ -0,0 +1,41 @@
+VERSION="11.2.0"
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config etc/sysctl.d/10-oracle.xe.conf.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if ! grep /u01/app/oracle/product/${VERSION}/xe/lib etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/u01/app/oracle/product/${VERSION}/xe/lib" >> etc/ld.so.conf
+fi
+
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
+
+
+# from rpm oracle scripts
+availphymem=`cat /proc/meminfo | grep '^MemTotal' | awk '{print $2}'`
+availphymem=`echo $availphymem / 1024 | bc`
+memory_target=`echo 0.40 \* $availphymem | bc | sed "s/\..*//"`
+
+if [ $memory_target -gt 1024 ];
+then
+ memory_target=`echo 1024 \* 1048576 | bc`
+else
+ memory_target=`echo $memory_target \* 1048576 | bc`
+fi
+
+sed -i "s/%memory_target%/$memory_target/g" u01/app/oracle/product/${VERSION}/xe/config/scripts/init.ora
+sed -i "s/%memory_target%/$memory_target/g" u01/app/oracle/product/${VERSION}/xe/config/scripts/initXETemp.ora
diff --git a/system/oracle-xe/oracle-xe.SlackBuild b/system/oracle-xe/oracle-xe.SlackBuild
new file mode 100644
index 0000000000..94233e2865
--- /dev/null
+++ b/system/oracle-xe/oracle-xe.SlackBuild
@@ -0,0 +1,150 @@
+#!/bin/sh
+
+# Slackware build script for oracle-xe
+
+# Copyright 2015 Dhaby Xiloj <slack.dhabyx@gmail.com>
+# All rights reserved.
+#
+# Some ideas has taked from
+# https://github.com/aclemons/slackbuilds/tree/master/system/oracle-xe-11g
+# Andrew Clemons, Wellingtong, New Zeland
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=oracle-xe
+VERSION=${VERSION:-11.2.0}
+RELEASE=${RELEASE:-1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ x86_64) ARCH=x86_64 ;;
+ *) echo "The package for $(uname -m) architecture is not available."; exit 1;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+RPMNAME="${PRGNAM}-${VERSION}-${RELEASE}.x86_64.rpm"
+ZIPNAME="${RPMNAME}.zip"
+
+set -e
+
+# Check if oracle group and user exist
+if [ "$(grep ^oracle /etc/passwd)" = "" -o "$(grep ^dba /etc/group)" = "" ] ; then
+ cat << EOF
+You must have apropiate user and group for oracle-xe.
+ Example:
+ # groupadd -g 329 dba
+ # useradd -d /u01/app/oracle -s /bin/bash -u 329 -g 329 oracle
+EOF
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rvf $PRGNAM-$VERSION
+
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+unzip $CWD/$ZIPNAME
+cd Disk1
+rpm2cpio < $RPMNAME | cpio -imdv
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# moving everything to proper place
+mv u01 usr $PKG
+mkdir -p $PKG/etc/rc.d
+mv etc/init.d/oracle-xe $PKG/etc/rc.d/rc.oracle-xe
+chmod 644 $PKG/etc/rc.d/rc.oracle-xe
+sed -i 's#/etc/init.d/oracle-xe#/etc/rc.d/rc.oracle-xe#g' $PKG/etc/rc.d/rc.oracle-xe
+
+mkdir -p $PKG/etc/sysctl.d/
+cp $CWD/10-oracle.xe.conf.new $PKG/etc/sysctl.d/
+
+# copy environment files
+mkdir -p $PKG/etc/profile.d
+cp $PKG/u01/app/oracle/product/${VERSION}/xe/bin/oracle_env.sh \
+ $PKG/etc/profile.d/oracle-env.sh
+ echo "export TNS_ADMIN=\$ORACLE_HOME/network/admin" >> $PKG/etc/profile.d/oracle-env.sh
+
+cp $PKG/u01/app/oracle/product/${VERSION}/xe/bin/oracle_env.csh \
+ $PKG/etc/profile.d/oracle-env.csh
+ echo "setenv TNS_ADMIN \$ORACLE_HOME/network/admin" >> $PKG/etc/profile.d/oracle-env.csh
+
+# add oracle jdbc driver to classpath
+mkdir -p $PKG/etc/profile.d/
+cat << EOF > $PKG/etc/profile.d/oracle-jdbc-env.csh
+#!/bin/csh
+setenv CLASSPATH \$CLASSPATH:\$ORACLE_HOME/jdbc/lib/ojdbc6.jar
+EOF
+
+cat << EOF > $PKG/etc/profile.d/oracle-jdbc-env.sh
+#!/bin/sh
+export CLASSPATH=\$CLASSPATH:\$ORACLE_HOME/jdbc/lib/ojdbc6.jar
+EOF
+
+chmod 755 $PKG/etc/profile.d/*
+
+
+# Remove -lipgo and -lsvml from sysliblist as they were not shipped in 11.2XE
+sed -i "s/-lipgo //" $PKG/u01/app/oracle/product/11.2.0/xe/lib/sysliblist
+sed -i "s/ -lsvml//" $PKG/u01/app/oracle/product/11.2.0/xe/lib/sysliblist
+
+# fix bad konsole param
+sed -i "s/konsole -T /konsole -p tabtitle=/" \
+ $PKG/u01/app/oracle/product/11.2.0/xe/config/scripts/runsqlplus.sh
+
+# creating empty dirs for proper oracle configuration
+mkdir -p $PKG/u01/app/oracle/product/${VERSION}/xe/config/log
+mkdir -p $PKG/u01/app/oracle/product/${VERSION}/xe/rdbms/{audiot,log}
+mkdir -p $PKG/u01/app/oracle/product/${VERSION}/xe/network/{trace,log}
+
+# Make symbolic links for some libs
+(
+ cd $PKG/u01/app/oracle/product/${VERSION}/xe/lib
+ ln -s libagtsh.so.1.0 libagtsh.so
+ ln -s libclntsh.so.11.1 libclntsh.so
+ ln -s libocci.so.11.1 libocci.so
+)
+
+# set appropriate permissions for oracle
+chown -R oracle:dba $PKG/u01
+chmod 755 $PKG/u01/app/oracle/product/${VERSION}/xe/config/scripts/*.sh
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/oracle_xe/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/oracle-xe/oracle-xe.info b/system/oracle-xe/oracle-xe.info
new file mode 100644
index 0000000000..43a659d691
--- /dev/null
+++ b/system/oracle-xe/oracle-xe.info
@@ -0,0 +1,10 @@
+PRGNAM="oracle-xe"
+VERSION="11.2.0"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip"
+MD5SUM_x86_64="dd7881a55569d890241f11cd0eeb7d48"
+REQUIRES=""
+MAINTAINER="DhabyX"
+EMAIL="slack.dhabyx@gmail.com"
diff --git a/system/oracle-xe/slack-desc b/system/oracle-xe/slack-desc
new file mode 100644
index 0000000000..b8fb5d5dce
--- /dev/null
+++ b/system/oracle-xe/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+oracle-xe: oracle-xe (Oracle Database Express Edition)
+oracle-xe:
+oracle-xe: Oracle Database 11g Express Edition (Oracle Database XE) is an
+oracle-xe: entry-level, small-footprint database based on the Oracle Database
+oracle-xe: 11g Release 2 code base. It's free to develop, deploy, and
+oracle-xe: distribute; fast to download; and simple to administer.
+oracle-xe:
+oracle-xe:
+oracle-xe:
+oracle-xe:
+oracle-xe: