OwnCloud/Installation
From r00tedvw.com wiki
(Difference between revisions)
(→Setup PHP) |
(→Setup PHP) |
||
Line 41: | Line 41: | ||
<nowiki>~$ sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm | <nowiki>~$ sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm | ||
~$ sudo yum-config-manager --enable remi-php73 | ~$ 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</nowiki> | + | ~$ 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</nowiki> |
=Setup NFS= | =Setup NFS= |
Latest revision as of 23:44, 17 April 2021
OwnCloud Installation
Contents |
[edit] Requirements
CentOS 7
LAMP stack.
- MariaDB 10+
- httpd 2.4+ with prefork and mod_php
- PHP 7.4+
- 512MB RAM
[edit] Prerequisites
~$ sudo yum install -y epel-release yum-utils ~$ sudo yum install -y httpd mariadb-server ~$ sudo systemctl enable httpd
[edit] 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
[edit] 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
[edit] 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
[edit] 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
[edit] 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
[edit] 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
[edit] Configure OwnCloud using the GUI
~$ sudo systemctl start httpd
define the following:
- root user/pass
- data directory (I used /opt/owncloud/data)
- database user/pass/dbname/dbhost:port
[edit] 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