cpanm Net::Amazon::S3@0.86

[vagrant@localhost ~]$ cpan App::cpanminus
[vagrant@localhost ~]$ sudo yum install -y openssl openssl-devel
パッケージ openssl-1.0.1e-57.el6.x86_64 はインストール済みか最新バージョンです
パッケージ openssl-devel-1.0.1e-57.el6.x86_64 はインストール済みか最新バージョンです

[vagrant@localhost ~]$ cpanm LWP::Protocol::https
-bash: cpanm: コマンドが見つかりません
[vagrant@localhost ~]$ /usr/local/bin/cpanm LWP::Protocol::https
-bash: /usr/local/bin/cpanm: そのようなファイルやディレクトリはありません

Log collection

First of all, middleware for log collection can be divided into Push type and Pull type according to the data acquisition method.

Systems that transfer logs to a destination for which middleware is configured are classified as Push. Famously speaking, Apache Flume, Fluent, Scribe, Logstash etc are classified as Push type.

On the other hand, it is Pull type that the client side explicitly specifies and acquires necessary data for middleware that centrally manages logs. Apache Kafka and so-called PubSub models such as Google Cloud Pub/Sub and Kinesis Stream, which are not middleware, are classified as Pull types.


Source => Push type middleware that receives records. Corresponds to input in Fluentd.
Channel => An area to save until transmission of a record is completed in Push type middleware. Equivalent to buffer in Fluentd.
Sink => Push destination of record in Push type middleware. Equivalent to output in Fluentd.
Upstream => The side that sends the record.
Downstream => The side that receives the record.

AWS direct connect

AWS direct connect is a cloud service solution that simplifies building a dedicated network connection from premises to AWS. You can use AWS Direct Connect to establish a private connection between AWS and your data center, office, or colocation environment. This often reduced the cost of the network, improved bandwidth throughput, and provided customers with a more consistent network experience than Internet-based connections.

AWS direct connect allows you to establish a dedicated network connection between your network and one of the AWS Direct Connect locations. You can divide this delicated connection into multiple virtual interfaces using the industry standard 802.1q VLAN. In this way, public resources can be accessed using the same connection, using public IP address space, and private resources (for example, within Amazon Virtual Private Cloud).The Amazon EC2 instance running on can be accessed using private IP space, so you can separate the network between public and private environment. Virtual interfaces can be configured at any time as your needs change.

VPC NAT gateway

You can use Network Address Translation(NAT) gateways to allow instances from your private subnet to connect to the Internet and other AWS services, but not from the Internet to initiate connections with these instances.

It is “public subnet” that is set so that 0.0.0.0/0 (communication to the default gateway) flows to the internet gateway in Route tables is “private subnet”.

Since 0.0.0.0/0 flows to igw-xxxxxx (Internet gateway), subnet for which this route table is set is a public subnet.

Typical port numbers and protocols

– TCP 20: FTP
– TCP 21: FTP
– TCP 22: SSH
– TCP 23: Telnet
– TCP 25: SMTP
– UDP 53: DNS
– UDP 67: DHCP(server)
– UDP 68: DHCP(client)
– TCP 80: HTTP
– TCP 110: POP3
– UDP 123: NTP
– TCP 443: HTTPS
– WELL KNOWN PORT NUMBER 0-1023

When connecting to MySQL from the command line, you can specify the port number to connect to.
Use the -P option to specify a port number.
When port number specification is omitted (connected to default port number 3306)
[vagrant@localhost ~]$ mysql -u root -p
Enter password:

When specifying port number explicitly

[vagrant@localhost ~]$ mysql -u root -p -P 3306
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.6.44 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> Ctrl-C — exit!
Aborted

AWS firewall manager

AWS Firewall Manager is a security management service that makes it easy to configure and manage AWS WAF rules centrally across multiple customers’ accounts and applications. With the Firewall Manager, you can easily roll out the AWS WAF rules for the Application Load Balancer and Amazon CloudFront distributions across many AWS Organizations accounts. In addition, every time a new application is created, Firewall Manager makes it easy for new applications and resources to meet compliance with common security rules from day one. Now that you have a consistent set of firewall rules across the Application Load Balancer and Amazon CloudFront infrastructure, hierarchically build firewall rules, create security policies, and get single service to apply them.


1. Name web ACL
2. Create condition
– IP match condition
– String match condition, bad bot user agent
– SQL injection match condition, sqli checks
3. Create rules
4. Review and create

HA(high availability)

HA refers to high availability, and to minimize the frequency and time that functions and services provided by the system are stopped or interrupted. Also, a system (HA) or a system configuration(HA configuration) in which such measures are taken may be simply referred to as HA.
In a narrow sense, multiple computers are bundled and operated in an integrated manner, and clustering technology that makes them behave as if they are one computer prevents the whole from stopping even if one stops. It refers to the state(HA cluster).

In a broad sense, it includes all techniques such as redundancy and multiplexing (duplexing) of equipment and systems, data replication and automatic switching, and a hot standby configuration and cold standby configuration in which two systems of the same system are prepared in some cases, HA may be promoted using database replication and the like (and their combination).

RGL

RGL is a package in which functions for performing three-dimensional plotting are condensed. Three-dimensional plots can be created, and the plotted figures can be moved with the mouse, and enlargement / reduction can be performed.

Here is an example of the instructions from installing the package to displaying example. After plotting, you can rotate the figure by moving the mouse while holding the figure with the left click, or zoom in and out of the figure by turning the mouse wheel.

install.packages("rgl")
library(rgl)
open3d()
example(rgl.surface)
for(i in 1:360) rgl.viewpoint(i, 1/4)

Holacracy

The term “holacracy” refers to social technology or organizational governance management to maintain a self-propelled organization by distributing authority and making decisions throughout the organization rather than making decisions through traditional top-down hierarchies. It is defined as the method.

LWP::Protocol::https

my $url = "https://xxx.yyy.jp";
my $request = HTTP::Request->new(GET => $url);
my $ua = LWP::UserAgent->new;
my $res = $ua->request($request);
my $resutl = $res->content;

There is no problem with HTTP pages, but it fails with HTTPS.

cpan istall LWP::Protocol::https
Cpanm Crypt::SSLeay