Tag : linux-commands
Tag : linux-commands
Create symlink of file
ln -sf <source file path>/<filename> <destination file path>/<filename>
cat <destination file path>/<filename>
Generate ssh key of user
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub
Password less auth from both server, add ssh keys of each other into authorized keys
vi ~/.ssh/authorized_keys
Switch user
su - <username>
Kill services
kill -9 <process id>
killall -e <process name>
Check apache and mysql is running or not
ps aux | grep httpd
ps aux | grep mysql
Retrieve file using http, https and ftp
wget <http url>
File count in folder
<code
cd <folder path>
ls | wc -l
Check system version
cat /etc/redhat-release
Categories: Linux
Connect to the remote server
ssh <username>@<ipaddress>
Create file
vi <file name>
Save file
:w!
Save and Quit
:wq!
Quite without saving
:q
Copy File
cp <filepath>/<filename> Â <target file path>/<filename>
Move file
mv <filepath>/<filename> Â <target file path>/<filename>
Remove File
rm <filepath>/<filename>
Search In file
:/<string to search>
Search and replace all in file
:%s/<search string>/<replace string>
Go to the specific line
:<line number>
Copy remote file to the local
scp <remoteuser>@<remote ip>:<remote path>/<remote file name> <local path>
Open file as read only
cat <file path>/<file name>
Create directory
mkdir <directory name>
Check directory
cd <directory name>
List all files from folder or directory
cd <folder path>
ls
List file with an order
cd <folder path>
ls -lah
Remove file recursively
cd <folder path>
rm -r *
Remove files forcefully recursive
cd <folder path>
rm -rf *
Categories: Linux
Elasticsearch is …
It is …..
 Installation
Elasticsearch is based on java, so we need to install JAVA>6
yum install java-1.7.0-openjdk.x86_64
java -version
Download source from
wget https://download.elasticsearch.org/
elasticsearch/elasticsearch/elasticsearch-0.20.5.tar.gz
tar -xvf elasticsearch-0.20.5.tar.gz
cp -r elasticsearch-0.20.5.tar.gz elasticsearch
cd elasticsearch
Add elastic home path in “.bash_profile”
export $ES_HOME=/home/elasticsearch
Start/Run Elasticsearch
cd elasticsearch
bin/elasticsearch -f
Is it started?
You can confirm it by browsing URL like - http://127.0.0.1:9200/, it will shows something like
{
"ok" : true,
"status" : 200,
"name" : "Neville, Kate",
"version" : {
"number" : "0.20.5",
"snapshot_build" : false
},
"tagline" : "You Know, for Search"
}
Categories: Elasticsearch, Linux, Website Peformance