zoukankan      html  css  js  c++  java
  • CentOS上安装seafile

    一、安装python2.7.14(CentOS7上python默认版本是Python 2.7.5 ,不需要安装)
    1、安装依赖包
    [root@web01 ~]# yum -y install zlib zlib-devel openssl openssl-devel

    2、为了防止出现 import zlib找不到的情况,复制文件:
    [root@web01 ~]# mkdir -p /usr/local/lib/python2.7/lib-dynload
    [root@web01 ~]# cp /usr/lib64/python2.6/lib-dynload/zlibmodule.so /usr/local/lib/python2.7/lib-dynload

    3、下载python2.7.14,可直接到python官网下载,并选择相应版本;解压后文件夹改名为python
    [root@web01 ~]# wget --no-check-certificate https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz

    4、进入python,编译安装:
    [root@web01 Python-2.7.14]# ./configure
    [root@web01 Python-2.7.14]# make && make intall

    5、把系统自带的2.6移除(依然会保留2.6版本:/usr/bin/python2.6)
    [root@web01 ~]# rm -f /usr/bin/python

    6、把python执行软连接连接到2.7
    [root@web01 ~]# ln -s /usr/local/bin/python2.7 /usr/bin/python

    7、编辑yum命令,把路径指明为2.6,因为yum必须基于2.6版本
    [root@web01 ~]# vi /usr/bin/yum
    把文件头部的#!/usr/bin/python改成#!/usr/bin/python2.6
    保存退出,yum即可正常使用。如若有其他命令、软件不能正常使用,仿照yum配置文件的修改方法,修改其配置文件即可。

    8、安装setuptools
    [root@web01 ~]# wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-18.0.1.tar.gz
    [root@web01 ~]# tar xf setuptools-18.0.1.tar.gz
    [root@web01 ~]# cd setuptools-18.0.1
    [root@web01 setuptools-18.0.1]# python setup.py install

    9、安装pip
    [root@web01 ~]# wget --no-check-certificate https://pypi.python.org/packages/7e/71/3c6ece07a9a885650aa6607b0ebfdf6fc9a3ef8691c44b5e724e4eee7bf2/pip-7.1.0.tar.gz
    [root@web01 ~]# tar xf pip-7.1.0.tar.gz
    [root@web01 ~]# cd pip-7.1.0
    [root@web01 pip-7.1.0]# python setup.py install
    [root@web01 pip-7.1.0]# pip install --upgrade pip #升级pip
    [root@web01 pip-7.1.0]# pip install pillow

    10、测试pip,如果报错“pkg_resources.DistributionNotFound: The 'pip==7.1.2' distribution was not found and is required by the application”,此时需要修改pip可执行程序:
    [root@web01 ~]# mv /usr/bin/pip /usr/bin/pip0
    [root@web01 ~]# cp /usr/bin/pip2.7 /usr/bin/pip

    二、CentOS7上安装seafile
    1、安装数据库
    yum install -y epel-release
    yum install -y mariadb-server mariadb   #安装mariadb数据库
    systemctl start mariadb   #启动mariadb数据库

    2、安装ffmpeg软件源
    rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
    rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

    3、安装seafile服务器依赖包
    yum -y install python-imaging MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel
    pip install pillow moviepy

    4、安装pip install moviepy报错解决方法:
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-h1iyME/moviepy/
    需要升级setuptools模块
    pip install -U setuptools #先升级pip,再升级setuptools

    三、CentOS6.8上安装seafile
    1、安装seafile依赖包
    [root@web01 ~]# yum -y install python-imaging mysql mysql-server mysql-devel libjpeg-turbo-devel python-devel
    [root@web01 ~]# pip install MySQL-python

    2、启动MySQL,设置MySQL root账户的密码为root,并创建seafile数据库和seafile用户
    [root@web01 ~]# /etc/init.d/mysqld start
    [root@web01 ~]# mysqladmin -u root password "root"
    [root@web01 ~]# mysql -uroot -proot
    create database seafile;
    create database ccnet;
    create database seahub;
    grant all on seafile.* to 'seafile'@'localhost' identified by 'seafile';
    grant all on ccnet.* TO 'seafile'@'localhost';
    grant all on seahub.* TO 'seafile'@'localhost';
    flush privileges;

    3、下载安装seafile
    [root@web01 ~]# wget --no-check-certificate http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.2.4_x86-64.tar.gz
    [root@web01 ~]# tar xf seafile-server_6.2.4_x86-64.tar.gz
    [root@web01 ~]# cd seafile-server-6.2.4/
    [root@web01 seafile-server-6.2.4]# ./setup-seafile-mysql.sh

    4、安装时提示"libc.so.6: version `GLIBC_2.14' not found",原因是系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的
    [root@web01 ~]# strings /lib64/libc.so.6 | grep GLIBC_ #查看系统glibc支持的版本
    [root@web01 ~]# rpm -qa | grep glibc #查看安装的glibc包的版本
    [root@web01 ~]# wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.14.tar.gz
    [root@web01 ~]# tar xf glibc-2.14.tar.gz
    [root@web02 glibc-2.14]# mkdir build
    [root@web02 glibc-2.14]# cd build/
    [root@web01 glibc-2.14]# ../configure --disable-sanity-checks
    [root@web01 glibc-2.14]# make -j4 #-j4提高make时的速度(建议不加-j参数)
    [root@web01 glibc-2.14]# make install

    参考链接
           https://www.cnblogs.com/wpjamer/p/ffmpeg.html    #yum安装ffmpeg软件包
           https://manual-cn.seafile.com/deploy/using_mysql.html    #官网安装seafile服务器文档

  • 相关阅读:
    51nod1376 最长递增子序列的数量
    51nod1201 整数划分
    51nod1202 子序列个数
    51nod 博弈论水题
    51nod1052 最大M子段和
    51nod1678 lyk与gcd
    51nod1262 扔球
    BZOJ2763, 最短路
    吃西瓜 最大子矩阵 三维的。 rqnoj93
    noip2015 信息传递 强连通块
  • 原文地址:https://www.cnblogs.com/xwupiaomiao/p/8303725.html
Copyright © 2011-2022 走看看