Solved SeaFile server on FreeBSD

HI,

I am trying to install net-mgmt/seafile-server
pkg install seafile-server
cd /usr/local/www/haiwen/seafile-server
./setup-seafile-mysql.sh
Code:
Checking python on this machine ...
  Checking python module: setuptools ... Done.
  Checking python module: python-imaging ...
 python-imaging  is not installed, Please install it first.

On Debian/Ubntu: apt-get install python-imaging
On CentOS/RHEL: yum install python-imaging


Error occured during setup.
Please fix possible problems and run the script again.
pkg search python-imaging is not returning anything.

Could anyone please advise
 
Python ports typically begin with py-*, but there's no py-imaging either. Not any more at least, graphics/py-imaging was removed about 2 years ago because it was unmaintained upstream. The deprecation message suggests using graphics/py-pillow instead.

I don't know if SeaFile will accept that though but it's worth a try.
 
None of the following packages help:
pkg install py27-plone.app.imaging
pkg install py36-pillow

/usr/local/www/haiwen/seafile-server/setup-seafile-mysql.sh
Code:
#!/usr/local/bin/bash

########
### This script is a wrapper for setup-seafile-mysql.py
########

set -e

SCRIPT=$(readlink -f "$0")
INSTALLPATH=$(dirname "${SCRIPT}")

cd "$INSTALLPATH"

python_script=setup-seafile-mysql.py

function err_and_quit () {
    printf "\n\n\033[33mError occured during setup. \nPlease fix possible problems and run the script again.\033[m\n\n"
    exit 1;
}

function check_python_executable() {
    if [[ "$PYTHON" != "" && -x $PYTHON ]]; then
        return 0
    fi

    if which python2.7 2>/dev/null 1>&2; then
        PYTHON=python2.7
    elif which python27 2>/dev/null 1>&2; then
        PYTHON=python27
    else
        echo
        echo "Can't find a python executable of version 2.7 or above in PATH"
        echo "Install python 2.7+ before continue."
        echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it"
        echo
        exit 1
    fi
}

function check_python_module () {
    module=$1
    name=$2
    hint=$3
    printf "  Checking python module: ${name} ... "
    if ! $PYTHON -c "import ${module}" 2>/dev/null 1>&2; then
        echo
        printf "\033[33m ${name} \033[m is not installed, Please install it first.\n"
        if [[ "${hint}" != "" ]]; then
            printf "${hint}"
            echo
        fi
        err_and_quit;
    fi
    echo -e "Done."
}

function check_python () {
    echo "Checking python on this machine ..."
    check_python_executable
    if ! which $PYTHON 2>/dev/null 1>&2; then
        echo "No $PYTHON found on this machine. Please install it first."
        err_and_quit;
    else
        if ($Python --version 2>&1 | grep "3\\.[0-9].\\.[0-9]") 2>/dev/null 1>&2 ; then
            printf "\033[33m Python version 3.x \033[m detected\n"
            echo "Python 3.x is not supported. Please use python 2.x. Now quit."
            err_and_quit;
        fi

        if [[ $PYTHON == "python2.6" ]]; then
            py26="2.6"
        fi
        hint="\nOn Debian/Ubntu: apt-get install python-setuptools\nOn CentOS/RHEL: yum install python${py26}-distribute"
        check_python_module pkg_resources setuptools "${hint}"

        hint="\nOn Debian/Ubntu: apt-get install python-imaging\nOn CentOS/RHEL: yum install python${py26}-imaging"
        check_python_module PIL python-imaging "${hint}"

        hint='\nOn Debian/Ubuntu:\n\nsudo apt-get install python-mysqldb\n\nOn CentOS/RHEL:\n\nsudo yum install MySQL-python'
        check_python_module MySQLdb python-mysqldb "${hint}"
    fi
    echo
}

check_python;

export PYTHON=$PYTHON

exec $PYTHON "$python_script" "$@"
I use tcsh shell but have /shells/bash install.. is that a problem?
I never used python before so not sure what the above scrip does.

Can I set the database and the other bits manually?
 
If I look at the pkg-message you need to install www/seahub. Then follow the pkg-message instructions from that.
 
I looked at nextcloud but found it too much in our case.
We will be using seafile as google drive replacement so will not be using all the features that nextcloud as to offer.
 
i was looking for a cloud solution as file storage and found onecloud (nextcloud) as one possible way. So my question is is seafile-server have the same functionality as nextcloud?

I am running Seafile Pro in Debian Linux in FreeBSD Bhyve. Seafile had some issues with CentOS and Ubuntu in Bhyve. I've installed Seafile on FreeBSD but I wanted the 'Pro' feature that I can read the docx, pdf, and other files on the web. The 'standard' Seafile for FreeBSD can only display pictures and text file. There's no 'Pro' version available for FreeBSD. I also tried the 'Pro' version with linux-emulator and it doesn't work.

Overall, I like Seafile better since I don't need all the plugins. I've lost some files with Nextcloud as it doesn't always synchronize correctly and Nextcloud client crashed few times so that's a negative mark. Also Seafile does one-way and two-way sync so I can keep files only on the server or have identical files on both server and my computers. Nextcloud only does two-way sync.

The only drawback is Seafile store the files in clusters so its practically unreadable if you want to access the files directly on the Seafile server using SSH or SFTP. That's something you may have to consider.

My biggest concern is Nextcloud's many plugins as it also pose a security risk for exploits to be discovered. It's more suitable for sharing photos on the web but not storing personal files, financial documents, taxes, etc. Both does offer encryption feature to encrypt files on the server and both offers 2FA as well.

If you want to store and manage your personal files then Seafile is better. If you want to share files, photos with family and friends then Nextcloud is better. I hope this answers your question.
 
If I look at the pkg-message you need to install www/seahub. Then follow the pkg-message instructions from that.

Definitely need both net-mgmt/seafile-server and www/seafile-hub for it to work correctly. I've installed them and had no problems running it with all the required pre-installed packages. I built my own packages using ports-mgmt/poudriere. I read on different forum that using pkg from FreeBSD repository to install Seafile had some incompatible libraries so its better to build it from ports. I wasn't able to confirm if that's still the case.
 
Back
Top