Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile seafile on tinycolinux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to compile seafile on tinycolinux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Five pieces of compiling seafile:

We first compile GCC481 and CMAKE,python+pip,nginx, etc., and prepare autotools support and git support for gcc:

Autogen.tcz,automake.tcz,autoconf.tcz,libtool.tcz,intltool.tcz,perl5.tcz,git.tcz,openssl-1.0.0.tcz

And then compiled five pieces, and the version I downloaded is:

Jansson-2.10.tar.gz (a json parsing library, C project, cmake or autotools build)

Libevhtp-1.1.6.tar.gz (an enhanced libevent http library, project c, cmake build)

Ccnet-server-6.2.5-server.tar.gz (seafile's own rpc library, built by as py lib,autotools, a mixed project of c and py)

Libsearpc-3.0-latest.tar.gz (seafile rpc library, as pylib,autotools build for c+py mixed project)

Seafile-6.1.1.tar.gz (seafile, c+py hybrid project as pylib,autotools build.)

Seafile-server-6.2.5-server.tar.gz (seafile's business server responsible for file transfer, built by c+py hybrid project as pylib,autotools)

Seahub-6.2.5-server.tar.gz (the front end of pure py,django app,seafile)

According to dependency and sequential compilation, the use of autotools is generally first sudo autogen.sh, then. / configure, if the sudo autogen.sh can not produce makefile.in is basically a libtool problem, make sure that a good libtool.tcz to solve it, one. / configure-- prefix=/usr/local/seafile, basically can be completed, the use of cmake generally requires shadowbuild, that is, sudo mkdir b to src, and then cd bmenade sudo cmake. & & sudo cmake build., where evhtp wants to sudo cmake-DEVHTP_DISABLE_SSL=ON.., cancel the compilation requirement of three test in cmakelists.txt in libevhtp-1.1.6.tar.gz. The following tcz is called when compiling configure or link:

Acl-dev.tcz,acl.tcz,bzip2-dev.tcz,bzip2-lib.tcz,bzip2.tcz,curl-dev.tcz,curl.tcz,expat2-dev.tcz,expat2.tcz,fuse.tcz,glib2-dev.tcz,glib2.tcz,guile-dev.tcz,guile.tcz

Libarchive-dev.tcz,libarchive.tcz,libattr.tcz,libevent-dev.tcz,libevent.tcz,libffi-dev.tcz,libffi.tcz,libltdl.tcz,liblzma-dev.tcz,liblzma.tcz,libssh3-dev.tcz,libssh3.tcz,popt-dev.tcz,popt.tcz,vala.tcz

Basically, it can be found in the 4.x tinycorelinux tcz repos. Tidy up the correspondence by yourself, assuming that in the first step, all of the above five except seahub are installed to / usr/local/seafile, and all the successful results will be as follows: generate all kinds of bin under / usr/local/bin, generate so,la for ccnet,seafile,serpc in / usr/local/seafile/lib/, and even generate seafile-admin in / usr/local/bin: there is no py suffix shebang for py, which is used as a script. This script is very important. I'll talk about it in more detail below.

Install and configure seafile and start it in nginx+uwsgi mode:

First, create a repository (just like entering the web/database/manager deleted data suite when odoo is installed or reconfigured). Seafile-admin is the general tool used to generate this suite and is responsible for calling manage.py under the root of seahub to start it. Let's use the official method-seafile-admin to generate the suite and start it:

Create a new data folder in any directory, then generate the empty file structure of data/seafile-server/seahub, rename the seahub in the five big pieces and replace the seahub in / data/seafile-server/seahub, and the four big pieces are either used as backends or sudo make install to and as part of the python lib,seahub are also used as python lib, so export PYTHONPATH=/xxx/seafile-server/seahub/thirdpart to remove all these invisible parts After that, seahub is the equivalent of the entire seafile website. -now, you can execute the master script that generates the data warehouse (let's call it the data suite), which is the seafile-admin setup. After answering all the questions, it is found that the correct configuration is completed, and the pip install gnicore can be accessed. We can see that the data of gnicore is forwarded with nginx in the help document. Now, we replace the django method with nginx+uwsgi, eliminating the need for gunicore. This is actually a django nginx uwsgi collocation problem.

First of all, we have the following findings: / usr/local/seafile/data/seafile-server/seahub/seahub has a wsgi.py and settings.py, which is in line with the way we started it with nginx+uwsgi in "release odoo", that is to say, it may naturally support pure uwsgi and seafile also retains this way, so is it or not?

By watching seafile-admin, we further clarify this assumption: it is responsible for the generation of configuration logic (django app settings), and the manage.py it calls is only a wrapper of wsgi.py (for unifying gunicore,fastcgi,etc.. in seafile-admin), so in the call path of seafile-admin- > manage.py- > wsgi.py, seafile-admin is not only a tool for generating suites, but also for unified startup. Originally, all of this: the part of settings.py+ used to read configuration in seafile-admin is responsible for starting part of wsgi, in the case of no external wrapper, namely seafile-admin, they are separated and put directly into the settings.py and wsgi.py under the root of seahub:

Now that you have the data suite and suite configuration, it is enough to try to configure uwsgi and nginx directly to start the seafile under this suite. Others can be successful as described in "odoo". :

Nginx configuration logic:

Include uwsgi_params;uwsgi_param UWSGI_CHDIR / usr/local/seafile/data/seafile-server/seahub/seahub;uwsgi_param UWSGI_MODULE uwsgi-server; (no .py) uwsgi_param UWSGI_CALLABLE application;uwsgi_pass 127.0.0.1 uwsgi_param UWSGI_CALLABLE application;uwsgi_pass 8000

Logic to start:

/ usr/local/seafile/sbin/nginx/usr/local/seafile/bin/uwsgi-- socket=:8000-- master-- uid=tc-- gid=root-- daemonize=/usr/local/seafile/bin/uwsgi.log "how to compile seafile on tinycolinux" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report