【Linux】 Linux初心者がawsのEC2インスタンス起動後に使ったコマンドを記録
公開日:
:
最終更新日:2013/08/29
Linux
環境:RHEL6.4 on AWS EC2
#ルート権限でルートユーザーにスイッチ sudo su - #rootにパスワードを設定 passwd #タイムゾーンを設定 cp -i /usr/share/zoneinfo/Japan /etc/localtime #インストール済みパッケージを確認 yum -y install パッケージ名 #-y : 確認は常にyesとして処理 yum list installed #パッケージをインストール yum -y install mysql-server yum -y install postgresql-server yum -y install php php-pear php-mysql php-mbstring php-gd php-mcrypt php-pecl-apc #デーモンの状態をチェック service httpd status #デーモンをスタート service httpd start #プロセスを確認 # a : 全てのユーザー # x : デーモン以外のプロセスを含む # |grep httpd : 文字列「httpd」を含む行だけ ps ax |grep httpd #起動スクリプトがあるか確認 ls /etc/rc.d/init.d/ #ユーザーのパスワードとグループを確認 cat /etc/passwd cat /etc/group #ec2-userで/var/www/httpディレクトリ配下を操作出来るようにする #apacheグループにec2-userユーザーを追加 #-G : セカンダリグループに追加 #-g : プライマリグループに追加 usermod -G apache ec2-user #オーナーを変更 # -R : 配下のディレクトリに再帰的に適用 chown -R apache:apache /var/www #パーミッションを変更 # -R : 配下のディレクトリに再帰的に適用 chmod -R 775 /var/www #OS開始時にhttpdも開始 chkconfig httpd on #確認 chkconfig --list 前: httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off 後: httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off #ウェブからファイルをダウンロード wget http://www.hoge.com/nodejs.tar.gz #解凍 tar -xvf nodejs.tar.gz #ソースをコンパイル->インストール #ソースをダウンロードした場合解凍したディレクトリの中にconfigureファイルがある ./configure #コンパイル(?) make #インストール make install
関連記事
-
-
【Linux】ruby on rails のインストール
環境:RHEL6.4 on AWS EC2 【参考】 1.RVMインストール RVM[
-
-
【Linux】 cronが動かない!(悲)
awsのLinuxインスタンスを使用。 インストールされてない? # yum list in
- PREV
- 【aws】awsでサーバー運用 準備編
- NEXT
- 【Linux】 apache設定の基本