创新路
我们一直在努力

seafile私有云盘搭建(CentOS 6.3)

一、创建云盘目录
mkdir /yunpan
cd /yunpan
二、把云盘安装包放到目录下
wget http://download-cn.seafile.com/seafile-server_4.2.3_x86-64.tar.gz
三、解压
tar -zvxf seafile-server_4.2.3_x86-64.tar.gz
四、安装相关的环境包(有的可能yum安装不了,更具提示手动安装in)
yum install -y  python2.7 python-setuptools python-simplejson python-imaging MySQL-python
yum install -y mysql mysql-server
yum install -y gcc gcc-c++ autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* cmake bison make
五、安装Python 2.7.9
1、安装依赖包
yum install zlib-devel yum install bzip2-devel yum install openssl-devel yum install ncurses-devel yum install sqlite-devel
2、下载安装包
https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
3、解压安装
tar xf Python-2.7.9.tar.xz cd Python-2.7.9
./configure –prefix=/usr/local make && make install
4、将python命令指向Python 2.7.9
ln -s /usr/local/bin/python2.7 /usr/local/bin/python
5、检查版本
sh sh-4.1# python -V Python 2.7.9
六、python下setuptools安装
1、下载安装包
https://pypi.python.org/pypi/setuptools
2、解压安装
tar -zxvf setuptools-12.0.3.tar.gz
cd setuptools=12.0.3
python setup.py install
七、安装Python图型处理库Python Imaging Library(PIL)
先安装相关编译环境
yum -y install libjpeg libjpeg-devel zlib zlib-devel freetype freetype-devel
把/usr/lib64/中相关.so包连接到/usr/lib/里面
比如:ln -s /usr/lib64/libjpeg.so /usr/lib/
1、下载安装包
http://www.pythonware.com/products/pil/index.htm
2、解压安装
tar -zxvf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
python setup.py build_ext -i (要保证中间三个都要可用)
python selftest.py
python setup.py install
八、MySQL-python安装
1、下载安装包
https://sourceforge.net/projects/mysql-python/files/mysql-python
2、 依赖包安装
yum -y install python-devel mysql-devel zlib-devel openssl-devel
3、解压安装
tar -zxvf MySQL-python-1.2.3.tar.gz
cd MySQL-python-1.2.3
vi setup_posix.py
  4、找到mysql_config.path 一行,改为mysql_config.path=”/usr/bin/mysql_config”
   python setup.py build
   python setup.py install
   python
    >>>   import  MySQLdb
九、安装云盘服务端
1、安装前要先启动mysql
service mysqld start
mysqladmin -u root -p password “85520786” ——更改mysql密码
mysql -u root -p password 85520786
2、安装云盘服务端
./setup-seafile-mysql.sh
What is the name of the server? It will be displayed on the client
[ server name ] YuanYang                                    >>>>定义云服务器名字
What is the ip or domain of the server?
[ This server’s ip or domain ] 172.16.1.220                 >>>>设定云服务器IP或者域名
What is the ip or domain of the server?
[ default “10001” ] 80                                      >>>>默认连接服务器的端口
What is the ip or domain of the server?
[ default “/yunpan/installed/seafile-data” ] /yunpan/data   >>>>设置云盘数据存储目录
Which port do you want to use for the seafile server?
[ default “12001” ] 81                                      >>>>设置云盘服务器的端口为81
Which port do you want to use for the seafile fileserver?
[ default “8082” ] 82                                       >>>>设置云盘文件服务的端口为82
——————————————————-
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 ]                                                  >>>>>一般选1新建
What is the host of mysql server?
[ default “localhost” ]    直接回车                         >>>>>选择使用的数据库
What is the port of mysql server?
[ default “3306” ]直接回车                                  >>>>>数据库的端口
What is the password of the mysql root user?
[ root password ]LINlin123                                  >>>>>数据库的root密码
一面的基本可以一路回车,遇到需要改的改下就可以
—————————————————————–
If you are behind a firewall, remember to allow input/output of these tcp ports:
—————————————————————–
port of ccnet server:         80
port of seafile server:       81
port of seafile fileserver:   82
port of seahub:               8000
When problems occur, Refer to
        https://github.com/haiwen/seafile/wiki
for information.
看到如上提示安装完成
十、Seafile服务器启动与配置
执行以下命令修改Linux 文件******打开数:ulimit -n 30000
启动Seafile服务:./seafile.sh start,
启动Seahub服务:./seahub.sh start
十一、ccnet.conf配置
Seafile 网络配置(ccnet.conf)还可以作其它的定义,相关的配置说明如下:
[General]
# Seafile 服务器端可不设置
USER_NAME=example
# 请不要改变这个 ID.
ID=eb812fd276432eff33bcdde7506f896eb4769da0
# Seafile 服务器名称, 客户端可见。
NAME=example
# Seahub(Seafile Web)外部链接. 客户端可见.
# 域名部分(i.e., www.example.com),在文件同步中也会用到.
# 注意: 外部链接意味着”如果你使用 Nginx, 请使用 Nginx 相关地址”
SERVICE_URL=http://www.example.com:8000
[Network]
# Ccnet 通过此端口监听客户端连接. 如被占用请更改.
# Seafile 服务器中有效.
PORT=10001
[Client]
# Ccnet 通过此端口监听本地连接(如 Seahub 网站)请求.
# 此端口如被其他服务占用, Seafile 和 Seahub 将无法正常工作.
# 如果你想在同一主机上运行 Seafile 和 Seahub, 请改为客户端使用的端口.
PORT=13419

未经允许不得转载:天府数据港官方信息博客 » seafile私有云盘搭建(CentOS 6.3)

客官点个赞呗! (1)
分享到:

评论 抢沙发

评论前必须登录!

天府云博 - 做有态度的开发&运维&设计学习分享平台!

联系我们百度云主机