centos 7 私有云盘 OwnCloud 安装搭建脚本

#!/bin/bash
#Build LAMP Server Conf
mysql_secure_installation
service mariadb restart
systemctl enabled mariadb
systemctl restart httpd
sed -i "11a-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT" /etc/sysconfig/iptables
systemctl restart iptables.service
echo -e "<?php\nphpinfo();\n?>" > /var/www/html/test.php
http://192.168.84.5/test.php
yum search php-
yum info module_name
yum -y install module_name
wget https://download.owncloud.org/community/owncloud-10.0.10.tar.bz2
tar -xvf owncloud-10.0.10.tar.bz2
cp -r owncloud/ /var/www/html/owncloud
sed -i 's/AllowOverride none/AllowOverride All/g' /etc/httpd/conf/httpd.conf
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/httpd/conf/httpd.conf
chown -R apache:apache /var/www/html/owncloud
chmod 777 /var/www/html/owncloud/config/
sudo systemctl restart httpd
mysql -u root -p huixst.9
MariaDB [(none)] > create database owncloud;
MariaDB [(none)] > GRANT ALL ON owncloud.* TO ocuser@localhost IDENTIFIED BY 'owncloud';
MariaDB [(none)] > flush privileges;
MariaDB [(none)] > exit

yum -y remove php*
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring php56w-fpm
service httpd restart
php -v
http://192.168.84.5/index.php
systemctl enable mariadb
systemctl enable httpd

DOCKER CONF >>>
#创建一个新的项目目录
mkdir owncloud-docker-server
cd owncloud-docker-server

#从GitHub存储库复制docker-compose.yml
wget https://raw.githubusercontent.com/owncloud-docker/server/master/docker-compose.yml

#创建环境配置文件
cat << EOF > .env
OWNCLOUD_VERSION=10.0
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=8080
EOF
#构建并启动容器
docker-compose up -d
docker-compose ps

 

posted @ 2019-09-27 15:08  wwweee000  阅读(701)  评论(0编辑  收藏  举报