วันพฤหัสบดีที่ 23 เมษายน พ.ศ. 2563

Linux_squid

apt-get update && apt-get install squid

vi  /etc/squid/squid.conf
http_port 3128
http_port 0.0.0.0:8080 intercept
http_access allow all
acl localnet src 10.0.0.0/8  # RFC 1918 possible internal network

systemctl restart squid
systemctl enable squid

tail -f /var/log/squid/access.log
tail -f /var/log/squid/cache.log

Linux_Ubuntu 18

::Get Version
cat /etc/lsb-release


::Patch
 apt update && apt upgrade -y

::Region
unlink /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
timedatectl


::Interface
ip l show
vi /etc/netplan/00-installer-config.yaml
netplan apply

::Hostname
vi /etc/hostname


::Fix VMWare
 1.shutdown guest
 2.Right Click select edit settings
 3.select "Options" Tab
 4.select "General" and "Configuration Parameters"
 5.select "Add Row"
 6.Add disk.EnableUUID = TRUE
 7.Click OK and Save


::ADD-User #normal
sudo useradd -s /bin/bash -d /home/web_adm/ -m web_adm
sudo passwd web_adm

::Add-User #admin
sudo useradd -s /bin/bash -d /home/web_adm/ -m -G sudo web_adm
sudo passwd web_adm




:: PROXY - Disable
vi /etc/apt/apt.conf.d/proxy.conf

Acquire::http::Proxy "http://10.61.10.123:80";
To
Acquire::http::Proxy "false";


::Add-Host
sudo vi /etc/host
10.90.8.28 ad.shera.com ad
10.90.8.40 webapp.shera.com webapp
10.90.8.41 webappdb.shera.com webappdb


************************************ IPv6
vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.ens32.disable_ipv6 = 1
net.ipv6.conf.ens34.disable_ipv6 = 1

sysctl -p
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

vi /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

update-grub
systemctl reboot



************************************Netwok11
network:
  ethernets:
    ens32:
      addresses:
      - 10.61.10.77/24
      gateway4: 10.61.10.254
      nameservers:
        addresses:
        - 8.8.8.8
        search:
        - shera.com
  version: 2



************************************Network22 IP a


vi /etc/netplan/01-netcfg.yaml
vi /etc/netplan/50-netcfg.yaml


network:
  version: 2
  renderer: networkd
  ethernets:
    ens32:
      dhcp4: no
      optional: true
      addresses: [10.61.10.66/24]
      routes:
      - to: 10.61.10.0/24
        via: 10.61.10.254
      - to: 10.61.11.0/24
        via: 10.61.10.254
      - to: 10.61.12.0/23
        via: 10.61.10.254
      - to: 10.61.90.0/24
        via: 10.61.10.254
    ens34:
      dhcp4: true
      optional: true
      addresses: []




-------------------------------------
::ClockPit-install
sudo systemctl disable network-manager.service
sudo systemctl stop network-manager.service
sudo reboot

::ClockPit-Uninstall
sudo systemctl stop cockpit.socket
sudo systemctl disable cockpit.socket
sudo apt-get autoremove cockpit --purge

วันศุกร์ที่ 10 เมษายน พ.ศ. 2563

Linux_Docker

1.# Enable hyper-v
:: Bios & Windows

c:\bcdedit /set hypervisorlaunchtype auto

2.# Download and install Docker




1.Docker Installation on Ubuntu

sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

sudo docker -v
sudo docker run hello-world

sudo systemctl enable docker
sudo systemctl start docker


2.Portainer Installation

# docker volume create portainer_data
# docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer




3.Docker Endpoint (Remote API)

#sudo vi /lib/systemd/system/docker.service

#ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:4243 -H 
#unix:///var/run/docker.sock
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:4243 --containerd=/run/containerd/containerd.sock

sudo systemctl daemon-reload
sudo systemctl restart docker


sudo curl http://localhost:4243/version


4.Docker basic command
# docker ps
# docker ps -a
# docker stop rabbitmq && docker rm -f rabbitmq


#Install tomcat


วันศุกร์ที่ 3 เมษายน พ.ศ. 2563

Outlook 2010-Manual

Windows Credential Manager error 

Error code: 0x80090345



Regedit

HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb

DWORD value, named ProtectionPolicy, and give it a value 1.


1.




2.


3.

4.

5.

6.