Skip to content

Latest commit

 

History

History
460 lines (399 loc) · 15.5 KB

utils-infrastructure.md

File metadata and controls

460 lines (399 loc) · 15.5 KB

INFRA

SCALING

LIST

COURSES

ARTICLES

HELPER

DASHBOARD

WORFLOW

TOOLS

TOOLS OSS

TOOLS: PIPELINES / CODE QUALITY

TOOLS: TUNNEL / SELF HOST

TOOLS: MONITORING / OBSERVABILITY / LOGGING / REPLAYING / TELEMETRY

TOOLS: MONITORING: SASS

TOOLS: MESSAGING

PACK

HOST SERVICES CLOSED

HOST SERVICES OSS / SELF HOSTED

HOST SERVICES OSS / TUTOS

REGISTRY

NGINX

CLOUDFARE

AWS

JENKINS

TERRAFORM

KUBERNETES

REDIS

ANSIBLE

AZURE

LAMP

mysql -V
php -m
php -version
sudo apt install zip
sudo zip -r filename.zip foldername/
sudo unzip filename.zip -d directory

Installation

sudo apt-get install php7.2-xml # add all the php package here
sudo apt install mariadb-server # install the mariaDB
sudo mysql_secure_installation # configure the mariaDB
sudo mysql # enter the mysql command line
sudo chmod 660 /var/www/html/phpmyadmin/config.inc.php
sudo chown -R www-data:www-data /var/www/html/phpmyadmin/
sudo service apache2 restart # check status of the apache server
sudo systemctl status apache2 # restart of the apache server
mysql -u pmauser -p dbname < dbfile.sql # execute sql file
sudo chown -R debian www # change file or folder owner (user:debian)
CREATE USER 'pmauser'@localhost IDENTIFIED BY 'mypwd';
GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@localhost IDENTIFIED BY 'mypwd';

Certificate

sudo apt-get install certbot
sudo apt-get install python-certbot-apache
sudo certbot --apache # new configuration
sudo certbot --apache -d example.com -d www.example.com # reconfigure
sudo certbot --apache -d hotelub.com -d www.hotelub.com # reconfigure

NGINX

CRON

crontab -e

Once you enter the above command you will be asked to choose a text editor. Choose nano if you are first time editing or go with your choice.

In the crontab, the m h dom mon dow user header has the following meaning

  • m = The minute when the cron job will run. (0 to 59)
  • h = A integer determining the hour when the tasks will run. (0 to 23)
  • dom = Day of the Month when the cron job will run. (1 to 31).
  • mon = The month when the cron job will run. (1 to 12)
  • dow = Day of the Week from 0-6 with Sunday at 0. (0 to 6)
  • user = The User under which the cron will run.
  • command = The Linux command you wish to execute.

DOMAIN CHECK

nslookup set type=TXT domain.fr

PROCESS + UTIL

PUTTY

SUPERVISION

htop

UPDATE

aptitude update aptitude upgrade

UPDATE DATE

aptitude install ntp ntpdate sudo nano /etc/ntp.conf

server 0.fr.pool.ntp.org server 1.fr.pool.ntp.org server 2.fr.pool.ntp.org server 3.fr.pool.ntp.org

service ntp start

FIREWALLING

iptable

vps1 et vps2 > entree 22 pour tout le monde . et 80 si origin load balancer sql > entree 3389 depuis vps. et le 22 tout le monde

CERTIFICATE

DEFINITIONS

  • What Is NAT? NAT stands for network address translation. It's a way to map multiple local private addresses to a public one before transferring the information. Organizations that want multiple devices to employ a single IP address use NAT, as do most home routers.