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

Advertisements

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

Converting .htaccess rewrite rules to IIS

  1. Make sure the URL Rewrite module is installed and enabled for IIS. Right click on Sites, and make sure there is an icon with URL Rewrite label is listed in the IIS section.
  2. Install URL Rewrite module from IIS website if the module is not available.
    Download the module here : https://www.iis.net/downloads/microsoft/url-rewrite.
  3. After installing, close and reopen the IIS Manager. Refreshing the modules list will not work.
  4. Double click on the URL Rewrite module, and go to inbound rules > Import Rules.
  5. Copy and paste the rewrite rule from .htaccess to the Rewrite rules box. You will then get the converted rules in Tree View and XML view.
  6. Click on Apply to accept the converted rules and click on Back to Rules.

Thats it! 🙂

 

 

 

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.

ssh-keygen

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 put_any_name_here.pub.

Copy the key to remote server :

ssh-copy-id -p 2424 -i /user/.ssh/put_any_name_here.pub 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 139.162.42.249

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 :
    /lucid/app/bin/start.sh
    /lucid/app/bin/stop.sh
  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
    http://your_server_ip:8989
  8. That’s all. Enjoy 🙂