安装yum-croniptables 、关闭selinux

    yum -y install cronie
yum -y install yum-cron
systemctl start yu,-cron
systemctl start yumcron
systemctl start yum-cron
yum -y install yum-cron
systemctl status yum-cron
sed -i 's/SELINUX=enforcing/SELINUX=disablde/g' /etc/selinux/config
reboot
systemctl stop firewalld
systemctl disable firewalld
reboot
rpm -Uvh iptables-1.4.21-35.el7.x86_64.rpm
rpm -Uvh iptables-services-1.4.21-35.el7.x86_64.rpm
#下面几个包不装的话运行createrepo会报错
rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh createrepo-0.9.9-24.el6.noarch.rpm

配置iptables规则

配置完需要重启此服务

vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT

配置本地源

chown 755 CentOS-7-x86_64-Everything-2003.iso
mkdir -p /mnt/iso
mount -o loop CentOS-7-x86_64-Everything-2003.iso /mnt/iso
cp -r /mnt/iso/Packages /root/Packages
rm -rf /etc/yum.repos.d/Centos*
vim local.repo
[local_server]
name = This is a local repo
baseurl = file:///root/Packages
enabled = 1
gpgcheck = 0
#保存退出
createrepo -d /root/Packages/
yum repolist
yum clean all
yum makecache

配置python环境

vim /etc/profile.d/python.sh
alias python='/usr/local/bin/python3.6'
alias pip='/usr/local/bin/pip3.6'
#保存退出
chmod 755 /etc/profile.d/python.sh
source /etc/profile.d/python.sh

安装mysql

#解压包,然后移动到本地源内
cd MariaDB
mv * ../Packages
#重新生成一下源数据
createrepo -d /root/Packages/
yum repolist
rm -rf /var/cache/yum
yum makecache
#安装
sudo yum install MariaDB-server MariDB-client
#查看状态
service mariadb.service status
systemctl enable --now mariadb
#设置mysql账号密码
mysql_secure_installation
#全是y

修改mysql存储目录到其他地方

最好还是配置一下,毕竟是数据。

systemctl stop mariadb.service
#创建好需要移动的目录
mkdir -p /data/seafile
chown -R mysql:mysql /data/seafile
cp -a /var/lib/mysql /data/seafile
vim /etc/my.cnf.d/server.cnf
#在 【mysqld】下插入以下配置
#--------------------------add by root-----------------------------
# add for moving data to /home/mariadb设置数据存放目录为/data/seafile/mysql socket路径保持不变
#
datadir=/data/seafile/mysql
socket=/var/lib/mysql/mysql.sock
#default-character-set=utf8 增加utf8代码支持
character_set_server=utf8
#SET配置MariaDB慢查询
slow_query_log=on
slow_query_log_file=/data/seafile/mysql/slow_query_log.log
long_query_time=2
#--------------------------end------------------------------------- vim /etc/my.cnf
#添加以下配置
[mysqld]
datadir=/data/seafile/mysql/
socket=/var/lib/mysql/mysql.sock
server_id=101
log-bin = mysql-bin
[client-server]
port=3306
socket=/var/lib/mysql/mysql.sock
#--------------------------end-------------------------------------
touch /data/seafile/mysql/slow_query_log.log
chown mysql:mysql /data/seafile/mysql/slow_query_log.log
#修改 /usr/lib/systemd/systemd/mariadb.service
vim /usr/lib/systemd/systemd/mariadb.service
#将里面的ProtectHome 参数改为false,然后保存退出
systemctl daemon-reload
service mariadb.service restart

数据库配置

mysql -uroot -p
MariaDB [(none)]> SHOW VARIABLES LIKE 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.010 sec) #--------------------------next---------------------------------- MariaDB [(none)]> show global variables like "%datadir%";
+---------------+----------------------+
| Variable_name | Value |
+---------------+----------------------+
| datadir | /data/seafile/mysql/ |
+---------------+----------------------+
1 row in set (0.002 sec) #--------------------------next---------------------------------- MariaDB [(none)]> grant all privileges on *.* to 'root'@'%' identified by 'seafile.2019' with grant option;
Query OK, 0 rows affected (0.004 sec) #--------------------------next---------------------------------- MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.003 sec) #--------------------------next---------------------------------- MariaDB [(none)]> exit
Bye

安装python3

#--------------------------安装包--------------------------------
#先解压python-rpm,并将帮移动到Packages,然后执行下面的命令
createrepo -d /root/Packages/
yum repolist
rm -rf /var/cache/yum
yum makecache
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make #------------------------编译安装python3----------------------------
#上传python3压缩包
tar -xzvf Python-3.6.5.tgz -C /tmp
cd /tmp
./configure --prefix=/usr/local
make all && make install
createrepo -d /root/Packages/
yum repolist
rm -rf /var/cache/yum
yum makecache #------------------------安装pip------------------------------
#上传压缩包
tar -xzf pip-18.1.tar.gz
cd pip-18.1
sudo python setup.py install

安装ffmpeg-rpm

#--------------------上传包,并移动到Packages ------------------------

createrepo -d /root/Packages/
yum repolist
rm -rf /var/cache/yum
yum makecache
yum install python-setuptools python-imaging MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel python-requests #--------------------------next----------------------------------
#上传moviepy包,并安装相应的包
pip install Pillow-5.2.0-cp36-cp36m-manylinux1_x86_64.whl
pip install decorator-4.3.0-py2.py3-none-any.whl
pip install tqdm-4.26.0-py2.py3-none-any.whl
pip install numpy-1.15.1-cp36-cp36m-manylinux1_x86_64.whl
tar -xzf imageio-2.4.1.tar.gz && rm imageio-2.4.1.tar.gz -f
tar -xzf moviepy-0.2.3.5.tar.gz && rm moviepy-0.2.3.5.tar.gz -f
cd imageio-2.4.1/ && python setup.py install
cd ../moviepy-0.2.3.5/ && python setup.py install
sudo yum install java-1.7.0-openjdk poppler-utils python-setuptools python-imaging MySQL-python mariadb-server python-memcached python-ldap python-urllib3 #--------------------------next----------------------------------
#上传boto包,并安装
cd boto
sudo python setup.py install
yum -y install java-1.7.0-openjdk
yum -y install java-1.8.0-openjdk
yum -y install poppler-utils
sudo easy_install pip
Searching for pip
Best match: pip 18.1
Processing pip-18.1-py2.7.egg
pip 18.1 is already the active version in easy-install.pth
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin
Using /usr/lib/python2.7/site-packages/pip-18.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
sudo pip install boto
Requirement already satisfied: boto in /usr/lib/python2.7/site-packages/boto-2.49.0-py2.7.egg (2.49.0) #--------------------------next----------------------------------

安装seafile

  • 上传包并解压
#--------------------------next----------------------------------
#上传包,并解压
tar -zxf seafile-pro-server_7.0.19_x86-64.tar.gz
cd seafile-pro-server-7.0.19/
  • 启动mysql服务
./setup-seafile-mysql.sh
Checking python on this machine ...
Checking python module: python-mysqldb ... Done.
Checking for java ...Done.
-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at
https://github.com/haiwen/seafile/wiki
Press ENTER to continue
-----------------------------------------------------------------
What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] seafile
What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 10.224.91.79
Where do you want to put your seafile data?
Please use a volume with enough free space
[ default "/data/seafile_pro/seafile-data" ]
Which port do you want to use for the seafile fileserver?
[ 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 ] 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 ]
verifying password of user root ... done
Enter the name for mysql user of seafile. It would be created if not exists.
[ default "seafile" ]
Enter the password for mysql user "seafile":
[ password for seafile ]
Enter the database name for ccnet-server:
[ default "ccnet-db" ]
Enter the database name for seafile-server:
[ default "seafile-db" ]
Enter the database name for seahub:
[ default "seahub-db" ]
---------------------------------
This is your configuration
---------------------------------
server name: seafile
server ip/domain: 10.224.91.79
seafile data dir: /data/seafile_pro/seafile-data
fileserver port: 8082
database: create new
ccnet database: ccnet-db
seafile database: seafile-db
seahub database: seahub-db
database user: seafile
---------------------------------
Press ENTER to continue, or Ctrl-C to abort
---------------------------------
Generating ccnet configuration ...
done
Successly create configuration dir /data/seafile_pro/ccnet.
Generating seafile configuration ...
Done.
done
Generating seahub configuration ...
----------------------------------------
Now creating ccnet database tables ...
----------------------------------------
----------------------------------------
Now creating seafile database tables ...
----------------------------------------
----------------------------------------
Now creating seahub database tables ...
----------------------------------------
creating seafile-server-latest symbolic link ... done
-----------------------------------------------------------------
Your seafile server configuration has been finished successfully.
-----------------------------------------------------------------
run seafile server: ./seafile.sh { start | stop | restart }
run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------
port of seafile fileserver: 8082
port of seahub: 8000
When problems occur, Refer to
https://github.com/haiwen/seafile/wiki
for information.
  • 启动seafile
./seafile.sh start
[root@localhost seafile-pro-server-7.0.19]# ./seafile.sh start
** Message: seafile-controller.c(1157): loading seafdav config from /data/seafile_pro/conf/seafdav.conf
[12/02/20 15:55:38] ../common/session.c(143): using config file /data/seafile_pro/conf/ccnet.conf
[12/02/20 15:55:38] ../common/license.c(406): Loading license file /data/seafile_pro/seafile-license.txt ..
[12/02/20 15:55:38] ../common/license.c(409): License file /data/seafile_pro/seafile-license.txt does not exist, allow at most 3 trial users
License file /data/seafile_pro/seafile-license.txt does not exist, allow at most 3 trial users
Starting seafile server, please wait ...
** Message: seafile-controller.c(1157): loading seafdav config from /data/seafile_pro/conf/seafdav.conf
Seafile server started
Done.
  • 启动seahub
./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
----------------------------------------
It's the first time you start the seafile server. Now let's create the admin account
----------------------------------------
What is the email for the admin account?
[ admin email ] demo@demo.com
What is the password for the admin account?
[ admin password ]
Enter the password again:
[ admin password again ]
----------------------------------------
Successfully created seafile admin
----------------------------------------
Seahub is started
Done.
  • 修改配置文件
vim conf/gunicorn.conf
#修改bindIP为0.0.0.0
# default localhost:8000
bind = "0.0.0.0:8000"
vim /etc/systemd/system/seafile.service
#添加以下配置
[Unit]
Description=Seafile Service
After=network.target mysql.service
Environment = “ LC_ALL = C”
[Service]
Type=oneshot
RemainAfterExit= yes
ExecStart=/data/seafile_pro/seafile-server-latest/seafile.sh start
ExecStart=/data/seafile_pro/seafile-server-latest/seahub.sh start
ExecStop=/data/seafile_pro/seafile-server-latest/seafile.sh stop
ExecStop=/data/seafile_pro/seafile-server-latest/seahub.sh stop
[Install]
WantedBy=multi-user.target
#保存退出
systemctl enable seafile
systemctl is-enabled seafile #查看状态

安装Office预览

#上传LibreOffice包,并解压
tar -xzf LibreOffice_6.4.7_Linux_x86-64_rpm.tar.gz
tar -xzf LibreOffice_6.4.7_Linux_x86-64_rpm_helppack_zh-CN.tar.gz
tar -xzf LibreOffice_6.4.7_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
cd LibreOffice_6.4.7.2_Linux_x86-64_rpm/RPMS/ && sudo yum install ./*.rpm /*
cd LibreOffice_6.4.7.2_Linux_x86-64_rpm_langpack_zh-CN/RPMS && sudo yum install ./*.rpm /*
cd LibreOffice_6.4.7.2_Linux_x86-64_rpm_helppack_zh-CN/RPMS && sudo yum install ./*.rpm /*

重启机器

重启后什么都不用动,服务器重启好后访问你的地址,查看是否可以访问并登陆,如果可以那就上传你的许可证吧。

问题解决

无法下载大文件

其实用默认的就行,比较开了比较耗服务器资源

vim conf/seafile.conf
#添加以下配置
[fileserver]
# 上传文件最大限制为200M,默认是无限制.
max_upload_size=200
# 最大下载目录限制为200M, 默认是100M. 还不够就往大的设置就好了,只要你的服务器吃得消
max_download_dir_size=200

参考链接

无法搜索文件

讲一下我的排错思路吧。

  • 首先查看一下es是否起来了
ps aux | grep -o [j]ava[[:space:]].*elasticsearch.pid$
  • 上面没有进程的话,那就是es没有起来。解决方案我使用的是官方的,

解决方案

  • 如果上面有进程的,那就看seahub的启动日志,看看什么报错
tail -f seahub.log
#Web界面操作一下看看什么报错了

比如我这就是自己漏掉了,忘记给office缓存文件权限了,然后还一个也是没有权限。给一下权限,不会的看看上一步官方文档,按照操作就行了。操作完毕后重启服务,再看下有没有报错,我这给了权限后seahub就没有报错了,不过web界面报错了,好像报Sorry, but the requested page is unavailable due to a server hiccup. Our engineers have been notified, so check back later.反正就是登陆界面都访问不了,报错是不是这个就不是很确定了。

  • 查看配置文件

查看一下配置文件是不是都对的。我这是·ccnet.conf配置文件被我瞎改改改坏掉了。把URL改成自己的ip+端口就好了,如:

重启,访问。搜索索引需要等待一会才行。

以上是我解决几个问题的思路大家可以参考一下,如有不对请指正。

安装seafile记录文档的更多相关文章

  1. Docker版EKL安装记录文档

    Docker版EKL安装记录文档 拉取已下三个镜像 docker.io/logstash 7.5.2 b6518c95ed2f 6 months ago 805 MB docker.io/kibana ...

  2. Mongo-Connector 安装及使用文档

    # Mongo-Connector 安装及使用文档 ------ > * 工具介绍> * 安装前准备> * 安装步骤> * 命令详解> * 有可能的坑> * 其他文 ...

  3. k8s实验操作记录文档

    k8s实验操作记录文档,仅供学习参考! 文档以实验操作的过程及内容为主进行记录,涉及少量的介绍性文字(来自网络开源). 仅汇总主题所有链接,详细内容查看需要切换到相关链接.https://github ...

  4. 英文VS2010安装中文版MSDN文档方法

    英文VS2010安装中文版MSDN文档方法 2010-06-01 11:52 by 李永京, 51409 阅读, 50 评论, 收藏, 编辑 在2010年4月12号发布Visual Studio 20 ...

  5. P6 EPPM 16 R1安装和配置文档

    白桃花心木P6企业项目组合管理文档库  描述 链接 下载 零件号  16 R1用户和集成文档 查看库 下载 E68199-01 16 R1安装和配置文档 查看库 下载 E68198-01 描述 链接 ...

  6. pyqt助手中安装Qt帮助文档

    一.个人安装环境 1.Windows7x64_SP1 2.anaconda2.5.0 + python2.7(anaconda集成,不需单独安装) 3.pyinstaller3.0 4.通过Anaco ...

  7. matlab2018a安装后帮助文档打不开解决方法

    安装matlab2018a破解版后,帮助文档提示需要许可证问题(破解版没有可用许可证): 解决方法是把文档设置为离线即可(预设---->帮助---->安装在本地---->小窗口)

  8. Where is the kernel documentation?; Ubuntu 上如何安装 linux 内核文档;fedora 上如何安装linux内核文档?

    有时候,linux内核文档对我们很重要,我们可以在linux系统中安装,并及时查看: 参考链接:https://askubuntu.com/questions/841043/where-is-the- ...

  9. 从架构开始谈dubbo(二)-----zookeeper安装和dubbo文档查阅

    一.Zookeeper下载与安装 1.官网地址下载 https://zookeeper.apache.org/ 2.找到图中英文位置(英文不好,安图操作就好了,计算机很多东西如果你没法很好的记忆,就画 ...

随机推荐

  1. Python+Selenium(1)- 环境搭建

    一,Selenium 简介 Selenium是目前最流行的web自动化测试工具,也常用于网络爬虫,已经更新到3以上的版本. 1,组件 它提供了以下web自动化测试组件: Selenium IDE,Fi ...

  2. Skip Lists: A Probabilistic Alternative to Balanced Trees 阅读笔记

    论文地址:https://15721.courses.cs.cmu.edu/spring2018/papers/08-oltpindexes1/pugh-skiplists-cacm1990.pdf ...

  3. Spider_知识目录_基础

    知识目录 静态网页抓取 Spider_基础总结1_Request(get/post__url传参_headers_timeout)+Reponse Spider_基础总结2_Requests异常 Sp ...

  4. BATJTMD,大厂招聘,都招什么样Java程序员?

    作者:小傅哥 博客:https://bugstack.cn 沉淀.分享.成长,让自己和他人都能有所收获! 一.前言 Java学到什么程度可以找工作? 最近总看到类似这样的问题,也有一些工作3年左右的小 ...

  5. 没有真实串口设备时使用"虚拟串口驱动"调试你的串口代码

    目录 前言 示例代码 总结 前言 很多时候需要编写串口代码,但是又没有真实串口设备来调试代码.以及本身就是要操作2个串口的情况,可以使用"虚拟串口驱动"工具方便的调试代码. 使用方 ...

  6. IDEA与Eclipse创建struts项目

    1.IDEA创建struts项目 这里再构建struts项目是选择jar包出问题了,可以重新配置 创建页面和action配置struts.xml 启动tomcat,浏览器中运行 具体参考: https ...

  7. 315. Count of Smaller Numbers After Self(二分或者算法导论中的归并求逆序数对)

    You are given an integer array nums and you have to return a new counts array. The counts array has ...

  8. new与malloc的10点区别(转)

    1. 申请的内存所在位置 new操作符从自由存储区(free store)上为对象动态分配内存空间,而malloc函数从堆上动态分配内存.自由存储区是C++基于new操作符的一个抽象概念,凡是通过ne ...

  9. Java入门基础知识点总结(详细篇)

    Java入门基础知识点总结(详细篇)~~~~~目录 1.1 图解 1.1.1 Java基础知识点 1.1.2 Java基础语法的相关内容 1.2 关键字 1.3 标识符 1.3.1 标识符概念 1.3 ...

  10. Python_字符串处理方法

    1.字符串转换 #strcpy(sStr1,sStr2) sStr1 = 'strcpy' sStr2 = sStr1 sStr1 = 'strcpy2' print sStr2 1.字符串复制 #s ...