Saturday, June 30, 2018

React Native commands

How to create your first project fast?

Get the command line tool

npm install exp --global


Create your first project

exp init my-new-project
cd my-new-project
exp start

npm install react-navigation@1.1.2

npm install --save react-native-elements

npm install native-base --save
npm install @expo/vector-icons --save


Start the build

exp build:android
exp build:ios

Good complete project 
https://expo.io/@geekyants/nativebasekitchensink

source code
https://github.com/GeekyAnts/NativeBase-KitchenSink/tree/CRNA


Thursday, June 28, 2018

Install Solr 7.4

Step 1. First, Install Java.
Because solr are Java based softwares we need the Java environment (As it is advised in the Solr wiki : prefere a full JDK to a simple JRE.)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
Step 3 – Setup JAVA_HOME and JRE_HOME Variable
nano /etc/environment
add two new lines

JAVA_HOME=/usr/lib/jvm/java-8-oracle
JRE_HOME=/usr/lib/jvm/java-8-oracle/jre

reboot then

to validate run  echo $JAVA_HOME




Install Solr



wget http://archive.apache.org/dist/lucene/solr/7.4.0/solr-7.4.0.tgz



tar xzf solr-7.4.0.tgz solr-7.4.0/bin/install_solr_service.sh --strip-components=2


sudo bash ./install_solr_service.sh  solr-7.4.0.tgz


Create Solr Collection with name TestCollection1

sudo su - solr -c "/opt/solr/bin/solr create -c TestCollection1 -n data_driven_schema_configs"

this will create new folder with name TestCollection1  in the path /var/solr/data


Start/Stop Solr
sudo service solr stop
sudo service solr start
sudo service solr status



After install Solr it will be available on 
http://  Server IP  :8983/solr/


View Live Solr Logs
tail -f /var/solr/logs/solr.log