標籤:centos 6.6搭建seafile私人雲端盤
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
centos 6.6搭建seafile私人雲端盤