Skip to content

Instantly share code, notes, and snippets.

@OmarLatrach
OmarLatrach / .bashrc
Created June 26, 2020 13:45
Adding Spark bin to the PATH
export SCALA_HOME=/usr/local/scala
export PATH=$SCALA_HOME/bin:$PATH
export SPARK_HOME=/usr/local/spark
export PATH=$SPARK_HOME/bin:$PATH
@OmarLatrach
OmarLatrach / sh
Created June 26, 2020 13:40
Spark installation
wget https://archive.apache.org/dist/spark/spark-3.0.0/spark-3.0.0-bin-hadoop3.2.tgz
tar xvf spark-3.0.0-bin-hadoop3.2.tgz
sudo mv spark-3.0.0-bin-hadoop3.2 /usr/local/spark
sudo cp /usr/local/spark/conf/log4j.properties.template /usr/local/spark/conf/log4j.properties
@OmarLatrach
OmarLatrach / sh
Last active July 8, 2020 00:58
Scala Installation
wget https://downloads.lightbend.com/scala/2.12.11/scala-2.12.11.tgz
tar xvf scala-2.12.11.tgz
sudo mv scala-2.12.11 /usr/local/scala
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:34
Restarting MongoDB process
sudo systemctl restart mongod
@OmarLatrach
OmarLatrach / conf
Created June 22, 2020 21:32
MongoDB configuration
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
security:
authorization: enabled
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:27
Exiting the Mongo shell
exit
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:26
Creating admin user in MongoDB
db.createUser({
user: 'admin',
pwd: 'password',
roles: [{ role: 'root', db:'admin'}]
})
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:24
Creating admin database
use admin
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:21
Starting a Mongo shell
mongo
@OmarLatrach
OmarLatrach / sh
Created June 22, 2020 21:19
Starting the MongoDB service
sudo systemctl start mongod