How To Install Django, Flask, InfluxDB, Node, Go, MongoDB on Ubuntu
Introduction
Ubuntu is a popular choice for developers due to its stability and extensive package support. This guide provides step-by-step instructions to install Django, Flask, InfluxDB, Node.js, Go, and MongoDB on Ubuntu.
1. Installing Django
a) Install Python and pip
sudo apt update
sudo apt install python3 python3-pip -y
b) Install Django using pip
pip3 install django
c) Verify Installation
django-admin --version
2. Installing Flask
a) Install Flask using pip
pip3 install flask
b) Verify Installation
python3 -c "import flask; print(flask.__version__)"
3. Installing InfluxDB
a) Add the InfluxDB Repository
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
b) Install InfluxDB
sudo apt update
sudo apt install influxdb -y
c) Start and Enable InfluxDB
sudo systemctl start influxdb
sudo systemctl enable influxdb
d) Verify Installation
influx --version
4. Installing Node.js
a) Install Node.js and npm
sudo apt update
sudo apt install nodejs npm -y
b) Verify Installation
node -v
npm -v
5. Installing Go (Golang)
a) Download and Install Go
wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz
b) Set Up Go Path
Add the following lines to ~/.bashrc
or ~/.profile
:
export PATH=$PATH:/usr/local/go/bin
Reload the shell:
source ~/.bashrc
c) Verify Installation
go version
6. Installing MongoDB
a) Import the MongoDB GPG Key
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
b) Add the MongoDB Repository
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
c) Install MongoDB
sudo apt update
sudo apt install -y mongodb-org
d) Start and Enable MongoDB
sudo systemctl start mongod
sudo systemctl enable mongod
e) Verify Installation
mongod --version
Conclusion
This guide covered the installation of Django, Flask, InfluxDB, Node.js, Go, and MongoDB on Ubuntu. These tools provide a strong foundation for web development, backend services, and data storage. You are now ready to start building applications with these technologies!
Pingback: How To Install Django, Flask, InfluxDB, Node, Go, MongoDB on Ubuntu — IoTbyHVM – Bits & Bytes of IoT – hashstacks