Skip to content

Instantly share code, notes, and snippets.

@manjeshpv
Created January 31, 2018 05:59
Show Gist options
  • Save manjeshpv/5aa2ec7307c4e5076da9313b94d31329 to your computer and use it in GitHub Desktop.
Save manjeshpv/5aa2ec7307c4e5076da9313b94d31329 to your computer and use it in GitHub Desktop.
Installing OwnCloud 10 in Ubuntu 16.04
#!/bin/bash
USER=manjeshpv
HOSTNAME=drive.manjeshpv.com
# using root user
apt update
apt upgrade
yum install nginx php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip-y
# Add your user
adduser $USER
passwd $USER
usermod -aG sudo $USER
# Customize timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
# Update Hostname
hostname $HOSTNAME
# In CentOS disable SELinux https://goo.gl/EgL3i8
# Create a MySQL user with wildcard db permission oc_*
sudo systemctl enable nginx
sudo systemctl enable php7.0-fpm
sudo systemctl start nginx
sudo systemctl start php7.0-fpm
# Update ssl
# Config NGINX https://doc.owncloud.org/server/10.0/admin_manual/installation/nginx_configuration.html
nano /etc/nginx/conf.d/drive.manjeshpv.com.conf
# Minor Changes
# Change nginx listen user to $USER
nano /etc/nginx/nginx.conf
# Change
user = $USER
#; RPM: Keep a group allowed to write in log dir.
group = $USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment