EC2 Amazon Linux
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
sudo fdisk -l
sudo resize2fs /dev/xvda1
sudo cp /usr/share/zoneinfo/Japan /etc/localtime
sudo service crond restart
useradd <username>
passwd <username>
sudo visudo
<username> ALL=(ALL) ALL
sudo su -<username>
cd /home/<username>
mkdir .ssh
cd .ssh
ssh-keygen -t rsa
cp id_rsa.pub authorized_keys
chmod 600 authorized_keys
cd ../
chmod 700 .ssh
cat id_rsa
-SSHd
sudo vi /etc/ssh/sshd_config
AuthorizedKeysFile .ssh/authorized_keys
sudo fdisk -l
sudo yum install xfsprogs
sudo mkdir /mnt/xvdb
sudo mkfs.xfs /dev/xvdb
sudo mkfs.ext4 /dev/xvdb
sudo mount /dev/xvdb /mnt/xvdb
vi /etc/fstab
/dev/xvdb /mnt/xvdb ext4 noatime 0 0
userdel -r ec2-user
passwd ec2-user
sudo su -
crontab -e
00 13 * * 1-5 /sbin/shutdown -h now
**SWAP [#p5904db2]
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
#1GB=1024 8GB=8192
sudo mkswap /swapfile
sudo swapon /swapfile
sudo vi /etc/fstab
#add
/swapfile none swap sw 0 0
TODO:
*epel for Amazon Linux [#u71cc80d]
*nkf on Amazon Linux [#v28866b2]
sudo wget http://mirror.centos.org/centos/6/os/x86_64/Pa...
sudo rpm -ivh nkf-2.0.8b-6.2.el6.x86_64.rpm
終了行:
#contents
sudo fdisk -l
sudo resize2fs /dev/xvda1
sudo cp /usr/share/zoneinfo/Japan /etc/localtime
sudo service crond restart
useradd <username>
passwd <username>
sudo visudo
<username> ALL=(ALL) ALL
sudo su -<username>
cd /home/<username>
mkdir .ssh
cd .ssh
ssh-keygen -t rsa
cp id_rsa.pub authorized_keys
chmod 600 authorized_keys
cd ../
chmod 700 .ssh
cat id_rsa
-SSHd
sudo vi /etc/ssh/sshd_config
AuthorizedKeysFile .ssh/authorized_keys
sudo fdisk -l
sudo yum install xfsprogs
sudo mkdir /mnt/xvdb
sudo mkfs.xfs /dev/xvdb
sudo mkfs.ext4 /dev/xvdb
sudo mount /dev/xvdb /mnt/xvdb
vi /etc/fstab
/dev/xvdb /mnt/xvdb ext4 noatime 0 0
userdel -r ec2-user
passwd ec2-user
sudo su -
crontab -e
00 13 * * 1-5 /sbin/shutdown -h now
**SWAP [#p5904db2]
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
#1GB=1024 8GB=8192
sudo mkswap /swapfile
sudo swapon /swapfile
sudo vi /etc/fstab
#add
/swapfile none swap sw 0 0
TODO:
*epel for Amazon Linux [#u71cc80d]
*nkf on Amazon Linux [#v28866b2]
sudo wget http://mirror.centos.org/centos/6/os/x86_64/Pa...
sudo rpm -ivh nkf-2.0.8b-6.2.el6.x86_64.rpm
ページ名: