Help us understand the problem. What is going on with this article?

AWS(EC2)に関する自分用メモ

More than 1 year has passed since last update.

AWSでEC2を使うにあたって、いつも調べてしまうこととかパターン化されてることとかトラブったこととかをまとめておこうと思う。
少し古い情報もあるかもしれないので随時アップデートしていく。

EC2起動後に日本時間の設定

sudo vim /etc/sysconfig/clock

 ZONE="Japan"
 UTC=true

sudo ln -sf /usr/share/zoneinfo/Japan /etc/localtime

EC2起動後にLAMP環境の構築

公式にチュートリアルがある。

Amazon Linux AMI を使用して LAMP ウェブサーバーをインストールする

apacheとtomcatの連携(Java環境構築用)

sudo vim /etc/httpd/conf.d/proxy-ajp.conf

 ProxyPass / ajp://localhost:8009/

sudo yum -y install java-1.8.0-openjdk-devel
sudo alternatives --config java
sudo yum -y install tomcat8
sudo yum -y install tomcat8-webapps tomcat9-admin-webapps
sudo vim /usr/share/tomcat8/conf/server.xml

 <!--
  <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
 -->

sudo service httpd start
sudo service tomcat start

EC2にアクセスできないときのチェックポイント

  • セキュリティグループの確認(いわずもがな)
  • ロードバランサーを経由している場合、リスナーの設定を確認(見落としがち)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away