搭建屬於你的伺服器-nextcloud(指令)
docker pull
1 | docker pull mysql:latest |
1 | docker pull nextcloud |
依序輸入指令
安裝mysql
注意指令中的password請改成你想要的密碼1
docker run -p 3306:3306 --name mysql --restart="always" -v /usr/local/mysql/conf:/etc/mysql/conf.d -v /usr/local/mysql/logs:/logs -v /usr/local/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -d mysql
1
2docker exec -it mysql mysql -u root -p
#Enter password: 輸入上面你所設定密碼
理論上輸入以下指令會輸出Query OK, 0 rows affected (X.XX sec)
如果報錯,可以試試跳過(不保證成功)1
2
3
4
5grant all PRIVILEGES on . to root@'%' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
Create database nextcloud;
離開mysql輸入1
exit
nextcloud安裝
leaftech (leaftech)
0%