Friday, January 30, 2015

How to install Redmine in RHEL(Redhat) / CentOS Linux


 
Redmine is a very popular Rails-based open source bug tracker to help you manage issues and tasks for multiple projects


Download Bitnami Redmine from bitnami website https://bitnami.com/stack/redmine

[root@linux0110 opt]# ./bitnami-redmine-2.5.0-0-linux-installer.run
Language Selection


Please select the installation language
[1] English - English
[2] Spanish - Español
[3] Japanese - 日本語
[4] Korean - 한국어
[5] Simplified Chinese - 简体中文
[6] Hebrew - עברית
[7] German - Deutsch
[8] Romanian - Română
[9] Russian - Русский
Please choose an option [1] : <Enter>
----------------------------------------------------------------------------
Welcome to the Bitnami Redmine Stack Setup Wizard.


----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.


PhpMyAdmin [Y/n] : Y


Is the selection above correct? [Y/n]: Y


----------------------------------------------------------------------------
Installation folder


Please, choose a folder to install Bitnami Redmine Stack


Select a folder [/opt/redmine-2.5.0-0]: <Enter>


----------------------------------------------------------------------------
Create Admin account


Bitnami Redmine Stack admin user creation


Your real name [User Name]: admin


Email Address [user@example.com]: bharath@mycompany.com


Login [user]: admin


Password :
Please confirm your password :
----------------------------------------------------------------------------
Web Server Port


Please enter the port that the bundled Apache Server will listen to by default.


Apache Web Server Port [80]: 81


----------------------------------------------------------------------------
Web Server Port


Please enter the port that the bundled Apache Server will use for SSL access.


SSL Port [443]: 8433


----------------------------------------------------------------------------
MySQL Information


Please enter your MySQL database information:


MySQL Server port [3306]: 3300


----------------------------------------------------------------------------
Language for default data configuration


Select your language for default data configuration:


[1] Bulgarian
[2] Czech
[3] German
[4] English
[5] Spanish
[6] French
[7] Hebrew
[8] Italian
[9] Japanese
[10] Korean
[11] Dutch
[12] Polish
[13] Portuguese
[14] Portuguese/Brazilian
[15] Romanian
[16] Russian
[17] Serbian
[18] Swedish
[19] Chinese
[20] Chinese/Taiwan
Please choose an option [4] : 4


Do you want to configure mail support? [y/N]: y


----------------------------------------------------------------------------
Configure SMTP Settings


This is required so your application can send notifications via email.


Default email provider:


[1] GMail
[2] Custom
Please choose an option [1] : 2


----------------------------------------------------------------------------
Configure SMTP Settings


This data is stored in the application configuration files and may be visible to
others. For this reason, it is recommended that you do not use your personal
account credentials.


Username []: redmine


Password :
Re-enter :
SMTP Host []: 192.168.0.20


SMTP Port []: 25


Secure connection


[1] None
[2] SSL
[3] TLS
Please choose an option [3] : 1


----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Redmine Stack on your computer.


Do you want to continue? [Y/n]: Y


----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Redmine Stack on your computer.


Installing
0% ______________ 50% ______________ 100%
#########################################


----------------------------------------------------------------------------
Setup has finished installing Bitnami Redmine Stack on your computer.


Launch Redmine application. [Y/n]: Y


Info: To access the Bitnami Redmine Stack, go to
http://localhost:81 from your browser.
Press [Enter] to continue :

 -------------------------------------------------------------------------------------------------------------
Redmine tickets are stored in MySQL on backend. Good for Medium and Large Enterprise Usage.
With Redmine, you can define multiple projects and track issues on each project independently. Users can have different roles on each project and Redmine also supports custom issue types and workflows. The interface is easy to use and activity feeds ensures that users are always up-to-date on issue status changes.


Friday, August 8, 2014

InfiniDB(Single Server Mode) installation Step by Step on RHEL 6.x / CentOS 6.x

We are going to install InfiniDB - Single Server Mode(Standard Edition) on RHEL 6.x / CentOS 6.x

Download the source from http://www.infinidb.co/try-infinidb

Note: you need root access to install and configure InfiniDB and here commands executed are in BOLD.

OS : RHEL 6.5
User: root
Mode: Single User
Edition: Standard Edition

----------------------------------------------------------------------------------------------------------------



[root@server1 ~]# cd /usr/local/


[root@server1 local]# tar -xzf infinidb-4.5.1-3.x86_64.bin.tar.gz


[root@server1 local]# cd Calpont/bin/


[root@server1 bin]# ./post-install
The next step is:


/usr/local/Calpont/bin/postConfigure


[root@server1 bin]# ./postConfigure


This is the Calpont InfiniDB System Configuration and Installation tool.
It will Configure the Calpont InfiniDB System and will perform a Package
Installation of all of the Servers within the System that is being configured.


IMPORTANT: This tool should only be run on the Parent OAM Module
which is a Performance Module, preferred Module #1


Prompting instructions:


Press 'enter' to accept a value in (), if available or
Enter one of the options within [], if available, or
Enter a new value




===== Setup System Server Type Configuration =====


There are 2 options when configuring the System Server Type: single and multi


'single' - Single-Server install is used when there will only be 1 server configured
on the system. It's a shorter install procedure used for POC testing, as an example.
It can also be used for production systems, if the plan is to stay single-server.


'multi' - Multi-Server install is used when you want to configure multiple servers now or
in the future. With Multi-Server install, you can still configure just 1 server
now and add on addition servers/modules in the future. This is used more for
production installs.


Select the type of System Server install [1=single, 2=multi] (2) > 1


Performing the Single Server Install.
Enter System Name (calpont-1) > infinidb1


===== Setup Storage Configuration =====


----- Setup High Availability Data Storage Mount Configuration -----


There are 2 options when configuring the storage: internal or external


'internal' - This is specified when a local disk is used for the dbroot storage
or the dbroot storage directories are manually mounted externally
but no High Availability Support is required.


'external' - This is specified when the dbroot directories are externally mounted
and High Availability Failover Support is required.


Select the type of Data Storage [1=internal, 2=external] (1) > 1


Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of dbroot IDs assigned to module 'pm1' (1) > 1


===== InfiniDB SNMP-Trap Process Check =====


InfiniDB is packaged with an SNMP-Trap process.
If the system where InfiniDB is being installed already has an SNMP-Trap process
running, then you have the option of disabling InfiniDB's SNMP-Trap process.
Not having the InfiniDB SNMP-Trap process will affect the
generation of InfiniDB alarms and associated SNMP traps.
Please reference the Calpont InfiniDB Installation Guide for
additional information.


InfiniDB SNMP-Trap process is enabled, would you like to disable it [y,n] (n) > {PRESS ENTER}


InfiniDB SNMP Process successfully enabled


===== Setup the Network Management System (NMS) Server Configuration =====


This would be used to receive SNMP Traps from InfiniDB, like a Network Control Center
Enter IP Address(es) of NMS Server (0.0.0.0) > {PRESS ENTER}




===== Performing Configuration Setup and InfiniDB Startup =====


NOTE: Setting 'NumBlocksPct' to 50%
Setting 'TotalUmMemory' to 25% of total memory (Combined Server Install maximum value is 16G). Value set to 4G


Running the Infinidb MySQL setup scripts


Starting MySQL. SUCCESS!
Shutting down MySQL. SUCCESS!
SUCCESS!


Starting InfiniDB Database Platform


InfiniDB Database Platform Starting, please wait ......... DONE


System Catalog Successfull Created


InfiniDB Install Successfully Completed, System is Active


Enter the following command to define InfiniDB Alias Commands


. /usr/local/Calpont/bin/calpontAlias


Enter 'idbmysql' to access the InfiniDB MySQL console
Enter 'cc' to access the InfiniDB OAM console


[root@server1 bin]# . /usr/local/Calpont/bin/calpontAlias


[root@server1 local]# idbmysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.73 InfiniDB 4.5.1-3


Copyright (c) 2014, InfiniDB, Inc. and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.


InfiniDB is a registered trademark of InfiniDB, Inc. and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql>
 

---------------------------------------------------------------------------------------------------------


Yes ! we have successfully installed InfiniDB

if its throws any error, you can check the logs in /var/log/Calpont directory.
Also check whether mysql-calpont and infinidb service has been started.

 [root@server1 ~]# /etc/init.d/mysql-Calpont status
MySQL running (2355)                                       [  OK  ]
[root@server1 ~]# /etc/init.d/infinidb status
InfiniDB is running

If you face any other issue, do post here i will do my best to resolve your issue.



 

 

Monday, January 27, 2014

How to fix "-bash: crontab: command not found" error on CentOS 6.x

Suppose your getting the below error on CentOS box.

[root@server ~]# crontab -l
-bash: crontab: command not found

[root@server ~]# crontab -e
-bash: crontab: command not found

Step1 : INSTALL CRONTAB ON CENTOS 6.x
#yum install *cron*

Step2 : Enable the package on boot and start
# /sbin/chkconfig crond on

Step3: Start the service by
# /etc/init.d/crond start
             or
# service crond start

Wednesday, December 11, 2013

PHP Mcrypt on CentOS 6 64bit

PHP Mcrypt on CentOS 6
CentOS 6 still doesn’t by default include php mcrypt in it’s distribution on repositories. EPEL repo is the answer for this

Step 1: Install EPEL Repository
#rpm -ivh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
after installing epel rpm, we need to update the yum
#yum clean all
#yum list all

Step 2: Install php-mcrypt
#yum install php-mcrypt

Step 3: Add mcrypt entry to php.ini file
#vim /etc/php.ini
 add "extension=mcrypt.so"

Step 4: Restart Apache(httpd) Service
we need to restart apache service to make the changes reflect in php.
#service httpd restart

Step 5: Test it
if you need to check the details about installed mcrypt packages, run
#repoquery -i php-mcrypt
which will give you Name, verison, archi, size, repos, summary, etc.

Step by Step procedure for Sphinx installation and Configuration to fetch data from Oracle DB using ODBC on CentOS 6.4 Linux.

Step by Step procedure for Sphinx installation and Configuration to fetch data from Oracle DB using ODBC on CentOS 6.4 Linux.

Step1: Installing unixODBC
 Download unixODBC from http://www.unixodbc.org/unixODBC-2.3.1.tar.gz
 Extract the tar.gz file inside /opt folder &  Install UnixODBC using
# cd /opt/unixODBC-2.3.1
#./configure --enable-gui=no
# make
# make install

Step2: Installing Sphinx with unixODBC
 Download sphinx from http://sphinxsearch.com/downloads/sphinx-2.0.8-release.tar.gz
 Extract files to /opt folder
#cd /opt/sphinx-2.0.8-release
#./configure –prefix=/usr/local/sphinx –with-unixodbc

 Note :Here, you may replace ”/usr/local/sphinx" with the directory in which you want to install sphinx,"–with-unixodbc" parameter looks up for unixodbc installed on your system (which is done in step 1) and configures Sphinx to use unixODBC
# make
# make install
Sphinx is now installed.

Step 3: Installing Oracle Instant Client
Download the following files from Oracle - http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Download the following files:
oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-jdbc-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-odbc-12.1.0.1.0-1.x86_64
oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64

Install all the rpms by command line using “#rpm -ivh oracle-*”
Update your DB using command “#updatedb”

Step 4: Creating ORA files
The Oracle Instant Client contains Oracle ODBC Driver “libsqora.so.12.1”. We have to use this driver file in creating an ODBC DSN and connecting to the Oracle Database.
Locate the file using the command - #locate libsqora.so.12.1
This file must be located in /usr/lib/oracle/12.1/client64/lib folder.
Now create 3 files in /usr/lib/oracle/12.1/client64/bin folder as under:

#touch /usr/lib/oracle/12.1/client64/bin/tnsnames.ora
#touch /usr/lib/oracle/12.1/client64/bin/listener.ora
#touch /usr/lib/oracle/12.1/client64/bin/sqlnet.ora

 -> Edit listener.ora and enter the following in it. Replace HOST, SERVICE_NAME and SID Parameters with your values.

LISTENER =
 (DESCRIPTION_LIST =
    (DESCRIPTION =
       (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
       )
       (SERVICE_NAME = YourServiceName)
       (SID = YourSID)
    )
 )

 -> Edit sqlnet.ora and enter the following in it.

SQLNET.AUTHENTICATION_SERVICES= (NONE)

 -> Edit tnsnames.ora and enter the following in it. Replace HOST, SERVICE_NAME and SID Parameters with your values.

MYDATABASE =
 (DESCRIPTION =
    (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
    )
 (CONNECT_DATA =
      (SERVICE_NAME=YourServiceName)
(SID=YourSID)
 ) )

Step 5: Setup ODBC Variables
Create a file named odbcinst.ini in /usr/local/etc using command “#touch /usr/local/etc/odbcinst.ini”
Edit odbcinst.ini and insert the following parameters in it and save:

[Oracle]
 Description= ODBC for Oracle
 Driver = /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
 Setup =
 FileUsage = 1
 CPTimeout =
 CPReuse =

Create a file named odbc.ini in /usr/local/etc using command “#touch /usr/local/etc/odbc.ini”
Edit odbci.ini and insert the following parameters in it. Make sure you replace [mydsn], DSN = mydsn and ServerName = MYDATABASE with your values.

[mydsn]
 Application Attributes = T
 Attributes = W
 BatchAutocommitMode =
 IfAllSuccessful BindAsFLOAT = F
 CloseCursor = F
 DisableDPM = F
 DisableMTS = T
 Driver = Oracle
 DSN = mydsn
 EXECSchemaOpt =
 EXECSyntax = T
 Failover = T
 FailoverDelay = 10
 FailoverRetryCount = 10
 FetchBufferSize = 64000
 ForceWCHAR = F
 Lobs = T
 Longs = T
 MetadataIdDefault = F
 QueryTimeout = T
 ResultSets = T
 ServerName = MYDATABASE
 SQLGetData extensions = F
 Translation DLL =
 Translation Option = 0
 DisableRULEHint = T
 UserID =

Step 6: Setup Environment Variables
Edit #vim ~/.bash_profile and insert the following at the end:
LD_LIBRARY_PATH=“$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib:/usr/local/lib” export LD_LIBRARY_PATH
ODBCINI=”/usr/local/etc/odbc.ini” export ODBCINI
ODBCINST=”/usr/local/etc/odbcinst.ini” export ODBCINST
ORACLE_PATH=”/usr/lib/oracle/12.1/client64/bin” export ORACLE_PATH
TNS_ADMIN=”/usr/lib/oracle/12.1/client64/bin” export TNS_ADMIN
ORACLE_HOME=”/usr/lib/oracle/12.1/client64/bin” export ORACLE_HOME

Update the environment variables by executing command: “source ~/.bash_profile”

Step 7: 
Create a file oracle.conf in path.. /etc/ld.so.conf.d using the following command:
#touch /etc/ld.so.conf.d/oracle.conf
insert the following text in it and save.
/usr/lib/oracle/12.1/client64/lib
run  “#ldconfig” to update cache

Step 8: Test your environment

Test out isql utility : “isql -v mydsn user password” . This should connect you to the Oracle database using ODBC and give a prompt for issuing SQL Commands.
Test out sqlplus utility : “sqlplus user/pass@database”. This should connect you to the database and arrive at SQL Prompt.

Step 9:
Once the test environment is OK, edit sphinx.conf file, you should be able to derive data with the following parameters :

type = odbc
sql_host = 192.168.0.1
sql_user = user
sql_pass = password
sql_db = databasename
sql_port = 1521
odbc_dsn    = DSN=mydsn; Driver={'Oracle'};Dbq=192.168.3.121:1521/mydatabase;Uid=user;Pwd=password

Now your able to index from Oracle DB. :)

Friday, December 6, 2013

How to Access MS SQL Server from a unixODBC(FreeTDS) on CentOS 6.x ?

How to Access MS SQL Server from a unixODBC(FreeTDS) on CentOS 6.x ?

We assume that we have a recent version of unixODBC installed on your system and that we have MS SQL Server running somewhere & SQL Server should allow remote access and support connections using TCP/IP.

The communication protocol used by client software to communicate with MS SQL Server is called Tabular Data Stream (TDS). we are using FreeTDS


Download the latest version of FreeTDS from internet, 

Step 1: Un-compressing the tar file
# tar -zxvf freetds-0.63.tar.gz
# cd freetds-0.63

Step 2: Building FreeTDS
Now we need to configure with TDS version and path to unixodbc directory.
# ./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
# make
# make install

Step 3: Register ODBC driver
Create a new file odbcinst.ini under /usr/local/etc/ directory.

[FreeTDS]    
Description = v0.63 with protocol v8.0    
Driver = /usr/local/freetds/lib/libtdsodbc.so   
Setup=/usr/lib64/libtdsS.so
FileUsage=1

Note : if your having 32 bit OS(i386 or i586) you should add "Setup=/usr/lib/libtdsS.so"

Now install the FreeTDS driver by
# odbcinst -i -d -f /usr/local/etc/odbcinst.ini

Step 4: Creating ODBC data source
Create a new file odbc.ini under /usr/local/etc/ directory.
[SQLServer]
Driver  = FreeTDS
Description = This is the Live Database
Trace   = No
Server  = 30.220.24.189
Port   = 1433
Database  = MainZoneCentral

Note: if we need log for the freetds, we can change Trace = Yes and redirect the logs to needed folder.

Note; we have executed previous commands as root (denoted by leading '#' character on given commands) but here we execute the command as a regular user. This is significant.
All users of the system should be accessable to the FreeTDS and the ODBC Drivers. So create the DSN as the user who is going to be using it.

$ odbcinst -i -s -f odbc.ini

Step 5: Check the connection
# tsql -S 30.220.24.189 -U sa -P pwd@123
where
-S Server IP
-U Username
-P Password

Sample Output
[java@ssserver ~]$ tsql -S 30.220.24.189 -U sa -P pwd@123
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>

which means your able to connect Successfully

Step 6: Enabling in PHP
edit the php.ini file in etc folder   
   
#vim /etc/php.ini and add

extension = odbc.so

Save and close the file

Restart the Apache(httpd) Service to reflect the changes
#service httpd restart

Now your sphinx index is able to connect the MS SQL Server and fetch the records as indexes :)

EXTRA SECTION
Additional Info
odbcinst -j              # To check the ODBC version and configuration.
odbcinst -q -d           # View loaded drivers.
odbcinst -q -s           # View DSN entry
tsql -LH 22.33.55.44       # To list MSSQL server instant name,version etc.,
osql -S DSN -U Username -P ‘Password’ #list the configuration files loaded to connect ODBC
tsql -S DSN -U Username -P ‘Password’ #To check the connection