Tuesday, August 3, 2021

CNAME, A-Record, DNS Mapping, AWS Route 53

A CNAME, or Canonical Name record, is a record that points to another domain address rather than an IP address.

For example, say you have several subdomains, like www.mydomain.com, ftp.mydomain.com, mail.mydomain.com etc and you want these sub domains to point to your main domain name mydomain.com. Instead of creating A records for each sub-domain and binding it to the IP address of your domain you can create CNAME records.

As you can see in the table below, in the case where the IP address of your server changes, you only need to update one A record and all the subdomains follow automatically because all the CNAMES point to the main domain with the A record:

(sub)Domain / HostnameRecord TypeTarget / Destination
mydomain.comA111.222.333.444
www.mydomain.comCNAMEmydomain.com
ftp.mydomain.comCNAMEmydomain.com
mail.mydomain.comCNAMEmydomain.com



Maven 3.8.1 Blocks HTTP repositories

The decision was made to block such external HTTP repositories by default

https://stackoverflow.com/questions/66980047/maven-build-failure-dependencyresolutionexception/67018302#67018302


How to fix when I get a HTTP repository blocked?

If the repository is defined in your pom.xml, please fix it in your source code.

If the repository is defined in one of your dependencies POM, you’ll get a message like:

[ERROR] Failed to execute goal on project test: Could not resolve dependencies for project xxx: Failed to collect dependencies at my.test:dependency:version -> my.test.transitive:transitive:version: Failed to read artifact descriptor for my.test.transitive:transitive:jar:version: Could not transfer artifact my.test.transitive:transitive:pom:version from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [blocked-repository-id (http://blocked.repository.org, default, releases+snapshots)]

They go on to offer some ways to avoid the problem:

Options to fix are:

  • upgrade the dependency version to a newer version that replaced the obsolete HTTP repository URL with a HTTPS one,

  • keep the dependency version but define a mirror in your settings.

Plus, I suppose, the simpler, shorter-term option would be to roll back your version of Maven to anything prior to 3.8.1.


IPTables - Firewall -Linux - Redhat

https://www.redhat.com/sysadmin/iptables

/usr/local/bin vs /usr/bin

https://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux


  1. /bin (and /sbin) were intended for programs that needed to be on a small / partition before the larger /usr, etc. partitions were mounted. These days, it mostly serves as a standard location for key programs like /bin/sh, although the original intent may still be relevant for e.g. installations on small embedded devices.

  2. /sbin, as distinct from /bin, is for system management programs (not normally used by ordinary users) needed before /usr is mounted.

  3. /usr/bin is for distribution-managed normal user programs.

  4. There is a /usr/sbin with the same relationship to /usr/bin as /sbin has to /bin.

  5. /usr/local/bin is for normal user programs not managed by the distribution package manager, e.g. locally compiled packages. You should not install them into /usr/bin because future distribution upgrades may modify or delete them without warning.

  6. /usr/local/sbin, as you can probably guess at this point, is to /usr/local/bin as /usr/sbin to /usr/bin.

In addition, there is also /opt which is for monolithic non-distribution packages, although before they were properly integrated various distributions put Gnome and KDE there. Generally you should reserve it for large, poorly behaved third party packages such as Oracle.

Mongodb /etc/mongod.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 processManagement:

   fork: true

net:

   bindIp: localhost

   port: 27017

storage:

   dbPath: /var/lib/mongo

systemLog:

   destination: file

   path: "/var/log/mongodb/mongod.log"

   logAppend: true

storage:

   journal:

      enabled: true



NACL vs Route Table vs SecurityGroup

 


Monday, August 2, 2021

How to mount AWS EFS Drive to Linux EC2 Instance

sudo su user1-

sudo yum install nfs-utils

mkdir -p /fileshare

chown user1:usergrp1 /fileshare

chmod ugo+rwx /fileshare

sudo vi /etc/fstab

--Get Info from Attach EFS from AWS [You need Network Access ]

fs-123456.efs.us-east-1.amazonaws.com:/ /fileshare nfs4 rw,intr,hard,_netdev,nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport

sudo mount -a

sudo reboot now


EFS is regional 


Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass