軟體列表軟體版本備註centos6.4 x86_6464位系統mysqlmysql5.5.49本機使用python2.7seafile 依賴pythonpip8.1.2安裝模塊使用python-imaging1.1.7python模塊mysql-python1.2.5python模塊 使用pip安裝... ...
軟體列表
軟體 | 版本 | 備註 |
---|---|---|
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