wiki:seafile
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| wiki:seafile [2022/08/22 17:56] – mho | wiki:seafile [2022/08/22 18:10] (aktuell) – mho | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| < | < | ||
| apt update && apt install mariadb-server mariadb-client | apt update && apt install mariadb-server mariadb-client | ||
| + | </ | ||
| mysql_secure_installation | mysql_secure_installation | ||
| Zeile 10: | Zeile 11: | ||
| Reload privilege tables now? [Y/n] y | Reload privilege tables now? [Y/n] y | ||
| + | < | ||
| mysql -u root -p | mysql -u root -p | ||
| Zeile 41: | Zeile 42: | ||
| bash setup-seafile-mysql.sh | bash setup-seafile-mysql.sh | ||
| + | </ | ||
| [ server name ] Seafile | [ server name ] Seafile | ||
| [ This server' | [ This server' | ||
| Zeile 56: | Zeile 57: | ||
| [ seahub database ] seahub_server | [ seahub database ] seahub_server | ||
| + | < | ||
| echo " | echo " | ||
| echo " | echo " | ||
| echo " | echo " | ||
| source ~/.bashrc | source ~/.bashrc | ||
| + | </ | ||
| Configuring the Apache Web Server | Configuring the Apache Web Server | ||
| Zeile 67: | Zeile 68: | ||
| To begin forwarding requests, you will need to enable the proxy_http module in the Apache configuration. This module provides features for proxying HTTP and HTTPS requests. The following command will enable the module: | To begin forwarding requests, you will need to enable the proxy_http module in the Apache configuration. This module provides features for proxying HTTP and HTTPS requests. The following command will enable the module: | ||
| + | < | ||
| sudo a2enmod proxy_http | sudo a2enmod proxy_http | ||
| + | </ | ||
| Note: The Apache rewrite and ssl modules are also required for this setup. You have already enabled these modules as part of configuring Let’s Encrypt in the second Apache tutorial listed in the prerequisites section. | Note: The Apache rewrite and ssl modules are also required for this setup. You have already enabled these modules as part of configuring Let’s Encrypt in the second Apache tutorial listed in the prerequisites section. | ||
| Zeile 75: | Zeile 76: | ||
| Open the configuration file in a text editor: | Open the configuration file in a text editor: | ||
| + | < | ||
| sudo nano / | sudo nano / | ||
| + | </ | ||
| The lines from ServerAdmin to SSLCertificateKeyFile are part of the initial Apache and Let’s Encrypt configuration that you set up in the prerequisite tutorials. Add the highlighted content, beginning at Alias and ending with the ProxyPassReverse directive: | The lines from ServerAdmin to SSLCertificateKeyFile are part of the initial Apache and Let’s Encrypt configuration that you set up in the prerequisite tutorials. Add the highlighted content, beginning at Alias and ending with the ProxyPassReverse directive: | ||
| / | / | ||
| Zeile 227: | Zeile 228: | ||
| Create a systemd service file for the Seahub web interface: | Create a systemd service file for the Seahub web interface: | ||
| + | < | ||
| sudo nano / | sudo nano / | ||
| + | </ | ||
| This is similar to the Seafile service. The only difference is that the web interface is started after the Seafile service. Add the following content to this file: | This is similar to the Seafile service. The only difference is that the web interface is started after the Seafile service. Add the following content to this file: | ||
| + | < | ||
| Create / | Create / | ||
| - | < | ||
| [Unit] | [Unit] | ||
| Description=Seafile hub | Description=Seafile hub | ||
| Zeile 253: | Zeile 254: | ||
| Finally, to enable both the Seafile and Seahub services to start automatically at boot, run the following commands: | Finally, to enable both the Seafile and Seahub services to start automatically at boot, run the following commands: | ||
| + | < | ||
| sudo systemctl enable seafile.service | sudo systemctl enable seafile.service | ||
| sudo systemctl enable seahub.service | sudo systemctl enable seahub.service | ||
| + | </ | ||
| When the server is rebooted, Seafile will start automatically. | When the server is rebooted, Seafile will start automatically. | ||
| At this point, you have completed setting up the server, and can now test each of the services. | At this point, you have completed setting up the server, and can now test each of the services. | ||
| - | Step 7 — Testing File Syncing and Sharing Functionality | + | |
| + | ***** Testing File Syncing and Sharing Functionality | ||
| In this step, you will test the file synchronization and sharing functionality of the server you have set up and ensure they are working correctly. To do this, you will need to install the Seafile client program on a separate computer and/or a mobile device. | In this step, you will test the file synchronization and sharing functionality of the server you have set up and ensure they are working correctly. To do this, you will need to install the Seafile client program on a separate computer and/or a mobile device. | ||
| Zeile 310: | Zeile 312: | ||
| Install and enable apache modules: | Install and enable apache modules: | ||
| - | + | < | |
| - | # Ubuntu | + | sudo a2enmod rewrite |
| - | $ sudo a2enmod rewrite | + | sudo a2enmod proxy_http |
| - | $ sudo a2enmod proxy_http | + | </ |
| Important: Due to the security advisory published by Django team, we recommend to disable GZip compression to mitigate BREACH attack. No version earlier than Apache 2.4 should be used. | Important: Due to the security advisory published by Django team, we recommend to disable GZip compression to mitigate BREACH attack. No version earlier than Apache 2.4 should be used. | ||
| Configuring Apache¶ | Configuring Apache¶ | ||
| Modify Apache config file. For CentOS, this is vhost.conf. For Debian/ | Modify Apache config file. For CentOS, this is vhost.conf. For Debian/ | ||
| + | < | ||
| < | < | ||
| ServerName seafile.example.com | ServerName seafile.example.com | ||
| Zeile 350: | Zeile 351: | ||
| ProxyPassReverse / http:// | ProxyPassReverse / http:// | ||
| </ | </ | ||
| + | </ | ||
| Getting a Let's Encrypt certificate¶ | Getting a Let's Encrypt certificate¶ | ||
| Zeile 356: | Zeile 357: | ||
| First, go to the Certbot website and choose your web server and OS. | First, go to the Certbot website and choose your web server and OS. | ||
| - | |||
| - | grafik | ||
| - | |||
| Second, follow the detailed instructions then shown. | Second, follow the detailed instructions then shown. | ||
| - | |||
| - | grafik | ||
| We recommend that you get just a certificate and that you modify the Apache configuration yourself: | We recommend that you get just a certificate and that you modify the Apache configuration yourself: | ||
| + | < | ||
| sudo certbot --apache certonly | sudo certbot --apache certonly | ||
| + | </ | ||
| Follow the instructions on the screen. | Follow the instructions on the screen. | ||
| Zeile 373: | Zeile 369: | ||
| To use HTTPS, you need to enable mod_ssl: | To use HTTPS, you need to enable mod_ssl: | ||
| - | + | < | |
| - | $ sudo a2enmod ssl | + | sudo a2enmod ssl |
| + | </ | ||
| Then modify your Apache configuration file. Here is a sample: | Then modify your Apache configuration file. Here is a sample: | ||
| < | < | ||
| Zeile 411: | Zeile 407: | ||
| </ | </ | ||
| Finally, make sure the virtual host file does not contain syntax errors and restart Apache for the configuration changes to take effect: | Finally, make sure the virtual host file does not contain syntax errors and restart Apache for the configuration changes to take effect: | ||
| + | < | ||
| sudo service apache2 restart | sudo service apache2 restart | ||
| + | </ | ||
| Modifying ccnet.conf¶ | Modifying ccnet.conf¶ | ||
| Zeile 433: | Zeile 429: | ||
| Add the following line in the [fileserver] block on seafile.conf in / | Add the following line in the [fileserver] block on seafile.conf in / | ||
| + | < | ||
| host = 127.0.0.1 | host = 127.0.0.1 | ||
| + | </ | ||
| After his change, the file server only accepts requests from Apache. | After his change, the file server only accepts requests from Apache. | ||
| Starting Seafile and Seahub¶ | Starting Seafile and Seahub¶ | ||
| Restart the seaf-server and Seahub for the config changes to take effect: | Restart the seaf-server and Seahub for the config changes to take effect: | ||
| - | + | < | |
| - | $ su seafile | + | su seafile |
| - | $ cd / | + | cd / |
| - | $ ./ | + | ./ |
| - | $ ./seahub.sh restart | + | ./seahub.sh restart |
| - | + | </ | |
wiki/seafile.1661183813.txt.gz · Zuletzt geändert: 2022/08/22 17:56 von mho