tmp
Friday, December 25, 2015
CentOS7.1の初期設定メモ
##一般ユーザ作成 ```bash $ useradd USER $ passwd USER ``` `sudo` 権限を与える ```bash $ visudo USER ALL=(ALL) ALL ``` 以下、一般ユーザで作業 ##SSH設定 ###公開鍵登録 ####@remote ```bash $ cd ~; mkdir .ssh # 無ければ ``` ####@local ```bash $ ssh-keygen # 無ければ $ scp ~/.ssh/id_rsa.pub USER@REMOTE_IP:~/.ssh/authorized_keys ``` ####@remote ```bash $ chmod 700 ~/.ssh $ chmod 600 ~/.ssh/authorized_keys ``` ###rootログイン不可、パスワード認証不可に設定 ```bash $ sudo vi /etc/ssh/sshd_config PermitRootLogin no PasswordAuthentication no $ sudo systemctl restart ssh.service ``` ###ポート変更 ```bash $ sudo vi /etc/ssh/sshd_config #Port 22 Port XXXXX $ sudo systemctl restart ssh.service ``` ファイアウォールの設定も変更 ```bash $ sudo cp /usr/lib/firewalld/services/ssh.xml /etc/firewalld/services/ssh.xml $ sudo vi /etc/firewalld/services/ssh.xml
$ sudo firewall-cmd --reload ``` ##Install git ```bash $ sudo yum update $ sudo yum install git ``` ##Install Docker, Docker Compose * http://fiahfy.blogspot.jp/2015/12/install-docker-centos71.html * http://fiahfy.blogspot.jp/2015/12/install-docker-compose-centos71.html ##Install New Relic * http://fiahfy.blogspot.jp/2016/02/install-new-relic-on-docker-hostcentos71.html
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment