Search This Blog

Showing posts with label Amazon EC2. Show all posts
Showing posts with label Amazon EC2. Show all posts

Tuesday, October 29, 2019

Amzaon Linux syslog error: CRIT amazon-ssm-agent: caused by: EC2MetadataError: failed to make EC2Metadata request

Recently got this error from syslog: CRIT amazon-ssm-agent: caused by: EC2MetadataError: failed to make EC2Metadata request It is a EC2 Instance not management by amazon-ssm.

AWS Systems Manager Agent (SSM Agent) is Amazon software that can be installed and configured on an Amazon EC2 instance, an on-premises server, or a virtual machine (VM). SSM Agent makes it possible for Systems Manager to update, manage, and configure these resources. The agent processes requests from the Systems Manager service in the AWS Cloud, and then runs them as specified in the request.

It is safe to drop the package amazon-ssm-agent.

First check and stop the status:
# systemctl status amazon-ssm-agent.service
● amazon-ssm-agent.service - amazon-ssm-agent
   Loaded: loaded (/usr/lib/systemd/system/amazon-ssm-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-10-28 17:04:27 EDT; 1 day 3h ago
 Main PID: 3285 (amazon-ssm-agen)
   CGroup: /system.slice/amazon-ssm-agent.service
           └─3285 /usr/bin/amazon-ssm-agent

Oct 28 23:39:27 local amazon-ssm-agent[3285]: ...

# systemctl stop amazon-ssm-agent.service
Drop the package:
# yum erase amazon-ssm-agent
Loaded plugins: etckeeper, extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package amazon-ssm-agent.x86_64 0:2.3.662.0-1.amzn2 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================
 Package                              Arch                       Version                                  Repository                       Size
================================================================================================================================================
Removing:
 amazon-ssm-agent                     x86_64                     2.3.662.0-1.amzn2                        @amzn2-core                      61 M

Transaction Summary
================================================================================================================================================
Remove  1 Package

Installed size: 61 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
etckeeper: pre transaction commit
  Erasing    : amazon-ssm-agent-2.3.662.0-1.amzn2.x86_64                                                                                    1/1
etckeeper: post transaction commit
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 597 bytes | 597.00 KiB/s, done.
Total 6 (delta 5), reused 0 (delta 0)
  Verifying  : amazon-ssm-agent-2.3.662.0-1.amzn2.x86_64                                                                                    1/1

Removed:
  amazon-ssm-agent.x86_64 0:2.3.662.0-1.amzn2

Complete!

Saturday, March 23, 2019

CREATE A LEMP STACK IN AWS EC2 by Amazon Linux 2 (LINUX, NGINX, MARIADB AND PHP 7.2)

Launch Instance: latest Amazon Linux 2 AMI



# Update Linux and install essential packages
sudo yum -y update

# Install php72 using amazon-linux-extras
sudo amazon-linux-extras install php7.2

# Install Nginx 1.12 using amazon-linux-extras
sudo amazon-linux-extras install nginx1.12

# Install mariadb using amazon-linux-extras
sudo amazon-linux-extras install lamp-mariadb10.2-php7.2
## this will install apache/httpd as well, which we don't need.
### uninstall httpd
sudo yum earse httpd httpd-tools
# install mariadb-server should be version 10.2 or higher
sudo yum install mariadb-server
To enable nginx, php-fpm and mardb services on boot:
sudo systemctl enable nginx
sudo systemctl enable php-fpm
sudo systemctl enable mariadb
To start all 3 service:
sudo systemctl start php-fpm
sudo systemctl start nginx
sudo systemctl start mariadb
sudo mysql_secure_installation

Friday, October 12, 2018

Install abiword on Amazon Linux 2

In Amazon Linux 2, there is no full version of Abiword. But abiword library and convert tools are available, if you can live with it.
libabw.x86_64 : A library for import of AbiWord files
libabw-tools.x86_64 : Tools to transform AbiWord files into other formats
However my client running a python/django website using webodt package to convert word documents to html and txt.
The [libabw-tools] package has 2 tools for this kind of work.
/usr/bin/abw2html
/usr/bin/abw2text

But I won't rewrite the code. I install abiword 3.0.2 for EL7 from http://repo.iotti.biz/CentOS/.
rpm -Uvh http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
Have to update the repo files before update. /etc/yum.repos.d/lux.repo
[lux]
name=CentOS $releasever - $basearch - Lux
baseurl=http://repo.iotti.biz/CentOS/$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
Because the $releasever = 2 in Amazon Linux 2, just change it To 7 in the file.
[lux]
name=CentOS $releasever - $basearch - Lux
baseurl=http://repo.iotti.biz/CentOS/7
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
Same /etc/yum.repos.d/frank.repo
[frank]
name=CentOS $releasever - $basearch - Frank
baseurl=http://repo.iotti.biz/Frank/$releasever
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
# Frank should be manually enabled
enabled=0
# Frank packages should be explicitly included with includepkgs
exclude=*
To:
[frank]
name=CentOS $releasever - $basearch - Frank
baseurl=http://repo.iotti.biz/Frank/7
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
# Frank should be manually enabled
enabled=0
# Frank packages should be explicitly included with includepkgs
exclude=*
Then you can update and install via yum:
yum update
yum install abiword
Dependencies Resolved

=======================================================================================================================================================================
 Package                                         Arch                         Version                                           Repository                        Size
=======================================================================================================================================================================
Installing:
 abiword                                         x86_64                       1:3.0.2-3.el7.lux                                 lux                              1.3 M
Installing for dependencies:
 adwaita-cursor-theme                            noarch                       3.26.0-1.amzn2                                    amzn2-core                       641 k
 adwaita-icon-theme                              noarch                       3.26.0-1.amzn2                                    amzn2-core                        12 M
 aiksaurus                                       x86_64                       1:1.2.1-34.el7.lux                                lux                              324 k
 at-spi2-atk                                     x86_64                       2.22.0-2.amzn2.0.2                                amzn2-core                        81 k
 at-spi2-core                                    x86_64                       2.22.0-1.amzn2.0.2                                amzn2-core                       159 k
 atk                                             x86_64                       2.22.0-3.amzn2.0.2                                amzn2-core                       258 k
 avahi-libs                                      x86_64                       0.6.31-19.amzn2                                   amzn2-core                        62 k
 cairo                                           x86_64                       1.14.8-2.amzn2.0.2                                amzn2-core                       718 k
 cairo-gobject                                   x86_64                       1.14.8-2.amzn2.0.2                                amzn2-core                        25 k
 colord-libs                                     x86_64                       1.3.4-1.amzn2.0.2                                 amzn2-core                       186 k
 cups-libs                                       x86_64                       1:1.6.3-35.amzn2                                  amzn2-core                       360 k
 dbus-glib                                       x86_64                       0.100-7.2.amzn2                                   amzn2-core                       103 k
 dconf                                           x86_64                       0.26.0-2.amzn2.0.2                                amzn2-core                       106 k
 desktop-file-utils                              x86_64                       0.23-1.amzn2.0.2                                  amzn2-core                        68 k
 enchant                                         x86_64                       1:1.6.0-8.amzn2.0.2                               amzn2-core                        55 k
 fontconfig                                      x86_64                       2.10.95-11.amzn2.0.2                              amzn2-core                       231 k
 fontpackages-filesystem                         noarch                       1.44-8.amzn2                                      amzn2-core                        10 k
 fribidi                                         x86_64                       0.19.4-6.amzn2.0.2                                amzn2-core                        63 k
 gdk-pixbuf2                                     x86_64                       2.36.5-1.amzn2.0.2                                amzn2-core                       567 k
 glib-networking                                 x86_64                       2.50.0-1.amzn2.0.2                                amzn2-core                       132 k
 gnutls                                          x86_64                       3.3.26-9.amzn2.0.2                                amzn2-core                       670 k
 graphite2                                       x86_64                       1.3.10-1.amzn2.0.2                                amzn2-core                       115 k
 gsettings-desktop-schemas                       x86_64                       3.24.1-2.amzn2                                    amzn2-core                       586 k
 gtk-update-icon-cache                           x86_64                       3.22.26-4.amzn2                                   amzn2-core                        27 k
 gtk2                                            x86_64                       2.24.31-1.amzn2.0.2                               amzn2-core                       3.4 M
 gtk3                                            x86_64                       3.22.26-4.amzn2                                   amzn2-core                       4.4 M
 gtkmathview                                     x86_64                       0.8.0-16.el7.lux                                  lux                              628 k
 harfbuzz                                        x86_64                       1.3.2-1.amzn2.0.2                                 amzn2-core                       181 k
 hicolor-icon-theme                              noarch                       0.12-7.amzn2                                      amzn2-core                        43 k
 jasper-libs                                     x86_64                       1.900.1-31.amzn2.0.2                              amzn2-core                       149 k
 json-glib                                       x86_64                       1.2.6-1.amzn2.0.2                                 amzn2-core                       134 k
 lcms2                                           x86_64                       2.6-3.amzn2.0.2                                   amzn2-core                       152 k
 libX11                                          x86_64                       1.6.5-1.amzn2.0.2                                 amzn2-core                       614 k
 libX11-common                                   noarch                       1.6.5-1.amzn2.0.2                                 amzn2-core                       164 k
 libXau                                          x86_64                       1.0.8-2.1.amzn2.0.2                               amzn2-core                        29 k
 libXcomposite                                   x86_64                       0.4.4-4.1.amzn2.0.2                               amzn2-core                        22 k
 libXcursor                                      x86_64                       1.1.14-8.amzn2.0.2                                amzn2-core                        30 k
 libXdamage                                      x86_64                       1.1.4-4.1.amzn2.0.2                               amzn2-core                        20 k
 libXext                                         x86_64                       1.3.3-3.amzn2.0.2                                 amzn2-core                        39 k
 libXfixes                                       x86_64                       5.0.3-1.amzn2.0.2                                 amzn2-core                        18 k
 libXfont                                        x86_64                       1.5.2-1.amzn2.0.2                                 amzn2-core                       152 k
 libXft                                          x86_64                       2.3.2-2.amzn2.0.2                                 amzn2-core                        60 k
 libXi                                           x86_64                       1.7.9-1.amzn2.0.2                                 amzn2-core                        41 k
 libXinerama                                     x86_64                       1.1.3-2.1.amzn2.0.2                               amzn2-core                        14 k
 libXrandr                                       x86_64                       1.5.1-2.amzn2.0.2                                 amzn2-core                        27 k
 libXrender                                      x86_64                       0.9.10-1.amzn2.0.2                                amzn2-core                        26 k
 libXtst                                         x86_64                       1.2.3-1.amzn2.0.2                                 amzn2-core                        20 k
 libXxf86vm                                      x86_64                       1.1.4-1.amzn2.0.2                                 amzn2-core                        17 k
 libabiword                                      x86_64                       1:3.0.2-3.el7.lux                                 lux                              5.2 M
 libasyncns                                      x86_64                       0.8-7.amzn2.0.2                                   amzn2-core                        26 k
 libepoxy                                        x86_64                       1.3.1-2.amzn2                                     amzn2-core                       198 k
 libfontenc                                      x86_64                       1.1.3-3.amzn2.0.2                                 amzn2-core                        31 k
 libglvnd                                        x86_64                       1:1.0.0-1.amzn2.0.2                               amzn2-core                        89 k
 libglvnd-egl                                    x86_64                       1:1.0.0-1.amzn2.0.2                               amzn2-core                        43 k
 libglvnd-glx                                    x86_64                       1:1.0.0-1.amzn2.0.2                               amzn2-core                       124 k
 libgsf                                          x86_64                       1.14.26-7.amzn2.0.2                               amzn2-core                       165 k
 libgusb                                         x86_64                       0.2.9-1.amzn2.0.2                                 amzn2-core                        40 k
 libical                                         x86_64                       1.0.1-1.amzn2.0.2                                 amzn2-core                       175 k
 libmodman                                       x86_64                       2.0.1-8.amzn2.0.2                                 amzn2-core                        29 k
 libpng                                          x86_64                       2:1.5.13-7.amzn2.0.2                              amzn2-core                       214 k
 libproxy                                        x86_64                       0.4.11-10.amzn2.0.3                               amzn2-core                        61 k
 librsvg2                                        x86_64                       2.40.16-1.amzn2.0.2                               amzn2-core                       129 k
 libsoup                                         x86_64                       2.56.0-6.amzn2                                    amzn2-core                       401 k
 libthai                                         x86_64                       0.1.14-9.amzn2.0.2                                amzn2-core                       187 k
 libusbx                                         x86_64                       1.0.21-1.amzn2                                    amzn2-core                        62 k
 libwayland-client                               x86_64                       1.14.0-2.amzn2.0.1                                amzn2-core                        32 k
 libwayland-cursor                               x86_64                       1.14.0-2.amzn2.0.1                                amzn2-core                        20 k
 libwayland-server                               x86_64                       1.14.0-2.amzn2.0.1                                amzn2-core                        38 k
 libwmf                                          x86_64                       0.2.8.4-41.amzn2.0.2                              amzn2-core                       136 k
 libwmf-lite                                     x86_64                       0.2.8.4-41.amzn2.0.2                              amzn2-core                        68 k
 libxcb                                          x86_64                       1.12-1.amzn2.0.2                                  amzn2-core                       216 k
 libxkbcommon                                    x86_64                       0.7.1-1.amzn2.0.2                                 amzn2-core                       109 k
 libxshmfence                                    x86_64                       1.2-1.amzn2.0.2                                   amzn2-core                       7.2 k
 link-grammar                                    x86_64                       5.3.14-1.el7.lux                                  lux                              2.1 M
 loudmouth                                       x86_64                       1.5.3-1.el7.lux                                   lux                               71 k
 lyx-fonts                                       noarch                       2.2.3-1.el7                                       epel                             159 k
 mesa-libEGL                                     x86_64                       17.2.3-8.20171019.amzn2.0.4                       amzn2-core                       100 k
 mesa-libGL                                      x86_64                       17.2.3-8.20171019.amzn2.0.4                       amzn2-core                       159 k
 mesa-libgbm                                     x86_64                       17.2.3-8.20171019.amzn2.0.4                       amzn2-core                        37 k
 mesa-libglapi                                   x86_64                       17.2.3-8.20171019.amzn2.0.4                       amzn2-core                        43 k
 mesa-libwayland-egl                             x86_64                       17.2.3-8.20171019.amzn2.0.4                       amzn2-core                        18 k
 minisat2-libs                                   x86_64                       2.2.1-1.el7.lux                                   lux                               43 k
 nettle                                          x86_64                       2.7.1-8.amzn2.0.2                                 amzn2-core                       329 k
 ots-libs                                        x86_64                       0.5.0-12.el7.lux                                  lux                               46 k
 pango                                           x86_64                       1.40.4-1.amzn2.0.2                                amzn2-core                       276 k
 pangox-compat                                   x86_64                       0.0.2-2.el7                                       epel                              56 k
 pixman                                          x86_64                       0.34.0-1.amzn2.0.2                                amzn2-core                       254 k
 rest                                            x86_64                       0.8.0-2.amzn2                                     amzn2-core                        63 k
 t1lib                                           x86_64                       5.1.2-14.amzn2.0.2                                amzn2-core                       168 k
 telepathy-glib                                  x86_64                       0.24.0-1.amzn2.0.2                                amzn2-core                       725 k
 trousers                                        x86_64                       0.3.14-2.amzn2.0.2                                amzn2-core                       294 k
 urw-fonts                                       noarch                       2.4-16.amzn2                                      amzn2-core                       3.0 M
 wv                                              x86_64                       1.2.9-10.el7.lux                                  lux                              259 k
 xkeyboard-config                                noarch                       2.20-1.amzn2                                      amzn2-core                       799 k
 xorg-x11-font-utils                             x86_64                       1:7.5-20.amzn2.0.2                                amzn2-core                        87 k

Transaction Summary
=======================================================================================================================================================================
Install  1 Package (+95 Dependent packages)

Total download size: 46 M
Installed size: 147 M
Have a nice worm day!

Friday, September 28, 2018

Install Postgresql 9.6 on Amazon Linux 2 by Amazon Linux Extras

Yes you can install the latest Postgresql via https://www.postgresql.org/download/linux/redhat/.

But it suppose to work on Cent OS 7 or RHEL 7.
Ammazon Linux 2 have more "Fresher" package, including the Kernel.

From Amazon Linux 2, it added Amazon Linux Extras

Extras is a mechanism in Amazon Linux 2 to enable the consumption of new versions of application software on a stable operating system that is supported until June 30, 2023.
Extras include Ansible 2.4.2, memcached 1.5, nginx 1.12, Postgresql 9.6, MariaDB 10.2, Go 1.9, Redis 4.0, R 3.4, Rust 1.22.1.

I think it is better using Extras from Amazon Linux Team. Here is how:
  1. Check the AMI version:
  2. # uname -a
    Linux ip-10-10-10-10.tal-ent.local 4.14.70-72.55.amzn2.x86_64 #1 SMP Wed Sep 19 19:09:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    # cat /etc/system-release
    Amazon Linux 2
    # cat /etc/image-id
    image_name="amzn2-ami-hvm"
    image_version="2"
    image_arch="x86_64"
    image_file="amzn2-ami-hvm-2.0.20180810-x86_64.xfs.gpt"
    image_stamp="8008-2abd"
    image_date="20180811020321"
    recipe_name="amzn2 ami"
    recipe_id="c652686a-2415-9819-65fb-4dee-9792-289d-1e2846bd"
    
  3. Check available package in Extras:
  4. # amazon-linux-extras
      0  ansible2                 available    [ =2.4.2  =2.4.6 ]
      1  emacs                    available    [ =25.3 ]
      2  httpd_modules            available    [ =1.0 ]
      3  memcached1.5             available    [ =1.5.1 ]
      4  nginx1.12                available    [ =1.12.2 ]
      5  postgresql9.6            available    [ =9.6.6  =9.6.8 ]
      6  postgresql10             available    [ =10 ]
      8  redis4.0                 available    [ =4.0.5  =4.0.10 ]
      9  R3.4                     available    [ =3.4.3 ]
     10  rust1                    available    [ =1.22.1  =1.26.0  =1.26.1  =1.27.2 ]
     11  vim                      available    [ =8.0 ]
     12  golang1.9                available    [ =1.9.2 ]
     13  ruby2.4                  available    [ =2.4.2  =2.4.4 ]
     14  nano                     available    [ =2.9.1 ]
     15  php7.2                   available    [ =7.2.0  =7.2.4  =7.2.5  =7.2.8 ]
     16  lamp-mariadb10.2-php7.2  available    [ =10.2.10_7.2.0  =10.2.10_7.2.4  =10.2.10_7.2.5  =10.2.10_7.2.8 ]
     17  libreoffice              available    [ =5.0.6.2_15  =5.3.6.1 ]
     18  gimp                     available    [ =2.8.22 ]
     19  docker=latest            enabled      [ =17.12.1  =18.03.1  =18.06.1 ]
     20  mate-desktop1.x          available    [ =1.19.0  =1.20.0 ]
     21  GraphicsMagick1.3        available    [ =1.3.29 ]
     22  tomcat8.5                available    [ =8.5.31  =8.5.32 ]
     23  epel                     available    [ =7.11 ]
    
  5. Install postgresql 9.6
  6. # amazon-linux-extras install postgresql9.6
    Installing postgresql
    Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
    amzn2-core                                                                                                                                      | 2.4 kB  00:00:00     
    amzn2extra-docker                                                                                                                               | 1.3 kB  00:00:00     
    amzn2extra-epel                                                                                                                                 | 1.3 kB  00:00:00     
    amzn2extra-postgresql9.6                                                                                                                        | 1.3 kB  00:00:00     
    amzn2extra-postgresql9.6/2/x86_64/primary_db                                                                                                    |  23 kB  00:00:00     
    152 packages excluded due to repository priority protections
    Resolving Dependencies
    --> Running transaction check
    ---> Package postgresql.x86_64 0:9.6.8-1.amzn2.0.1 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 9.6.8-1.amzn2.0.1 for package: postgresql-9.6.8-1.amzn2.0.1.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-9.6.8-1.amzn2.0.1.x86_64
    --> Running transaction check
    ---> Package postgresql-libs.x86_64 0:9.6.8-1.amzn2.0.1 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =======================================================================================================================================================================
     Package                                Arch                          Version                                    Repository                                       Size
    =======================================================================================================================================================================
    Installing:
     postgresql                             x86_64                        9.6.8-1.amzn2.0.1                          amzn2extra-postgresql9.6                        1.3 M
    Installing for dependencies:
     postgresql-libs                        x86_64                        9.6.8-1.amzn2.0.1                          amzn2extra-postgresql9.6                        253 k
    
    Transaction Summary
    =======================================================================================================================================================================
    Install  1 Package (+1 Dependent package)
    
    Total download size: 1.6 M
    Installed size: 5.3 M
    Is this ok [y/d/N]: y
    Downloading packages:
    (1/2): postgresql-libs-9.6.8-1.amzn2.0.1.x86_64.rpm                                                                                             | 253 kB  00:00:00     
    (2/2): postgresql-9.6.8-1.amzn2.0.1.x86_64.rpm                                                                                                  | 1.3 MB  00:00:00     
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                  7.2 MB/s | 1.6 MB  00:00:00     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : postgresql-libs-9.6.8-1.amzn2.0.1.x86_64                                                                                                            1/2 
      Installing : postgresql-9.6.8-1.amzn2.0.1.x86_64                                                                                                                 2/2 
      Verifying  : postgresql-libs-9.6.8-1.amzn2.0.1.x86_64                                                                                                            1/2 
      Verifying  : postgresql-9.6.8-1.amzn2.0.1.x86_64                                                                                                                 2/2 
    
    Installed:
      postgresql.x86_64 0:9.6.8-1.amzn2.0.1                                                                                                                                
    
    Dependency Installed:
      postgresql-libs.x86_64 0:9.6.8-1.amzn2.0.1                                                                                                                           
    
    Complete!
    
  7. It will output the summary after installation:
  8.   0  ansible2                 available    [ =2.4.2  =2.4.6 ]
      1  emacs                    available    [ =25.3 ]
      2  httpd_modules            available    [ =1.0 ]
      3  memcached1.5             available    [ =1.5.1 ]
      4  nginx1.12                available    [ =1.12.2 ]
      5  postgresql9.6=latest     enabled      [ =9.6.6  =9.6.8 ]
      6  postgresql10             available    [ =10 ]
      8  redis4.0                 available    [ =4.0.5  =4.0.10 ]
      9  R3.4                     available    [ =3.4.3 ]
     10  rust1                    available    [ =1.22.1  =1.26.0  =1.26.1  =1.27.2 ]
     11  vim                      available    [ =8.0 ]
     12  golang1.9                available    [ =1.9.2 ]
     13  ruby2.4                  available    [ =2.4.2  =2.4.4 ]
     14  nano                     available    [ =2.9.1 ]
     15  php7.2                   available    [ =7.2.0  =7.2.4  =7.2.5  =7.2.8 ]
     16  lamp-mariadb10.2-php7.2  available    [ =10.2.10_7.2.0  =10.2.10_7.2.4  =10.2.10_7.2.5  =10.2.10_7.2.8 ]
     17  libreoffice              available    [ =5.0.6.2_15  =5.3.6.1 ]
     18  gimp                     available    [ =2.8.22 ]
     19  docker=latest            enabled      [ =17.12.1  =18.03.1  =18.06.1 ]
     20  mate-desktop1.x          available    [ =1.19.0  =1.20.0 ]
     21  GraphicsMagick1.3        available    [ =1.3.29 ]
     22  tomcat8.5                available    [ =8.5.31  =8.5.32 ]
     23  epel=latest              enabled      [ =7.11 ]
    
  9. Install the postgresql service package
  10. # sudo yum update
    # sudo yum install postgresql-server.x86_64
    
    # sudo systemctl list-unit-files | grep postgresql
    postgresql.service                            disabled
    postgresql@.service                           disabled
    
    # sudo systemctl enable postgresql.service
    
  11. Inital postgresql database, Create postgres data dir.
  12. # sudo /usr/bin/postgresql-setup --initdb
    # sudo systemctl start postgresql
    
  13. Now you can login and check the Databases.
  14. # sudo -u postgres -- psql
    postgres=> \l
                                      List of databases
       Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
    -----------+----------+----------+-------------+-------------+-----------------------
     postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
     template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
     template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
    (3 rows)
    
  15. My connection config file: /var/lib/pgsql/data/pg_hba.conf
  16. # PostgreSQL Client Authentication Configuration File
    # ===================================================
    #
    # TYPE  DATABASE        USER            ADDRESS                 METHOD
    
    # "local" is for Unix domain socket connections only
    local   all             all                                     md5
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5
    # IPv6 local connections:
    host    all             all             ::1/128                 md5
    
It's easy, clean and safer for me.

Thursday, April 7, 2011

Amazon EC2

Try Amazon EC2 free for one year.

http://aws.amazon.com/free/

AWS Free Usage Tier (Per Month):
750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) ֠enough hours to run continuously each month*
750 hours of an Elastic Load Balancer plus 15 GB data processing*
10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests*
5 GB of Amazon S3 standard storage, 20,000 Get Requests, and 2,000 Put Requests*
30 GB per of internet data transfer (15 GB of data transfer ԩnԠand 15 GB of data transfer ԯutԠacross all services except Amazon CloudFront)*
25 Amazon SimpleDB Machine Hours and 1 GB of Storage**
100,000 Requests of Amazon Simple Queue Service**
100,000 Requests, 100,000 HTTP notifications and 1,000 email notifications for Amazon Simple Notification Service**
10 Amazon Cloudwatch alarms**
In addition to these services, the AWS Management Console is available at no charge to help you build and manage your application on AWS.


Amazon Elastic Compute Cloud (EC2) Documentation
http://aws.amazon.com/documentation/ec2/

Basic 64-bit Amazon Linux AMI