Skip to content

Commit

Permalink
Merge pull request #214 from haiwen/update-env-server
Browse files Browse the repository at this point in the history
update env server
  • Loading branch information
freeplant authored Sep 6, 2023
2 parents 147e94a + 70af7a4 commit abb1682
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 342 deletions.
156 changes: 0 additions & 156 deletions manual/build_seafile/freebsd.md

This file was deleted.

52 changes: 21 additions & 31 deletions manual/build_seafile/server.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
This is the document for deploying Seafile open source development environment in Ubuntu 1804 docker container.
This is the document for deploying Seafile open source development environment in Ubuntu 2204 docker container.

## Run a container

```
docker run -it -p 8000:8000 -p 8082:8082 -p 3000:3000 --name seafile-ce-env ubuntu:18.04  bash
docker run -it -p 8000:8000 -p 8082:8082 -p 3000:3000 --name seafile-ce-env ubuntu:22.04 bash
```

Note, the following commands are all executed in the seafile-ce-env docker container.
Expand All @@ -13,26 +13,16 @@ Note, the following commands are all executed in the seafile-ce-env docker conta
```
apt-get update && apt-get upgrade -y
apt-get install -y ssh libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev python-dateutil cmake re2c flex sqlite3 python-pip python-simplejson git libssl-dev libldap2-dev libonig-dev vim vim-scripts wget cmake gcc autoconf automake mysql-client librados-dev libxml2-dev curl sudo telnet netcat unzip netbase ca-certificates apt-transport-https build-essential libxslt1-dev libffi-dev libpcre3-dev libz-dev xz-utils nginx pkg-config poppler-utils libmemcached-dev sudo
apt-get install -y ssh libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev python-dateutil cmake re2c flex sqlite3 python-pip python-simplejson git libssl-dev libldap2-dev libonig-dev vim vim-scripts wget cmake gcc autoconf automake mysql-client librados-dev libxml2-dev curl sudo telnet netcat unzip netbase ca-certificates apt-transport-https build-essential libxslt1-dev libffi-dev libpcre3-dev libz-dev xz-utils nginx pkg-config poppler-utils libmemcached-dev sudo ldap-utils libldap2-dev
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt-get install -y nodejs
apt-get install -y python3-pip python3.6 python3.6-dev
apt-get install -y python3 python3-dev python3-pip python3-setuptools python3-ldap
python3.6 -m pip install --upgrade pip
python3 -m pip install --upgrade pip
rm /usr/bin/python
rm /usr/bin/python3
ln -s /usr/bin/python3.6 /usr/bin/python
ln -s /usr/bin/python3.6 /usr/bin/python3
rm /usr/bin/pip
rm /usr/bin/pip3
ln -s /usr/local/bin/pip3.6 /usr/bin/pip
ln -s /usr/local/bin/pip3.6 /usr/bin/pip3
pip install python-cas djangosaml2 cffi sqlalchemy pymysql pillow pycryptodome configparser pylibmc django-pylibmc elasticsearch==5.5.0 elasticsearch-dsl==5.4.0 Django==2.2.14 future captcha django-statici18n django-post_office==3.3.0 django-webpack_loader==0.7.0 gunicorn mysqlclient django-picklefield==2.1.1 openpyxl qrcode django-formtools django-simple-captcha djangorestframework==3.11.1 python-dateutil requests pillow pyjwt pycryptodome requests_oauthlib mock nose exam splinter pytest pytest-django
pip3 install Django==4.2.* django-statici18n==2.3.* django_webpack_loader==1.7.* django_picklefield==3.1 django_formtools==2.4 django_simple_captcha==0.5.* djangosaml2==1.5.* djangorestframework==3.14.* python-dateutil==2.8.* pyjwt==2.6.* pycryptodome==3.16.* python-cas==1.6.* pysaml2==7.2.* requests==2.28.* requests_oauthlib==1.3.* future==0.18.* gunicorn==20.1.* mysqlclient==2.1.* qrcode==7.3.* pillow==9.3.* chardet==5.1.* cffi==1.15.1 captcha==0.4 openpyxl==3.0.* Markdown==3.4.* bleach==5.0.* python-ldap==3.4.* sqlalchemy==2.0.18 redis mock pytest pymysql configparser pylibmc django-pylibmc nose exam splinter pytest-django
```

## Install MariaDB and Create Databases
Expand Down Expand Up @@ -63,15 +53,17 @@ git clone https://github.com/haiwen/libsearpc.git
git clone https://github.com/haiwen/seafile-server.git
git clone https://github.com/haiwen/seahub.git
cd libevhtp/
git checkout tags/1.1.7 -b tag-1.1.7
cd libsearpc/
git fetch origin 8.0:8.0
git checkout 8.0
git checkout tags/v3.3-latest -b tag-v3.3-latest
cd ../seafile-server
git checkout tags/v8.0.0-server -b tag-v8.0.0-server
git checkout tags/v11.0.0-server -b tag-v11.0.0-server
cd ../seahub
git checkout tags/v8.0.0-server -b tag-v8.0.0-server
git checkout tags/v11.0.0-server -b tag-v11.0.0-server
```

## Compile and Install seaf-server
Expand Down Expand Up @@ -114,9 +106,6 @@ PASSWD = 123456
DB = ccnet
CONNECTION_CHARSET = utf8
CREATE_TABLES = true
[General]
SERVICE_URL = http://127.0.0.1:8000
EOF
cat > seahub_settings.py <<EOF
Expand All @@ -131,6 +120,7 @@ DATABASES = {
}
}
FILE_SERVER_ROOT = 'http://127.0.0.1:8082'
SERVICE_URL = 'http://127.0.0.1:8000'
EOF
Expand Down Expand Up @@ -163,7 +153,7 @@ seaf-server -c /root/dev/conf -d /root/dev/seafile-data -D all -f -l - &
```
cd ~/dev/source-code/seahub/
export PYTHONPATH=/usr/local/lib/python3.6/site-packages/:/root/dev/source-code/seahub/thirdpart:$PYTHONPATH
export PYTHONPATH=/usr/local/lib/python3.10/site-packages/:/root/dev/source-code/seahub/thirdpart:$PYTHONPATH
export CCNET_CONF_DIR=/root/dev/conf
export SEAFILE_CONF_DIR=/root/dev/seafile-data
export SEAFILE_CENTRAL_CONF_DIR=/root/dev/conf
Expand All @@ -172,19 +162,19 @@ export SEAFILE_CENTRAL_CONF_DIR=/root/dev/conf
### Create seahub database tables

```
python manage.py migrate
python3 manage.py migrate
```

### Create user

```
python manage.py createsuperuser
python3 manage.py createsuperuser
```

### Start seahub

```
python manage.py runserver 0.0.0.0:8000
python3 manage.py runserver 0.0.0.0:8000
```

Then, you can visit <http://127.0.0.1:8000/> to use Seafile.
Expand All @@ -199,13 +189,13 @@ Then, you can visit <http://127.0.0.1:8000/> to use Seafile.

For deploying frontend development enviroment, you need:

1, checkout seahub to 8.0 branch
1, checkout seahub to master branch

```
cd /root/dev/source-code/seahub
git fetch origin 8.0:8.0
git checkout 8.0
git fetch origin master:master
git checkout master
```

2, add the following configration to /root/dev/conf/seahub_settings.py
Expand Down
Loading

0 comments on commit abb1682

Please sign in to comment.