Three tier architecture
Sudo su - --> going to the root user for mysql installation.
dnf install mysql-server -y --> here 'dnf' is the package manager 'mysql-server' is package. 'y' means we are saying yes to install.
systemctl enable mysqld --> here 'd' means daemon, we call it daemon because they run continuously in the background
systemctl start mysqld
systemctl status mysqld
netstat -lntp --> to check if the port is open '3306' or not
ps -ef | grep mysql --> to check the process is running
mysql -h <ipaddress> -u <username> -p<password>
mysql --> just give mysql to connect to the server when client is on the same machine.
default user name for mysql admin is root during installation.
mysql_secure_installation --set-root-pass Expense@App1 --> set password to root user
Show databases; --> to show the list of databases
use mysql; --> to select which Schema to use
show tables;
select * from user;
NodeJs:
----------------
Dependencies to install node.js is nginx, git etc.
build file = package.json --> where you mention your project metadata like name,description,version
build tool = npm --> it will search package.json in your folder and it will
get the dependencies/libraries from internet.
Source files = .js
Sudo su -
dnf module list node.js --> here 'module' is in one OS it operats multiple versions
we can enable which version is required and disable which version is not required
dnf module disable nodejs:18 -y --> this disables the 18 version of NodeJS
dnf module enable nodejs:20 -y --> this enables the 20 version of Nodejs
dnf install nodejs -y --> Now Nodejs 20 version will install.
mkdir /app --> to place the project
curl -o /temp/backend.zip https://expense-builds.s3.us-east-1.amazonaws.com/expense-backend-v2.zip --> Download the application code to created app directory.
cd /app
unzip /tmp/backend.zip
Cat package.json
npm install --> it checks for the package.json in thje folder and it downloads the listed
packages from from internet.
--> Now node_modules new folder is created
/etc/systemd/system --> here you can place all your service files
In Linux logs are located at
var/log/messages
less /var/log/messages --> here less is same like vim.
Java:
-----------
build file = pom.xml --> where we store Project name description, dependencies
build tool = maven --> it will search for pom.xml file in your folder and it will get the dependencies/libraties from internet
Source file = .java
For Python:
---------------------
build file = requirements.txt
Build tool = pip --> it will search for the requirements.txt file and
it will get the dependencies/libraries from internet
source file = .py
Comments
Post a Comment