採用nextcloud官方的Stack的basic版本,進行安裝
選用的版本 nextcloud 22.2.3 apache+mysql(miriadb)的版本
過程中重覆安裝時,會出現下面的資料(reinstall時,nextcloud設定正確不會掉資料)
Error. It looks like you are trying to reinstall your NextCloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.
在config的目錄中執行下面的指令
touch CAN_INSTALL
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory
DBServer 把localhost 改成 db即可
完整的stack如下,修改紅色的部份即可
會這樣stack設定
可以單獨備份nextcloud的設定檔/app/資料庫/上傳的檔案/佈景主題等等
所以災難復原時,放回去,再config touch CAN_INSTALL 設定正確
資料應該就會回來
—
version: ‘2’volumes:
nextcloud:
db:services:
db:
image: mariadb
restart: always
command: –transaction-isolation=READ-COMMITTED –binlog-format=ROW –innodb-file-per-table=1 –skip-innodb-read-only-compressed
volumes:
– /path/path1:/var/lib/mysql
environment:
– MYSQL_ROOT_PASSWORD=mysql_root_password
– MYSQL_PASSWORD=mysql_password
– MYSQL_DATABASE=nextcloud
– MYSQL_USER=nextcloud
app:
image: nextcloud
restart: always
ports:
– access_port:80
links:
– db
volumes:
– /path/path2:/var/www/html
– /path/path3:/var/www/html/custom_apps
– /path/path4:/var/www/html/config
– /path/path5:/var/www/html/data
environment:
– MYSQL_PASSWORD=mysql_password
– MYSQL_DATABASE=nextcloud
– MYSQL_USER=nextcloud
– MYSQL_HOST=db
先設定中文語系 選Settings
語言選正體中文(臺灣) 地區設定 Chinese(Traditional Taiwan)
安裝之後就是最新的版本 22.2.3
記憶體相當的省 才用了1G
隨機文章
- 測試台固10M/2M光纖線路 (2011-01-09)
- PS. I Love You影評 (2008-02-12)
- 建國基金 (2008-10-07)
- BPR:誰來管理流程E化之後的風險? (2007-11-03)
- mysqldump –all-database 備份好用 一點小不便 3分鐘學會小功能 功力大增 (2021-09-01)