AmazonLinux2 の基礎調査
これからLTS版が出て正式リリースとなるであろうAmazonLinux2の基礎調査を行う。
背景にはAmazonLinux2のLTS版が出た後2年で旧AmazonLinuxのサポートが切れる予定になっているらしいので。
ノーガードで殴り合う気があったり自前でメンテし続けるなら構わないが一般的には乗り換えるべきである。
インスタンス立ち上げて自分が気になる所(業務上使用する所)をざっと調べた。
ファイルシステムの変更
大きな影響はないかもしれないがEBSのファイルシステムが変更されている。
(抜粋)
$ df -Th Filesystem Type Size Used Avail Use% Mounted on ... /dev/xvda1 xfs 8.0G 1003M 7.1G 13% / ...
init.dの廃止、systemdの採用
一応init.dは使えるようだが、/etc/init.d/に下記READMEが置いてあった
You are looking for the traditional init scripts in /etc/rc.d/init.d, and they are gone? Here's an explanation on what's going on: You are running a systemd-based OS where traditional init scripts have been replaced by native systemd services files. Service files provide very similar functionality to init scripts. To make use of service files simply invoke "systemctl", which will output a list of all currently running services (and other units). Use "systemctl list-unit-files" to get a listing of all known unit files, including stopped, disabled and masked ones. Use "systemctl start foobar.service" and "systemctl stop foobar.service" to start or stop a service, respectively. For further details, please refer to systemctl(1). Note that traditional init scripts continue to function on a systemd system. An init script /etc/rc.d/init.d/foobar is implicitly mapped into a service unit foobar.service during system initialization. Thank you! Further reading: man:systemctl(1) man:systemd(1) http://0pointer.de/blog/projects/systemd-for-admins-3.html http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
非常に雑に訳すと「/etc/init.d/使えるけど使って良いのは小学生までだよねー」ということ(雑すぎる
必要がある物はsystemdに載せ替えたほうがよい。
openjdk
$ sudo yum search openjdk
(抜粋)
Loaded plugins: langpacks, update-motd =============================================================================== N/S matched: openjdk ================================================================================ java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment ... java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment ...
mysql
RDSへの接続用にmysqlのクライアントが必要だったがmariadbのパッケージに置き換わっていた。
... mysql-connector-java.noarch : Official JDBC driver for MySQL ... mariadb.x86_64 : A community developed branch of MySQL ...
$ mysql --version
mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
mysql_config_editor(5.6系以降のスクリプト)を使っている箇所があり、それは対応していない。
個別にmysql5.6系のパッケージインストールをするかmysql_config_editorを使わない方式に変更するかの判断が必要。 (AmazonLinuxではmysql56パッケージを使っていたハズ)
nginx
$ sudo yum info nginx
Loaded plugins: langpacks, update-motd Error: No matching Packages to list
varnish
$ sudo yum info varnish
Loaded plugins: langpacks, update-motd Error: No matching Packages to list
その他諸々
https://aws.amazon.com/jp/about-aws/whats-new/2017/12/introducing-amazon-linux-2/
newer tooling (gcc 7.2.1, glibc 2.25, binutils 2.27). Additional software packages, including the newer versions of popular software packages such as Python, MariaDB, Node.js, are available for installation using the Amazon Linux Extras repository.
ふむ。
$ python —version
Python 2.7.5
ふむ。
$ sudo yum info python3
Loaded plugins: langpacks, update-motd Error: No matching Packages to list
ふむ?
$ sudo yum info nodejs
Loaded plugins: langpacks, update-motd Error: No matching Packages to list
ふむ?
一応リポジトリ情報。coreリポジトリ以外に Extras repository が存在するかと思ったがそんなことはなさそう。
$ sudo yum repolist all
Loaded plugins: langpacks, update-motd repo id repo name status !amzn2-core/2017.12/x86_64 Amazon Linux 2 core repository enabled: 7,066 amzn2-core-debuginfo/2017.12/x86_64 Amazon Linux 2 core repository - debuginfo packages disabled amzn2-core-source/2017.12 Amazon Linux 2 core repository - source packages disabled repolist: 7,066
ついでに。
(抜粋)
... Name : php Arch : x86_64 Version : 5.4.16 Release : 43.amzn2 ...
ふむ?(php7系はなかった)
(抜粋)
... Name : ruby Arch : x86_64 Version : 2.0.0.648 Release : 29.amzn2 ...
ふむ?(rubyの安定版は2.4系だったかと…)
所感
FAQページにも記載がありますが、LTS版の正式リリースはまだなので今後大きく変わることが予想されます。
オンプレ版を試してみたい所。VirtualBoxなどのイメージが公開されている点よりもdocker hubにdockerイメージが登録されている方が注目度高いと思う。
Docker使いの皆様の記事楽しみにしてますね!