OwnCloud/Installation

From r00tedvw.com wiki
Jump to: navigation, search

OwnCloud Installation

Contents

Requirements

CentOS 7
LAMP stack.

  • MariaDB 10+
  • httpd 2.4+ with prefork and mod_php
  • PHP 7.4+
  • 512MB RAM

Prerequisites

~$ sudo yum install -y epel-release yum-utils
~$ sudo yum install -y httpd mariadb-server
~$ sudo systemctl enable httpd

Setup Repo

~$ sudo rpm --import https://download.owncloud.org/download/repositories/stable/CentOS_7/repodata/repomd.xml.key
~$ sudo curl -L https://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -o /etc/yum.repos.d/ownCloud.repo
~$ sudo yum clean expire-cache

Install OwnCloud

~$ sudo yum install -y owncloud
~$ sudo chown -R apache:apache /var/www/html/owncloud/apps /var/www/html/owncloud/apps-external/ /var/www/html/owncloud/config/ /var/www/html/owncloud/data
~$ sudo mkdir -p /opt/owncloud/data
~$ sudo chown apache:apache /opt/owncloud/data

Set Firewall rules

~$ sudo firewall-cmd --permanent --zone=public --add-service=http
~$ sudo firewall-cmd --permanent --zone=public --add-service=https
~$ sudo firewall-cmd --reload

Setup MariaDB

~$ systemctl start mariadb.service
~$ mysql_secure_installation
~$ sudo mysql -u root -p
mariadb> CREATE DATABASE owncloud;
mariadb> GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'set_database_password';
mariadb> FLUSH PRIVILEGES;
mariadb> exit

Setup PHP

~$ sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
~$ sudo yum-config-manager --enable remi-php73
~$ sudo yum install -y php php-gd php-intl php-mbstring php-process php-xml php-pdo php-pecl-zip php-mysql php-ldap php-soap php-imagick

Setup NFS

OPTIONAL: You can use the local disk if you prefer.

~$ sudo mount -t nfs ncwv-freenas01.r00tedvw.local:/mnt/pool_02/OwnCloud /opt/owncloud/data
~$ sudo chown -R apache:apache /opt/ownlcloud/
~$ echo "ncwv-freenas01.r00tedvw.local:/mnt/pool_02/OwnCloud /opt/owncloud/data nfs defaults 0 0" >> /etc/fstab

Configure OwnCloud using the GUI

~$ sudo systemctl start httpd

https://fqdn/owncloud

define the following:

  • root user/pass
  • data directory (I used /opt/owncloud/data)
  • database user/pass/dbname/dbhost:port

Troubleshooting

If you have to reset the admin password like I did, there is a built in util for that.

~$ sudo -u apache /var/www/html/owncloud/occ user:resetpassword r00t
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Open Source Products
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
MagicMirror
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
Politics
Volkswagen
Covid
NCDMV
Toolbox