#author("2019-05-11T23:06:07+09:00","default:ichinomoto","ichinomoto") #author("2019-05-11T23:06:40+09:00","default:ichinomoto","ichinomoto") [[FrontPage]] *ubuntu 16.04 [#ndf02964] **letsencrypt [#hf57f06f] ***install [#c936f285] sudo apt-get install letsencrypt ** docker [#q8a41851] ***install [#e780e3a4] ***docker本体 [#a2804f09] https://docs.docker.com/install/linux/docker-ce/ubuntu/ sudo apt-get remove docker docker-engine docker.io containerd runc sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io dockerをユーザーから使えるようにする sudo gpasswd ichinomoto -a docker ***docker-compose [#x965c26c] https://docs.docker.com/compose/install/ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose *mariadb(mysql)移行 [#b34016a3] **完全初期化 [#aba46213] sudo rm -fr /var/lib/musql/* su - mysql mysql_install_db --datadir=/var/lib/mysql **backup [#oc678c06] mysqldump --all-databases > dump.sql **restore [#j361cce0] mysql < dump.sql **user追加など [#h04c5e7e] 操作するdbをmysqlに変更 USE mysql; USE mysql; user一覧 SELECT user,host FROM mysql.user; SELECT user,host FROM mysql.user; user作成 CREATE USER 'ユーザー名'@'ホスト名' IDENTIFIED BY 'パスワード'; CREATE USER 'ユーザー名'@'ホスト名' IDENTIFIED BY 'パスワード'; usernameに全権限付与 GRANT ALL PRIVILEGES ON *.* TO 'ユーザー名'@'ホスト名' IDENTIFIED BY 'パスワード' WITH GRANT OPTION; FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON *.* TO 'ユーザー名'@'ホスト名' IDENTIFIED BY 'パスワード' WITH GRANT OPTION; FLUSH PRIVILEGES;