Posts

CEPH bluestore using ceph-ansible

Just to test the ceph bluestore i have created 2 virtual machine in virtualbox with hostname: admin & osd1. Attached the 2 10G hdd for the OSD's in both the nodes. Below are the commands that i used to deploy it using the ceph-ansible: git clone https://github.com/ceph/ceph-ansible cd ceph-ansible cp group_vars/osds.yml.sample group_vars/osds.yml cp group_vars/all.yml.sample group_vars/all.yml cp group_vars/mons.yml.sample group_vars/mons.yml cp site.yml.sample site.yml vi group_vars/osds.yml     devices:    - /dev/sdb     - /dev/sdc bluestore : true vi group_vars/all.yml ceph_stable: true ceph_mirror: http://download.ceph.com/ ceph_stable_key: https://download.ceph.com/keys/release.asc ceph_stable_release: kraken ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}" monitor_interface: enp0s3 monitor_address: 192.xx.xx.xx osd_objectstore: bluestore ceph_conf_overrides:  ...

Solved : Unable to lock the administration directory (/var/lib/dpkg/)

Delete the lock file using below command: sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock now you can install package using apt-get command.

Install Scala in CentOS 6

Installation of Scala Steps : wget http : / / downloads .typesafe .com / scala / 2.11.1 / scala - 2.11.1.tgz tar xvf scala - 2.11.1.tgz sudo mv scala - 2.11.1 / usr / lib sudo ln - f - s / usr / lib / scala - 2.11.1 / usr / lib / scala Configuration of Scala in CentOS Add to PATH, edit /etc/profile.d/scala.sh  export PATH=$PATH:/usr/lib/scala/bin source /etc/profile.d/scala.sh     $ scala -version  Scala code runner version 2.11.1 -- Copyright 2002-2013, LAMP/EPFL  Note : for future ref: substitute the latest release by visiting http://www.scala-lang.org/download/all.html , click on the latest release and scroll down to “Other resources”. There you’ll find the Max OS X, Unix, Cygwin version .tgz file. Right click and copy the url to your clipboard and use it in your wget [right-click-paste].

Start wildfly service with standalone-full.xml

Wildfly provides a service.bat in %WILDFLY_HOME%\bin\service. Calling the batch file with the install parameter installs Wildfly as a service on Windows. Once it is installed on windows, you can change the settings so that wildfly starts all the modules and services instead of default minimal setup. For this, change standalone.bat file and add this line : set "SERVER_OPTS=--server-config=standalone-full.xml" This will enable startup of all modules & services of wildfly from now on.

Scan FC LUN's in RHEL/CentOS

1.First find out how many disks are visible in “fdisk -l” . # fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l 2.Find out how many host bus adapter configured in the Linux box.you can use “systool -fc_host -v” to verify available FC in the system. # ls /sys/class/fc_host host0 host1 In this case,you need to scan host0 & host1 HBA. 3.If the system virtual memory is too low ,then do not proceed further.If you have enough free virtual memory,then you can proceed with below command to scan new LUNS. # echo "1" > /sys/class/fc_host/host0/issue_lip # echo "1" > /sys/class/fc_host/host1/issue_lip Note:   You need to monitor the “issue_lip” in /var/log/messages to determine when the scan will complete.This operation is an asynchronous operation. 4.Verify if the new LUN is visible or not by counting the available disks. # fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l If any new...

List all files & Folders In Windows/Unix

On Windows CMD Prompt: dir /s /b /o:gn On UNIX : find . -print | sed 's;[^/]*/;|___;g;s;___|; |;g'

How to enable federated engine in MySQL

[root@srvcob etc]# mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.52 Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show engines; +------------+---------+------------------------------------------------------------+--------------+------+------------+ | Engine     | Support | Comment                                                ...

Check the physical status of an Ethernet port in Linux

Using in-built command : root@abcd~# ethtool <ethX> for eg: root@abcd~# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000001 (1) Link detected: yes check the last line if it shows yes then that ethernet port is up. OR root@abcd~# dmesg | grep eth ...

Enable Remote Admin Glassfish

GlassFish 3.1.2+ does not allow remote administration out-of-the-box. To activate remote administration you will have to set an admin password before performing the actual enabling: asadmin change-admin-password --domain_name [DOMAIN_NAME] asadmin enable-secure-admin --port [PORT_NAME]

JRE in Chrome CentOS 6.4

Just link  libnpjp2.so  which is in  <your-java-dir>/lib/i386  to /opt/google/chrome/plugins  . For me, here are the commands: mkdir /opt/google/chrome/plugins cd /opt/google/chrome/plugins ln -s /usr/local/jre1.6.0_17/lib/i386/libnpjp2.so . Restart Chrome and enjoy!

Completely Re-install Apache2 on Ubuntu

Find and drop all Apache packages: 1 2 3 4 5 6 7 8 9 10 APACHE_PKGS = ` sudo   dpkg   --get-selections   |   grep  apache  |   cut   -f   1 ` # Make sure things are sane: echo   $APACHE_PKGS # Example output: apache2 apache2-mpm-prefork apache2-utils apache2.2-common \ # libapache2-mod-php5 libapache2-mod-python libapache2-svn # Likely if you have a Python application: # libapache2-mod-python libapache2-mod-python-doc libapache2-mod-wsgi # Or if you roll with the PHP:  # libapache2-mod-php5 sudo   apt-get remove   --purge   $APACHE_PKGS Re-install Apache 1 2 3 # You might want to consider not re-installing the whole list; # instead dump it out, audit, and install what you need: sudo   apt-get install   $APACHE_PKGS After this, all the configuration files were back, and I had a default Apache install.

Create Bulk folders Using Batch file

Simple Script To Create Bulk Folder L:isted In Text File: Create a file named "CreateDir.bat"  and list all the folders tat you want to create in "file.txt" Content of CreateDir.bat 1 2 3 @ echo off for /f %%i in (file.txt) do mkdir %%i Simply run the batch file and your folders will be created.!

HowTO: Install Postfix & dovecot On CentOS 6

How to installing Postfix and Dovecot on Linux CentOS yum install postfix dovecot chkconfig postfix on chkconfig dovecot on  Configure main.cf : vi /etc/postfix/main.cf # change or add on these line: myhostname = mail.fileregion.com mydomain = fileregion.com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 127.0.0.0/8 home_mailbox = Maildir/ smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit broken_sasl_auth_clients = yes Restarting postfix: /etc/init.d/postfix restart Configure Dovecot on Linux CentOS 6 Configure dovecot.conf: vi /etc/dovecot/dovecot.conf # uncomment on this line: protocols = imap pop3 listen = * Config mail auth mehanism: vi /etc/dovecot/conf.d/10-auth.conf # change on these line: disable_plainte...

HowTO: Install VNC Server On CentOS 6.3

1. Install Tigervnc Server view plain copy to clipboard print ? [root@demo ~]# yum -y install tigervnc-server   2. Install X Windows and GNOME. This used to be yum groupinstall "X Window System" "GNOME Desktop Environment", but is now simply: view plain copy to clipboard print ? yum groupinstall  "X Window System"   "Desktop"    3. Create a user (or use and existing user) and create VNC login. view plain copy to clipboard print ? [root@demo ~]# useradd david   [root@demo ~]# passwd david   Changing password  for  user david.   New password:   Retype  new  password:   passwd: all authentication tokens updated successfully.   [root@demo ~]# su - david   4. Switch to the user (su - user) and is...