Skip to content

Instantly share code, notes, and snippets.

@mortenbra
mortenbra / centos_basic_utils.sh
Last active August 29, 2015 14:21
Install basic utilities for CentOS
#install some basic utils
yum install nano -y
yum install unzip -y
yum install bc -y
yum install wget -y
@mortenbra
mortenbra / tomcat_ssl_connector.xml
Created May 28, 2015 20:11
SSL Connector for Tomcat server.xml file
<-- setup SSL connector for Tomcat, and enabling only recommended protocols and ciphers -->
<Connector port="8443" protocol="HTTP/1.1" maxHttpHeaderSize="32767" URIEncoding="UTF-8"
maxThreads="150" connectionTimeout="20000"
SSLEnabled="true" scheme="https" secure="true"
sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2"
ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"
keystoreFile="/path/to/your_keystore.jks" keystorePass="yourpasswordhere"
clientAuth="false" />
@mortenbra
mortenbra / centos_ntp.sh
Last active August 29, 2015 14:22
Setup Network Time Protocol (NTP) for CentOS
# setup Network Time Protocol (NTP)
# see http://www.uptimemadeeasy.com/networking/setup-ntp-on-centos-linux/
# check current date/time
date
# setup time zone
mv /etc/localtime /etc/localtime.bkp
cp /usr/share/zoneinfo/Europe/Oslo /etc/localtime
@mortenbra
mortenbra / xe_post_install_verify.sh
Last active August 29, 2015 14:22
Post-install test of Oracle XE
# initial test of Oracle XE database after install
# become the "oracle" user
su - oracle
# connect to database
sqlplus /nolog
connect sys as sysdba
-- basic query to see stuff working
@mortenbra
mortenbra / apex_install_runtime.sql
Created June 4, 2015 14:29
Install Apex runtime
-- install Apex (runtime only)
@apxrtins.sql SYSAUX SYSAUX TEMP /i/
@mortenbra
mortenbra / apex_workspace_verify.sql
Created June 4, 2015 14:30
Verify Apex workspaces
-- check setup of Apex workspaces
select *
from apex_workspaces;
select *
from apex_workspace_schemas;
@mortenbra
mortenbra / ora_network_acl_verify.sql
Created June 4, 2015 14:39
Verify network ACL settings in Oracle
-- check/verify network ACL settings
select host, lower_port, upper_port, acl
from dba_network_acls;
select *
from dba_network_acl_privileges;
@mortenbra
mortenbra / centos_update.sh
Last active August 29, 2015 14:22
Update CentOS packages via yum
# check what updates are available
yum check-update
# update everything
yum update -y
# update everything except the kernel
#yum update -y --exclude=kernel*
@mortenbra
mortenbra / xe_install.sh
Last active August 29, 2015 14:22
Install Oracle XE on CentOS
# install Oracle XE 11g on CentOS
# assumes the installation file has already been copied to /u01/download
# create Oracle user and groups
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba,oinstall oracle
chown -R oracle:oinstall /u01
@mortenbra
mortenbra / oracle_sqlplus_env.sh
Created June 6, 2015 13:06
Add Oracle environment variables to bash profile in CentOS
# setup Oracle environment in bash profile to be able to access sqlplus from anywhere
# http://stackoverflow.com/questions/16823591/how-to-add-lines-to-end-of-file-linux
# this adds the Oracle environment variables to the "oracle" user, but you may also want to add it to root or any other users
echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> /home/oracle/.bash_profile