zoukankan      html  css  js  c++  java
  • 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
    phpinfo();
    ?>" > /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
  • 相关阅读:
    CentOS 6.3 安装 phpmyadmin
    mysql 常用命令
    用PHP将Unicode 转化为UTF-8
    Angularjs通过$http与服务器通信
    话说Angularjs的$resource模块
    AngularCSS--关于angularjs动态加载css文件的方法(仅供参考)
    Angular-ui-router + oclazyload + requirejs实现资源随route懒加载
    移动前端开发之viewport的深入理解
    AngularJS的ng-class切换class
    AngularJS中如何对Controller与Service进行分层设计与编码
  • 原文地址:https://www.cnblogs.com/huixst/p/11595546.html
Copyright © 2011-2022 走看看