1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Amazon Linuxの初期設定

Last updated at Posted at 2016-12-27

Amazon Linuxの初期設定の備忘録

文字コード

/etc/sysconfig/i18n
の中を

LANG=ja_JP.UTF-8

に変更し、ログインしなおす

タイムゾーン

  • /usr/share/zoneinfo/Asia/Tokyo を /etc/localtime にリンク
cp /etc/localtime /etc/localtime.bak
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
  • /etc/sysconfig/clock を編集
ZONE="Asia/Tokyo"

vim設定

set number
set encoding=utf-8
set tabstop=4
set autoindent
set expandtab
set shiftwidth=4

SFTPの操作をログに残す

PHPをインストール


yum install php71.x86_64 php71-cli.x86_64 php71-common.x86_64 php71-json.x86_64 php71-mbstring.x86_64 php71-mysqlnd.x86_64 php71-pdo.x86_64 php71-process.x86_64 php71-xml.x86_64

Composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

設定

date.timezone = Asia/Tokyo
session.use_strict_mode = 1
session.gc_maxlifetime = 43200
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
expose_php = Off

MySQLをインストール

  • yumリポジトリをインストール

rpm -Uvh mysql57-community-release-el6-9.noarch.rpm

/etc/yum.repos.d/mysql-community.repo で、mysql57-community以外のenable=0

  • MySQLをインストール
yum install mysql-community-client mysql-community-common mysql-community-libs mysql-community-server
  • 設定
character_set_server=utf8mb4
wait_timeout=14400
interactive_timeout=14400
  • 初期パスワード
    /var/log/mysqld.log に書いてある

  • セキュリティ
    mysql_secure_installation

1
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?