Da ich mir immer mal wieder Dropbox alternativen anschaue bzw. suche, will ich heute mal zeigen, wie man eine Installation von Seafile unter CentOS 7 macht.
Schritt 1: httpd
Als erstes brauchen wir den Webserver. Wer schon ein paar Artikel auf dem Blog verfolgt hat weis ja mittlerweile wie das geht.
1 | yum install httpd |
Schritt 2: mariadb
Direkt danach brauchen wir auch noch einen Datenbankserver.
1 | yum install mariadb-server |
Schritt 3: Python Module
Für Seafile werden noch einige zusätzliche Python Module benötigt. Diese können mit dem folgenden Befehl nachinstalliert werden:
1 | yum install python-imaging MySQL-python python-simplejson python-setuptools |
Schritt 4: Seafile User anlegen
Für Seafile legen wir nun noch einen extra User an und vergeben ein Passwort für diesen:
1 2 | adduser seafile passwd seafile |
Schritt 5: Datenbanken anlegen
Als nächstes legen wir noch ein paar Datenbanken für Seafile an. Anschließend noch einen extra User anlegen und diesem den Zugriff auf die Datenbank erlauben.
1 2 3 4 5 6 7 8 9 10 11 | $ mysql -u root -p mysql> create database `ccnet-db`; mysql> create database `seafile-db`; mysql> create database `seahub-db`; mysql> create user 'seafile'@'localhost' identified by 'password'; mysql> GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@`localhost`; mysql> GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@`localhost`; mysql> GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@`localhost`; mysql> FLUSH PRIVILEGES; mysql> exit; |
Schritt 6: Download Seafile Server
Jetzt kommen wir so langsam zur eigentlichen Installation von Seafile. Zuerst landen wir die Daten für den Server herunter. Diese entpacken wir anschließend und wechseln in das neue Verzeichniss.
1 2 3 4 | su - seafile wget https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_5.1.1_x86-64.tar.gz tar xfz seafile-server_5.1.1_x86-64.tar.gz cd seafile-server-5.1.1/ |
Schritt 7: Seafile Datenbank Script
1 | ./setup-seafile-mysql.sh |
Nachdem wir das Skript ausgeführt wird, müssen wir eine Reihe von Daten eingeben. Hier mal die Ausgabe von mir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | [root@localhost seafile-server-5.1.1]# ./setup-seafile-mysql.sh Checking python on this machine ... Checking python module: setuptools ... Done. Checking python module: python-imaging ... Done. Checking python module: python-mysqldb ... 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 ] 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.128.100.149 Where do you want to put your seafile data? Please use a volume with enough free space [ default "/root/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 ] 2 What is the host of mysql server? [ default "localhost" ] What is the port of mysql server? [ default "3306" ] Which mysql user to use for seafile? [ mysql user for seafile ] seafile What is the password for mysql user "seafile"? [ password for seafile ] verifying password of user seafile ... done Enter the existing database name for ccnet: [ ccnet database ] ccnet-db verifying user "seafile" access to database ccnet-db ... done Enter the existing database name for seafile: [ seafile database ] seafile-db verifying user "seafile" access to database seafile-db ... done Enter the existing database name for seahub: [ seahub database ] seahub-db verifying user "seafile" access to database seahub-db ... done --------------------------------- This is your configuration --------------------------------- server name: Seafile server ip/domain: 10.128.100.149 seafile data dir: /root/seafile-data fileserver port: 8082 database: use existing 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 /root/ccnet. Generating seafile configuration ... Done. done Generating seahub configuration ... ---------------------------------------- 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 | stop | restart } ----------------------------------------------------------------- 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. [root@localhost seafile-server-5.1.1]# |
Schritt 8: Seafile Server installieren
Jetzt können wir den Seafile Server starten.
1 2 3 4 | su - seafile cd seafile-server-latest/ ./seafile.sh start ./seahub.sh start |
Beim Ausführen der seahub.sh werden wir noch nach einer E-Mail Adresse und einem Passwort für den Admin Account gefragt.
Schritt 9: Test
Nun können wir Seafile im Browser aufrufen. Dafür einfach die IP Adresse und den Port 8000 angeben. (z.B. http://10.28.100.149:8000/) Wir sehen nun einen Login Screen. Hier können wir uns mit dem zuvor angelegten Admin User einloggen.
Hat dies Erfolgreich funktioniert, kann Seafile nun benutzt werden.
[…] einiger Zeit habe ich auf dem Blog bereits vorgestellt, wie man einen ownCloud oder seafile Server installiert. Die nächste Software in der Reihe ist nun Nextcloud. Bei Nextcloud handelt es […]