zoukankan      html  css  js  c++  java
  • Seafile内部云盘

    软件列表

    软件 版本 备注
    centos 6.4 x86_64 64位系统
    mysql mysql5.5.49 本机使用
    python 2.7 seafile 依赖python
    pip 8.1.2 安装模块使用
    python-imaging 1.1.7 python模块
    mysql-python 1.2.5 python模块 使用pip安装
    pythhon-setuptools 23.0.0 python模块
    simplejson 默认版本
    seafile-server seafile-server_5.1.3_x86-64 私有云盘

    软件安装

    • 升级python到2.7.10
    shell>yum -y update
    shell>yum groupinstall “Development tools”
    shell> yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
    shell>tar xf Python-2.7.10.tar.xz 
    shell>cd Python-2.7.10
    shell> ./configure –prefix=/usr/local
    shell> make && make altinstall
    shell>ls -la /usr/local/bin/python2.7*
    shell>mv /usr/bin/python /usr/bin/python2.6.6
    shell>ln -s /usr/local/bin/python2.7 /usr/bin/python
    
    • yum 安装mysql 和 mysql-devel
    #删除当前系统中存在 Mysql 相关
    shell> yum remove mysql-*
    shell> rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
    shell> rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
    or
    shell> wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
    shell> wget https://mirror.webtatic.com/yum/el6/latest.rpm
    #安装 Mysql5.5X 参考文档https://webtatic.com/packages/mysql55/
    shell> yum install mysql55w mysql55w-server mysql55w-devel
    #更改配置文件
    shell> vim /etc/my.cnf # database=/software/mysqldata(自定义)
    shell > service mysqld start
    shell > mysql -uroot -p
        mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Tczafle@521' WITH GRANT OPTION;
        mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'Tczaflw@521' WITH GRANT OPTION;
        mysql > FLUSH PRIVILEGES;
    
    • 下载安装Python 模块
    #download python-imaging pythhon-setuptools
    shell > tar xzf  python-imaging-1.1.7.tar.gz
    shell > cd imaging-1.1.7
    shell > python setup.py install
    shell > tar xzf setuptools-23.0.0.tar.gz
    shell > cd setuptools-23.0.0
    shell > python setup.py install
    #use pip install mysql-python simplejson
    #pip install
    shell > tar xzf pip-8.1.2.tar.gz
    shell > cd pip-8.1.2
    shell > python setup.py install
    #set pip Network Source
    shell > vim ~/pip/pip.conf #豆瓣源:http://pypi.douban.com/simple/ 
    shell > pip install mysql-python
    shell > pip install simplejson
    
    • 安装seafile
    #参考文档 http://www.tecmint.com/install-seafile-in-linux/
    #download seafile https://www.seafile.com/download/ 选择需要的版本
    shell > adduser seafile
    shell > passwd seafile
    shell > su -seafile
    shell > tar xzf seafile-server_5.1.3_x86-64.tar.gz
    shell > cd eafile-server-5.1.3
    shell > python setup-seafile-mysql.py
        [ server name ] seafile-centos
        [ This server's ip or domain ] 10.90.0.10
        [ default "/home/seafile/seafile-data" ] #可以自定义
        [ default "8082" ]  #可以自定义
        Please choose a way to initialize seafile databases:
            -------------------------------------------------------
            [1] Create new ccnet/seafile/seahub databases
            [2] Use existing ccnet/seafile/seahub databases
            [ 1 or 2 ]  #选择创建新的数据库
            What is the host of mysql server?
            [ default "localhost" ] 
                        .......
    #安装完毕
    shell > ./seafile.sh start #启动云盘
    shell > ./seahub.sh start #配置管理员用户
    #访问
    http://system_IP:8000 or http://domain_name:8000
    
    • Seafile Script For Other User
    #!/bin/sh
    #chkconfig: 345 99 10
    #description: Seafile auto start-stop script.
    
    # source function library
    . /etc/rc.d/init.d/functions
    
    start() {
            echo "Starting Seafile server..."
    su - seafile -c "seafile-server-latest/seafile.sh start"
    su - seafile -c "seafile-server-latest/seahub.sh start"
    }
    
    stop() {
            echo "Stopping Seafile process..."
    su - seafile -c "seafile-server-latest/seafile.sh stop"
    su - seafile -c "seafile-server-latest/seahub.sh stop"
    }
    
    restart() {
            echo "Stopping Seafile process..."
    su - seafile -c "seafile-server-latest/seafile.sh stop"
    su - seafile -c "seafile-server-latest/seahub.sh stop"
    
             echo "Starting Seafile server..."
    su - seafile -c "seafile-server-latest/seafile.sh start"
    su - seafile -c "seafile-server-latest/seahub.sh start"
    }
    
    case "$1" in
        start)
           start
            ;;
        stop)
           stop
            ;;
        restart)
           restart
            ;;
            *)
          echo "Usage: $0 start stop restart"
            ;;
    esac
    
    • 添加到开机启动
    shell > chmod +x /etc/init.d/seafile
    shell >  service seafile start 
    shell >  service seafile stop 
    shell >  service seafile restart
    shell >  chkconfig seafile on | off
    shell >  chkconfig --list seafile
    
  • 相关阅读:
    jQuery插件:用于获取元素自身的HTML内容
    自定义 Web 部件用户界面简介
    在MOSS2010中实现OU下的用户的上下级组织关系
    sharepoint2010人性化的地方--员工离职AD账号禁用(个人网站自动提醒上级经理功能)
    SharePoint2010文档归档策略(2)-从放置库转移到自己定义的文档库
    SharePoint2010文档归档策略
    如何用VS2010在SharePoint中创建自定义字段类型(以eWebEditor为例)
    如何实现SP文档库类似百度文档库的效果 (副标题:如何在SP2013文档库的SWF文件用FlexPager显示)
    查看SharePoint文档库是,显示层次目录,可以点击返回层次
    安装和配置SharePoint 2013 with SP1 Workflow
  • 原文地址:https://www.cnblogs.com/edwardlogs/p/Linuxseafile.html
Copyright © 2011-2022 走看看