Creating new Oracle database instance

dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname db_name_here -sid sid_name_here -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 30 -emConfiguration LOCAL


Enabling SAMBA attributes in OpenLDAP in CentOS / Redhat

yum install samba samba-common

locate samba.ldif

cp /usr/share/doc/samba-4.6.2/LDAP/samba.ldif /etc/openldap/slapd.d/cn=config/cn=schema

cd /etc/openldap/slapd.d/cn=config/cn=schema/

mv samba.ldif cn={4}samba.ldif

vi cn={4}samba.ldif
edit to this:
dn: cn={4}samba.ldif
objectClass: olcSchemaConfig
cn: cn={4}samba.ldif

service slapd restart

Now the samba attributes is now available in LDAP

Rsync without password to remote server with non-default SSH port

This is the normal rsync command, assuming your are using port 2222 for the SSH port :

rsync -avz -e “ssh -p 2222” /local_folder user@xx.xx.xx.xx:/remote_folder

However, this will require you to fill in the password. If the remote server is trusted, just create the key pair.


Enter file in which to save the key (/user/.ssh/id_rsa): put_any_name_here
Enter passphrase (empty for no passphrase):  (just press enter)
Enter same passphrase again: (just press enter)
Your identification has been saved in put_any_name_here
Your public key has been saved in

Copy the key to remote server :

ssh-copy-id -p 2424 -i /user/.ssh/ xx.xx.xx.xx

The key is now copied and you may log in to the remote server without using password anymore

ssh -p 2222

Schedule the rsync in a cronjob, that’s all 🙂

Installing and Setting Up Lucidworks Search 1.6 on Centos 7

  1. Install Java in RPM format
     rpm -ivh jdk-8u66-linux-x64.rpm
  2. Install Lucidworks in console mode
    java -jar lucidworks-search-installer-2.8.0.jar -console
  3. Assuming the installation folder is at /lucid, to start or stop the service, use :
  4. Get firewall active zones
    firewall-cmd --get-active-zones
  5. Open port for Lucidworks (8989) for the active zones
    firewall-cmd --zone=public --permanent --add-port=8989/tcp
  6. Reload the firewall rules
    firewall-cmd --reload
  7. Open your web browser, and type in this URL
  8. That’s all. Enjoy 🙂

Installing node-oracledb on Centos 7 for Meteor

  1. Download Oracle Instant Client basic, devel, and sqlplus package RPM from Oracle’s website in RPM format
  2. Install all files for Oracle Instant Client using :
    rpm -ivh oracle-instantclient*
  3. Set required environment variables :
    export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/
    export OCI_LIB_DIR=/usr/lib/oracle/12.1/client64/lib/
    export OCI_INC_DIR=/usr/include/oracle/12.1/client64/
  4. Install node-oracledb
    meteor npm install oracledb --save
  5. That’s it. Enjoy! 🙂

Installing Oracle 11 XE on Centos 7

  1. Download Oracle 11 XE from Oracle website here
  2. Install required tools
    yum install libaio bc flex unzip
  3. Unzip the downloaded Oracle archive
    unzip oracle-*
  4. Install Oracle
    cd Disk1
    rpm -ivh oracle-*
  5. Configure the newly installed Oracle database
    /etc/init.d/oracle-xe configure
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
    export PATH=$PATH:$ORACLE_HOME/bin
  9. export ORACLE_SID=XE
  10. Log in to SQLPlus
    sqlplus sys/sys as sysdba
  11. If you are Connected, add new user if you want. If not start the database first
  12. Add test user
    create user test identified by password;
    grant connect,resource,dba to test; //be careful for dba
  13. That’s all. Enjoy!