Tutorial cara install Nextcloud di CentOS 7, ini akan memandu anda cara install Nexcloud dari awal sampai akhir. Setelah selesai anda akan mendapatkan Nextcloud yang siap digunakan.
INSTALL REMI REPO
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum install remi-release-7.rpm -y
INSTALL PHP
yum install php71-php php71-php-pdo php71-php-tidy php71-php-mbstring php71 php71-php-common php71-php-cli php71-php-mysqlnd php71-php-xml php71-php-mcrypt php71-php-fpm php71-php-gd php71-php-json php71-php-intl php71-php-zip php71-php-process -y
Ubah Timezone PHP dan User PHP FPM
sed -i 's/user = apache/user = nginx/g' /etc/opt/remi/php71/php-fpm.d/www.conf sed -i 's/group = apache/user = nginx/g' /etc/opt/remi/php71/php-fpm.d/www.conf sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/opt/remi/php71/php.ini sed -i 's/;date.timezone =/date.timezone = Asia\/Jakarta/g' /etc/opt/remi/php71/php.ini
INSTALL MARIADB
yum install mariadb-server mariadb -y
Setting MariaDB
systemctl start mariadb mysql_secure_installation systemctl restart mariadb
Buat Database Untuk Nextcloud
CREATE DATABASE nextcloud; GRANT ALL PRIVILEGES ON nextcloud.* TO "nextcloud"@"localhost" IDENTIFIED BY "yLPoPsMbJiPYKKt3RuV3"; FLUSH PRIVILEGES;
Install NGINX
Copy paste perintah dibawah ini di terminal
echo ' [nginx.org] name=nginx.org repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=1 enabled=1 ' > /etc/yum.repos.d/nginx.repo;
lalu install nginx
rpm --import http://nginx.org/keys/nginx_signing.key yum install nginx -y
Buat vhost untuk nextcloud, saya akan menggunakan nextcloud.jaranguda.com
erver { listen 80; server_name localhost; root /var/www/nextcloud/; index index.php index.html index.htm; location ~ \.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param modHeadersAvailable true; fastcgi_pass 127.0.0.1:9000; fastcgi_intercept_errors on; } }
Install owncloud
cd /var/www wget https://download.nextcloud.com/server/releases/nextcloud-18.0.0.zip unzip nextcloud-18.0.0.zip
Ubah file permission biar bisa diakses nginx
chown nginx:nginx -R /var/www/nextcloud
Buka nextcloud.jaranguda.com di browser,
isi semua info yang dibuat diatas, lalu klik Finish