Thursday, February 24, 2022

task



|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
In this video, I'll guide you through the process of creating your MySQL and phpMyAdmin containers. Later on, I'll show you how to access the MySQL database using phpMyAdmin.

$ docker create volume mariadb-volume

$ docker run -p 3307:3306 -v mariadb-volume:/var/lib/mysql --name Practiceflow_Mariadb10_3 -e MYSQL_ROOT_PASSWORD=34278wtfea4rDXe57RDEu4643wedFRdc -d mariadb:10.3

$ docker run --name my-phpmyadmin -d -p 8080:80 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin

mysql -u root -p --host=127.0.0.1 --port=3307
http://container-ip:8080

Note : If you encounter connection issues with phpMyAdmin, try specifying the MySQL container's IP address in the server section of phpMyAdmin.


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

How to Calculate Percentage of your Marks:

1) Eng 50
2) Mat 56
3) Sci 88
4) Eco 66
5) Eng 76
6) Pol 52
_______________

Total= 388
_______________

388/600*100= 64%


How to Calculate Percentage of Any Amount :  20000 x 2% / 100 = 400
 
 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

 
FYI: IonCube Loader should be installed On Every PHP Project.

IonCube Loader is a PHP extension that is used to decode encrypted PHP files at runtime. It is commonly used by developers to protect their PHP code from unauthorized access and to prevent it from being reverse-engineered

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


Connect EC2 Instance Via “Session Manager”

a) Create EC2 Role and Assigne "AmazonSSMManagedInstanceCore" Policy
b) Assigne that role to desried ec2 instance.
c) Check and connect after 2 min


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

1) Html Row and Table Generate  https://www.htmlcodegenerator-tools.com/

2) Create Html table code via excel file just save the file in .html and open it on notepad

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
For your Information :

Wildcard certificate can secure unlimited subdomains of the 1st level subdomain by default.
Ex 1st level subdomain: dev.domain.com, demo.domain.com

and if you also want to secure 2nd level subdomain with the same Wildcard certificate, So can't do it in namecheap.
you need to purchase another another wildcard certificate, those will secure 2nd level subdomain.
Ex 2nd level subdomain: delhi.dev.domain.com, mumbai.demo.domain.com
 

 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
How To Add Code Box In Blog


@Below Is the Code

<form><textarea cols="100" onclick="select()" readonly="" rows="10">

Here-Write-Or-Paste-Your-Code-And-Text

</textarea></form>
 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
Install Let's Encrypt SSL On WHM/Cpanel

1) install snapd and certbot -----> from certbot website
2) stop httpd service
3) sudo certbot certonly --standalone
4) you will get certificate files in -----> /etc/letsencrypt/live/
5) upload following files in cpanel

a) cert.pem
b) privkey.pem
c) chain.pem(Bundle)

 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 
###If you are getting Error during making database connection on adminser or phpmyadmin ###

So, kindly add below command on mysql configuration file then restart database.
Error : The server requested authentication method unknown to the client

vim /etc/mysql/mysql.conf.d/mysqld.cnf
default_authentication_plugin= mysql_native_password
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

### new changes not reflecting in s3 bucket ###

The main advantage of using CloudFront is to get your files from a source (S3 in your case) and store it on edge servers to respond to GET requests faster. CloudFront will not go back to S3 source for each http request.

For immediate reflection of your changes, you have to invalidate objects in the Cloudfront
- Distribution list -> settings -> Invalidations -> Create Invalidation.

Write /* for all object
This will clear the cache objects and load the latest ones from S3.


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

#Issue

I am getting en error in Apache since long time. And the issue is that after some time,
reverse proxy rules removed from Apache virtual host automatically.

#Cpanel_Reply

The most common reason that a configuration setting would get removed from WHM/Cpanel when rebuilding the httpd.conf file is because the modification was done directly to the configuration file. When cPanel rebuilds the apache conf, it does so using template files and any configuration not in those templates are not included.

#Solution_cPanel Apache Reverse Proxy

Step 1. Download The Proxy Script

wget https://raw.githubusercontent.com/varunsridharan/cpanel-apache-proxy/main/proxy.sh

Step 2. Run To Create A New Proxy

sh proxy.sh "cpanelAccountName" "blog.example.com" "http://192.168.1.41:32000"

Step 3. Rebuild & Restart HTTP /scripts/rebuildhttpdconf && service httpd restart

 

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

https://awspolicygen.s3.amazonaws.com/policygen.html


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
CI/CD Key Components

Build

The build phase is usually the one that starts the whole pipeline. Whenever the developer pushes the code to a repository, the build phase of CI/CD will be triggered. As mentioned in the previous section, the outcome of the build phase will depend on the languages and technologies used. Nevertheless, the successful completion of the build phase should result in a new software release being created.

Test

The Test phase can happen a few times in the whole process. You can execute a different set of tests at the beginning and at the end of the pipeline. After the initial build phase, it's common to run unit tests on the newly created software release. This step will determine if written code does what it's supposed to do. Later in the process, you can run the test phase again to execute integration or any other tests. In fact, you can run the test phase after every other phase in the process.

Remember that one of the key points of CI/CD is to spot issues as soon as possible. Therefore, instead of running one test phase at the end of the pipeline with all possible tests, it's better to split them logically into smaller test phases. For example, there is no need to run integration tests if unit tests are failing.

Deploy

The deploy phase can also happen multiple times in one pipeline. First, in a development environment, staging and production shouldn't happen at the same time, right? It's common to run basic tests first, then deploy to a staging environment, then run more tests and only then deploy to production.



$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

How To Run React Code In Docker Container

npx create-react-app react-docker
cd react-docker
vim server.js

==========================================================
const express = require("express");
const path = require("path");

const app = express();

app.use(express.static(path.join(__dirname, "./build")));
app.get("/*", (req, res) => res.sendFile(path.join(__dirname, "./build/index.html")));

const PORT = process.env.PORT || 4040;

app.listen(PORT, () => console.log(`Server started on port ${PORT}`));
==========================================================

vim Dockerfile
==========================================================
FROM node
WORKDIR /app
COPY . /app
RUN npm install
RUN npm install pm2 -g
RUN npm run build
EXPOSE 4040
CMD ["pm2-runtime", "server.js"]
==========================================================

docker build .
docker run image-id -itd -p 4040:4040



$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
IMUNIFY360 IS A COMPREHENSIVE SECURITY SUITE FOR LINUX WEB SERVERS.
Antivirus, Firewall, WAF, PHP Security Layer, Patch Management,Domain Reputation with easy UI and advanced automation.

uses For cPanel, Plesk, Direct Admin and stand-alone installation


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

how-to-backup-and-restore-iptables-on-centos-7-rhel-7

Step 1 : To take iptables backup
iptables-save > iptables.bak


Step 2 : To restore iptables
iptables-restore < iptables.bak


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Command line instructions

Git global setup
git config --global user.name "Administrator"
git config --global user.email "admin@example.com"


=======================
Create a new repository
=======================

git clone git@100.100.7.4:root/flexsin-sys-inventory.git
cd flexsin-sys-inventory
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

=======================
Existing folder
=======================

cd existing_folder
git init
git remote add origin git@100.100.7.4:root/flexsin-sys-inventory.git
git add .
git commit -m "Initial commit"
git push -u origin master

=======================
Existing Git repository
=======================

cd existing_repo
git remote rename origin old-origin
git remote add origin git@100.100.7.4:root/flexsin-sys-inventory.git
git push -u origin --all
git push -u origin --tags



$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

All Domain Name Server

https://www.godaddy.com
NS49.DOMAINCONTROL.COM
NS50.DOMAINCONTROL.COM

Hostinger NameServer
ns1.dns-parking.com
ns2.dns-parking.com

AWS NameServer
ns-1036.awsdns-01.org
ns-1863.awsdns-40.co.uk
ns-575.awsdns-07.net
ns-297.awsdns-37.com

Name.com NameServer
ns1dhl.name.com
ns2fgv.name.com
ns3cjl.name.com
ns4dfh.name.com

BlueHost.com NameServer
NS1.BLUEHOST.COM
NS2.BLUEHOST.COM

INMOTIONHOSTING.COM NameServer
NS.INMOTIONHOSTING.COM
NS2.INMOTIONHOSTING.COM

ionos.com NameServer
Name Server: ns1124.ui-dns.org
Name Server: ns1081.ui-dns.com
Name Server: ns1095.ui-dns.de
Name Server: ns1118.ui-dns.biz

---------------------------------------------------------------------------------------------------------------------------------------------
Go To google and write "limetorrents proxy"
Open any link
then write "whatever Subject"
then download torent file
install qbittorrent software

---------------------------------------------------------------------------------------------------------------------------------------------

DNS Propagation time can vary depending on the geographical location.
Normally, the domain DNS takes 0-8 hours and is known to take up to 48 hours maximum to completely propagat

---------------------------------------------------------------------------------------------------------------------------------------------

 


 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHP SMTP CHECKER CODE

git clone git@github.com:subhashsautiyal/smtp-checker.git
---------------------------------------------------------------------------------------------------------------------------------------------

Issue :- Usally We Run Project On Running Terminal, So If Terminal Closed Project also will closed.
Solution :- In Development Evenviroment Only We Create DJango Service To Run And Stop Project Without Intreptuing Terminal.

$ cd /etc/systemd/system
$ sudo vim project_name.service

[Unit]
Description=ProjectName
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=projectname
PermissionsStartOnly=true
User=ubuntu
Group=ubuntu
ExecStart=/var/www/html/env/bin/python3 /var/www/html/myproject/manage.py runserver 4045
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

$ sudo service project_name start
$ sudo service project_name status
$ sudo service project_name stop

-----------------------------------------------------------------------------------------------------------------------------------------

Run DJango Project On Production Without Intreptuing Terminal With Apache.

Install wsgi module in project.
$ pip install mod-wsgi

Configure HTTP AND HTTPS Virtualhost


---------------------------------------------------------------------------------------------------------------------------------------------

Make Mysql Database Connection File

 

Verify web server connecting to your DB instance at browser http://127.0.0.1/mysqlcon/sample.php

---------------------------------------------------------------------------------------------------------------------------------------------
Stdin add in Cpanel for ci-cd

$ vim .bashrc

[ -z "$PS1" ] && return

---------------------------------------------------------------------------------------------------------------------------------------------
How To Get FaceBook Account Name From Contact Number Or Email Address.

-> Run below Url on browser and paste Contact Number Or Email Address.

https://www.facebook.com/login/identify


--------------------------------------------------------------------------------------------------------------------------------------
To get the all activity of user since many year to till now by using https://myactivity.google.com
or even can get location and chrome history



---------------------------------------------------------------------------------------------------------------------------------------------
https://www.smtper.net/
 
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------

9 comments:

  1. donation + got T-shirt/Shirt/Cap/Sticker + with printed line(I donated few bucks to save child)

    ReplyDelete
  2. Hey Mr Sebastian, How'r you ?

    ReplyDelete
  3. how to configure SMTP in gmail

    ReplyDelete
  4. Deploying ReactJS Docker Container in ubuntu via jenkins

    ReplyDelete
  5. AWS events history example : delete ec2 and other

    ReplyDelete
  6. Kindly arrange a time slot for 11:45 AM to initiate an upfront payment at 8447415319@paytm. Thank you.

    ReplyDelete
  7. Configure Mysql Remote Connection

    ReplyDelete
  8. 1) Learn how to use AWS CLI for S3 | upload, download, list and sync files to s3.
    2) How to Recover AWS EC2 Instance PEM file or key file

    ReplyDelete

testing