How to install owncloud 9 centos 7

How to install owncloud 9 on centos 7. I'm use bash script to install owncloud 9 on centos 7.
Links to below you maybe likes:
How to install php7 on centos 6
How to install and configure redmine on centos 6
How to owncloud 9 install ssl certificate centos 7
How To Install the BIND DNS Server on CentOS 6
KeepAlived IP Failover on CentOS & Red Hat
#!/bin/bash
#Full Name: Phan Van Huu
#My Blog: www.huuphan.com
#How to install owncloud 9 centos 7
#To update centos 7
echo -e "Updating pack for centos 7\n"
yum install -y vim wget
yum -y update
#To install Mariadb server for centos 7
echo -e "Installing MariaDB server for centos 7\n"
yum install -y mariadb-server
systemctl enable mariadb
systemctl start mariadb
#To set password root for MariaDB server
echo -e "To set password root for MariaDB server\n"
mysqld_safe --skip-grant-tables --skip-networking & 1>/dev/null
mysql -u root -e 'FLUSH PRIVILEGES;'
mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456789');"
mysql -u root -p'123456789' -e "show databases;"
#Install owncloud lastest in centos 7
echo -e "install from EPEL\n"
yum --enablerepo=epel -y install php-pear-MDB2-Driver-mysqli php-pear-Net-Curl
wget http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -P /etc/yum.repos.d
#Install owncloud 9
echo -e "installing owncloud\n"
yum -y install owncloud
systemctl restart httpd
#Add user and database for ownCloud in MariaDB
mysql -u root -p'123456789' -e 'show databases;'
mysql -u root -p'123456789' -e 'create database owncloud;'
mysql -u root -p'123456789' -e "grant all privileges on owncloud.* to clouddbuser@'localhost' identified by 'password123';"
mysql -u root -p'123456789' -e 'flush privileges;'
mysql -u root -p'123456789' -e 'show databases;'
#if SELinux is enabled
semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/apps
semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/config
restorecon /var/www/html/owncloud/apps
restorecon /var/www/html/owncloud/config
systemctl enable httpd
systemctl start httpd
echo -e "Finish installed owncloud\n"
#Access to the URL:
echo -e "Access to the URL\n"
echo -e "http://ip-address/owncloud/ or http://hostnameFQDN/owncloud/ from a client computer with Web browser"

How to install owncloud 9 centos 7



Comments

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6