centos7一键安装报错

[root@cloud ky]# bash seafile-server-centos-7-amd64-http 6.0.10

This script installs the community edition of the Seafile Server on a Centos 7 64bit

  • Newest Seafile server version, MariaDB, Memcached, NGINX -

This installer is meant to run on a freshly installed machine
only. If you run it on a production server things can and
probably will go terrible wrong and you will loose valuable
data!

For questions or suggestions please contact us at
support@seafile.com


Possible options:
1 = Seafile Community (Free) Edition (CE)
2 = Seafile Professional Edition (PRO)

  1. CE
  2. PRO
  3. ABORT
    Which Seafile version would you like to install? 2

This script will install Seafile Professional Edition for you.

Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

确认网络没问题吗

字数补丁

安装seafile之前先做了centos的升级,安装了一堆软件

[root@localhost ky]# yum install epel-release -y
Loaded plugins: fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - “Failed to connect to 2001:1b48:203::4:10: Network is unreachable”

发现问题好像是yum install不支持代理造成的,火狐打开这个url正常,但是yum失败

解决了代理问题,现在又卡在mysql部分,是密码参数不对?

Checking for java …Done.

usage: setup-seafile-mysql.py [-h] [-n SERVER_NAME] [-i SERVER_IP]
[-p FILESERVER_PORT] [-d SEAFILE_DIR]
[-e USE_EXISTING_DB] [-o MYSQL_HOST]
[-t MYSQL_PORT] [-u MYSQL_USER]
[-w MYSQL_USER_PASSWD] [-q MYSQL_USER_HOST]
[-r MYSQL_ROOT_PASSWD] [-c CCNET_DB]
[-s SEAFILE_DB] [-b SEAHUB_DB]
setup-seafile-mysql.py: error: argument -r/–mysql-root-passwd: expected one argument

自己修改了一下脚本,最后启动seahub的时候报错

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …


Successfully created seafile admin

Seahub is started

Done.

Stopping seahub …
Done.

Stopping seafile server …
Done.
Job for seahub.service failed because the control process exited with error code. See “systemctl status seahub.service” and “journalctl -xe” for details.

[kyy@localhost ~]$ systemctl status seahub.service
● seahub.service - Seafile Seahub
Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-06-01 03:11:30 PDT; 36min ago
Process: 109956 ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start-fastcgi 8000 (code=exited, status=1/FAILURE)
Main PID: 109956 (code=exited, status=1/FAILURE)

[kyy@localhost ~]$ journalctl -xe
Jun 01 03:16:41 localhost.localdomain python2.7[110443]: detected unhandled Python exception in ‘/opt/seafile/seafile-pro-server-6.0.10/pro/python/seafevents/main.py’
Jun 01 03:16:41 localhost.localdomain abrt-server[110452]: Not saving repeating crash in ‘/opt/seafile/seafile-pro-server-6.0.10/pro/python/seafevents/main.py’
Jun 01 03:16:51 localhost.localdomain python2.7[110453]: detected unhandled Python exception in ‘/opt/seafile/seafile-pro-server-6.0.10/pro/python/seafevents/main.py’
Jun 01 03:16:51 localhost.localdomain abrt-server[110462]: Executable ‘/opt/seafile/seafile-pro-server-6.0.10/pro/python/seafevents/main.py’ doesn’t belong to any package and ProcessUnpackaged is set to ‘no’
Jun 01 03:16:51 localhost.localdomain abrt-server[110462]: ‘post-create’ on ‘/var/spool/abrt/Python-2017-06-01-03:16:51-110453’ exited with 1
Jun 01 03:16:51 localhost.localdomain abrt-server[110462]: Deleting problem directory ‘/var/spool/abrt/Python-2017-06-01-03:16:51-110453’

试试手工启动服务

cd seafile-server-latest
./seafile.sh restart
./seahub.sh restart-fastcgi

还是出错

[root@localhost seafile-server-latest]# ./seafile.sh restart

Stopping seafile server …
** Message: seafile-controller.c(1091): loading seafdav config from /opt/seafile/conf/seafdav.conf

[06/01/17 05:08:26] …/common/session.c(139): using config file /opt/seafile/conf/ccnet.conf
Starting seafile server, please wait …
** Message: seafile-controller.c(1091): loading seafdav config from /opt/seafile/conf/seafdav.conf

Seafile server started

Done.
[root@localhost seafile-server-latest]# ./seahub.sh restart-fastcgi

Seahub is not running
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/init.py”, line 354, in execute_from_command_line
utility.execute()
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/init.py”, line 303, in execute
settings.INSTALLED_APPS
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/conf/init.py”, line 48, in getattr
self._setup(name)
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/conf/init.py”, line 44, in _setup
self._wrapped = Settings(settings_module)
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/conf/init.py”, line 92, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/importlib-1.0.2-py2.6.egg/importlib/init.py”, line 37, in import_module
import(name)
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/seahub/init.py”, line 3, in
from handlers import repo_created_cb, repo_deleted_cb
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/seahub/handlers.py”, line 17, in
from utils import SeafEventsSession
File “/opt/seafile/seafile-pro-server-6.0.10/seahub/seahub/utils/init.py”, line 473, in
SeafEventsSession = seafevents.init_db_session_class(EVENTS_CONFIG_FILE)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/seafevents/db.py”, line 89, in init_db_session_class
Base.metadata.create_all(engine)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/sql/schema.py”, line 3848, in create_all
tables=tables)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 1922, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File “/usr/lib64/python2.7/contextlib.py”, line 17, in enter
return self.gen.next()
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 1915, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2106, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2145, in _wrap_pool_connect
e, dialect, self)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 1456, in _handle_dbapi_exception_noconnection
exc_info
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/util/compat.py”, line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2141, in _wrap_pool_connect
return fn()
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 387, in connect
return _ConnectionFairy._checkout(self)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 516, in checkout
rec = pool._do_get()
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 1138, in _do_get
self._dec_overflow()
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/util/langhelpers.py”, line 60, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 1135, in _do_get
return self._create_connection()
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 333, in _create_connection
return _ConnectionRecord(self)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 461, in init
self.__connect(first_connect_check=True)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 651, in __connect
connection = pool._invoke_creator(self)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/strategies.py”, line 105, in connect
return dialect.connect(*cargs, **cparams)
File “/opt/seafile/seafile-pro-server-6.0.10/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py”, line 385, in connect
return self.dbapi.connect(*cargs, **cparams)
File “/usr/lib64/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1045, “Access denied for user ‘seafile’@‘localhost’ (using password: NO)”)
Error:Seahub failed to start.

从日志看是 MySQL 的用户名密码错了。你贴一下 conf 目录下的 seahub_settings.py 和 seafevent.conf 这两个文件

重装已经解决,应该还是因为yum代理问题导致后面一系列问题,建议在文档里面提示一下,让菜鸟少走弯路

[DATABASE]
type = mysql
host = 127.0.0.1
port = 3306
username = seafile
password = UashaeB6
name = seahub_db

[Audit]
enable = true

[INDEX FILES]
enabled = true
interval = 10m

If true, indexes the contents of office/pdf files while updating search index

Note: If you change this option from “false” to “true”, then you need to clear the search index and update the index again. See the FAQ for details.

index_office_pdf = true

[OFFICE CONVERTER]
enabled = true
workers = 1

how many pages are allowed to be previewed online. Default is 50 pages

max-pages = 50

the max size of documents allowed to be previewed online, in MB. Default is 10 MB

Previewing a large file (for example >30M) online is likely going to freeze the browser.

max-size = 10

[SEAHUB EMAIL]
enabled = true

interval of sending Seahub email. Can be s(seconds), m(minutes), h(hours), d(days)

interval = 30m

-- coding: utf-8 --

SECRET_KEY = “_qkvj_v56k#tb)bt_q-*12&g-4!1(@!#i#(1x69%$&utjsqek#”

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub_db’,
‘USER’: ‘seafile’,
‘PASSWORD’: ‘UashaeB6’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}

CACHES = {
‘default’: {
‘BACKEND’: ‘django.core.cache.backends.memcached.MemcachedCache’,
‘LOCATION’: ‘127.0.0.1:11211’,
}
}

EMAIL_USE_TLS = False

EMAIL_HOST = ‘localhost’

EMAIL_HOST_USER = ‘’

EMAIL_HOST_PASSWORD = ‘’

EMAIL_PORT = ‘25’

DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

SERVER_EMAIL = EMAIL_HOST_USER

TIME_ZONE = ‘Asia/Shanghai’
SITE_BASE = ‘http://127.0.0.1
SITE_NAME = ‘Seafile Server’
SITE_TITLE = ‘Seafile Server’
SITE_ROOT = ‘/’
ENABLE_SIGNUP = False
ACTIVATE_AFTER_REGISTRATION = False
SEND_EMAIL_ON_ADDING_SYSTEM_MEMBER = True
SEND_EMAIL_ON_RESETTING_USER_PASSWD = True
CLOUD_MODE = False
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
SESSION_SAVE_EVERY_REQUEST = False
SESSION_EXPIRE_AT_BROWSER_CLOSE = False

FILE_SERVER_ROOT = ‘http://127.0.0.1/seafhttp