1
创建云盘目录
mkdir /yunpan
cd /yunpan
2
把云盘安装包放到目录下
wget http://download-cn.seafile.com/seafile-server_4.2.3_x86-64.tar.gz
或者用rz命令上传。用rz要先用yum安装lrzsz。
3.解压
tar xzvf seafile-server_4.2.3_x86-64.tar.gz
mkdir installed
mv seafile-server_* installed
4.更新yum
yum update -y
yum upgrade -y
5.1安装相关的环境包(有的可能yum安装不了,更具提示手动安装in)
yum install -y python2.7 python-setuptools python-simplejson python-imaging MySQL-python
yum install -y mysql mysql-server
《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《
5.2如果没有安装上mysql-python 和Python-mysqld需要手动安装下面两个包
wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz
wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg
1、# yum install python-devel mysql-devel zlib-devel openssl-devel
2、http://pypi.python.org/pypi/MySQL-python/#downloads 下载安装包
# wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz
3、http://pypi.python.org/pypi/setuptools#downloads 下载工具
# wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg
4、先安装工具
# sh setuptools-0.6c11-py2.4.egg
# python
>>> import setuptools
不提示错误表示成功
5、安装 MySQL-python-1.2.3.tar.gz
# tar -zxvf MySQL-python-1.2.3.tar.gz
# cd MySQL-python-1.2.3
# vi setup_posix.py
找到mysql_config.path 一行,改为mysql_config.path = "/usr/bin/mysql_config"
# python setup.py build
# python setup.py install
# python
>>> import MySQLdb
不提示错误表示成功
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
6.安装云盘服务端
安装前要先启动mysql
service mysqld star
mysql -u root -p password LINlin123
./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.
看到如上提示安装完成
7.Seafile服务器启动与配置
执行以下命令修改Linux 文件最大打开数:ulimit -n 30000
启动Seafile服务:./seafile.sh start,
启动Seahub服务:./seahub.sh start
8. 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
转载于:https://blog.51cto.com/yylinfan/1687722