Install RPM in CentOS

Install RPM in CentOS RPM Package Manager (RPM), originally called the Red-hat Package Manager, is a program to install or uninstall software packages or libraries in Linux. To install RPM in CentOS, first download the RPM: [roop@localhost ~]$ wget ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/opencv-2.0.0-12.el6.x86_64.rpm now check in your directory opencv-2.0.0-12.el6.x86_64.rpm will be available for installation.To install RPM in CentOS…

Read More
PHP CURL on Proxy Server

How to use CURL with Proxy

This post will be demonstrating how to use curl with proxy in PHP and Linux command line. What is additional parameter we need to pass while using curl via proxy. So I am starting with proxy configuration in PHP curl. 1) PHP curl with proxy $url = ‘http://localhost/path/to/file.php’; $proxy = ‘127.0.0.2:3128’; $ch = curl_init(); curl_setopt($ch,…

Read More

Rename all Files in the Directory

Here is the simple shell script to rename all files in the folder with increasing number. In below example I am going to rename all jpg image with increasing number. #!/bin/bash a=1 for i in *.jpg; do new=$(printf “%04d.jpg” “$a”) mv — “$i” “$new” let a=a+1 done Output: 0001.jpg 0002.jpg 0003.jpg 0004.jpg 0005.jpg 0006.jpg 0007.jpg…

Read More

Run Mysql Query from Command Line

Shell script to run mysql query from command line without login into mysql command prompt.  You can use these shell script for quickly execution of MySQL query from a Linux Shell. Method 1: #!/bin/bash #Script to run mysql query from command line #Db Connection. DB_USER=’root’ DB_PASSWD=’mypwd’ DB_NAME=’mydb’ #Prepare sql query QUERY=’select * from employee’ #Command to connect…

Read More

Install Elasticsearch using Repositories

Install Elasticsearch using Repositories You can easily install Elasticsearch using APT and YUM repository – Install Elasticsearch Using APT repository – Install Elasticsearch Using Yum repository Install Elasticsearch 5.0 on Debian: Step 1: Download and Install Elasticsearch Public signin key wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add – Step 2: Installation using APT Repository…

Read More
Verified by MonsterInsights