Nextcloud是一款開源的存儲軟件,功能豐富,支持多人協(xié)同工作,目前完全免費。
官網(wǎng):https://www.nextcloud.com
架構:LAMP或LNMP
本文以LAMP為基礎
注意:php最低版本為7.2
關閉selinux:
1.臨時關閉:setenforce 0 :臨時關閉,無需重啟系統(tǒng)
2.永久關閉:sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config:永久關關閉,需要重啟系統(tǒng)
關閉防火墻:
systemctl stop firewalld
也可以放行相應端口:
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
安裝Apache2 服務器:
yum install -y httpd
啟動httpd
systemctl start httpd
安裝mariadb數(shù)據(jù)庫:
yum install -y mariadb mariadb-server
啟動mariadb:
systemctl start mariadb
mariadb操作:
登錄mariadb:
mysql -u root -p (默認密碼為空)
創(chuàng)建數(shù)據(jù)庫nextcloud:
create database if not exists `nextcloud` default character set utf8 collate utf8_general_ci;
創(chuàng)建賬戶nextcloud:
create user nextcloud@'localhost' identified by "nextcloud";
授權nextcloud的權限:
grant all privileges on nextcloud.* to nextcloud@'localhost' identified by 'nextcloud';
刷新mariadb權限表:
flush privileges;
CentOS7安裝php7.2:
php
高版本的yum
源地址,有兩部分,其中一部分是epel-release
,另外一部分來自webtatic
。如果跳過epel-release
的話,安裝webtatic
的時候,會報錯。
添加企業(yè)擴展源:
yum install epel-release -y
添加webtatic源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
php要安裝的內容:
yum -y install httpd php php-cli php-mysqlnd php-zip php-devel php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-json php-pdo php-pecl-apcu php-pecl-apcu-devel
如果覺得麻煩可以直接使用:
yum install -y php*
遇到錯誤則執(zhí)行:
yum install php* --skip-broken 即可
如果是centos8/rhel8則非常方便直接執(zhí)行:
yum install -y php*
下載nextcloud:
yum install -y wget
wget -c https://download.nextcloud.com/server/releases/nextcloud-19.0.1.zip
解壓nextcloud至/var/www/html
yum install -y unzip
unzip -q nextcloud-19.0.1.zip
設置網(wǎng)盤根目錄的屬主,屬組
chown -R apache:apache /var/www/html
輸入ip即可進入安裝向導
安裝完成后登陸后臺的界面:
nextcloud各平臺客戶端下載:
nextcloud windows客戶端:https://download.nextcloud.com/desktop/releases/Windows/latest
nextcloud MacOS客戶端:https://download.nextcloud.com/desktop/releases/Mac/Installer/latest
nextcloud Linux客戶端:https://download.nextcloud.com/desktop/releases/Linux/latest
nextcloud Android客戶端:https://apps.nextcloud.com/categories/integration?search=android
nextcloud IOS客戶端:https://apps.nextcloud.com/categories/integration?search=ios