Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
Warning: Undefined variable $altURL in
/www/wwwroot/93665.xin/wp-content/themes/haowa/haowa/functions.php on line
632
一.准备工作
㈠工具
1.购买服务器(推荐阿里云),系统必须选择 CentOS 7.x。

2.购买域名,同在阿里云
3.台式电脑
4.下载工具 WinACP(文末提供)
5.下载工具 Putty(文末提供)
㈡准备
1.解析域名

2.绑定域名

3.设置远程连接密码

以上均在阿里云控制台操作。
注意:下文中的蓝色字符为命令,需要复制整段蓝色字符黏贴到命令行窗口运行才不会出错。绿色字符为添加到服务器文件的代码。红色字符为需要特别注意的字段。
二.配置环境
打开 Putty,输入账号(默认为root)及远程连接密码,连接服务器。

出现下图直接点“更新”。

登录之后再次输入账号,输入密码(盲输无显),获取root权限。
1.下载py3镜像
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz

2.解压
tar -xzf Python-3.7.0.tgz

3.安装依赖,提示输入y回车(1条命令)
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-develtk-devel gcc libffi-devel

4.进入文件夹
cd Python-3.7.0

5.编译Python-3.7.0
./configure --prefix=/usr/local/python3

6.然后安装Python 3(耐心等待)
make && make install

7. Python 3安装依赖
yum install -y libffi-devel

8.设置Python 2和Python 3共存
vim /etc/profile
找到 "export PATH USER LOGNAME MAIL HOSTNAMEHISTSIZE HISTCONTROL"这行

在此行之前,插入新行,内容如下:
PATH=$PATH:/usr/local/python3/bin
#bin后面还有一个空格隔开

保存退出。(按 ESC,输入【:wq】回车即可保存退出。)

执行命令:
source /etc/profile

9.查询两个版本的python和pip是否共存。
设置软连接
ln -s /usr/local/python3/bin/python3/usr/bin/python3
查询版本
python3 -V
显示版本:Python 3.7.0

设置软连接
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
查询版本
pip3 -V
显示版本:pip 10.0.1 from/usr/local/python3/lib/python3.7/site-packages/pip (python 3.7)

查询版本
python -V
这里显示Python 2的版本
Python 2.7.5

查询版本
pip -V
这里显示pip的版本
pip 9.0.1 from/usr/lib/python2.7/site-packages (python 2.7)

三.安装docker
0.回到根目录
cd #

1.配置下docker的阿里源(两条命令)
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

2.安装docker,提示输入的时候输入y回车(2次,完成后显示Complete!)
sudo yum install docker-ce


3. 启动
systemctl start docker
4.开机启动
systemctl enable docker

5.查看docker版本(显示版本号即表示安装成功)
docker --version

6.为docker设置加速
sudo tee/etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://3ri8qner.mirror.aliyuncs.com"]
}
EOF
#从s复制到F,粘贴后回车。

7.然后重启就完成了(分别运行2条命令)
systemctl daemon-reload
sudo systemctl daemon-reload

四.安装docker-compose
*1-4步骤非必选,当服务器没安装PIP时才安装。若购买阿里云服务器则从第5步开始。
1.安装依赖
yum -y install epel-release
2.安装PIP
yum -y install python-pip
3.升级PIP
pip install --upgrade pip
4.检查pip版本
pip --version
显示版本号:pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
5.安装docker compose(1.22.0版本号不要修改)
pip install -Udocker-compose==1.22.0

6.检查docker compose版本(显示版本号即表示安装成功)
docker-composeversion

五.安装git
1.配置
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gccperl-ExtUtils-MakeMaker

2.下载git
wget https://github.com/git/git/archive/v2.3.0.zip

3.解压
安装zip(提示时输入y)
yum install zip unzip

解压git
unzip v2.3.0.zip

4.新建git文件夹
mkdir /root/git
5.进去git文件夹
cd git-2.3.0

6.配置参数(耐心等待)
make prefix=/root/git all

7.安装
make prefix=/root/git install

8.安装完成后查看版本号(显示版本号即表示安装成功)
git --version

六.一键部署
回到根目录,输入命令
cd #

1.git克隆库
git clone--depth 1 https://github.com/82Flex/DCRM.git && cd DCRM

2.修改外网访问管理和语言设置(分别运行下面2条命令)
yum -y install nano

nano DCRM/settings.py

移动光标#找到下面的开头字段,把[]里面的内容删掉只留'*'
ALLOWED_HOSTS = ['*']
#再修改核心语言
LANGUAGE_CODE = 'zh-Hans'
修改前:

修改后:

然后按ctrl+x输入y最后回车保存。

3.构建 DCRM 容器
(如果意外中断,只需要重新 cd /root/DCRM 进到这个文件再输入下面代码回车继续按步骤操作就行了)
docker-compose up --build --detach

4.附加到容器中
docker exec -i-t dcrm_app /bin/bash

5.在容器中执行命令(分别运行下面2条命令)
python manage.py collectstatic --no-input

python manage.py migrate

6.设置账号
python manage.py createsuperuser
#创建root用户名
#设置邮箱
#设置密码(包含英文数字8位数)
#再次输入确认密码

搞定,你的域名或ip/admin输入刚设置的账号密码就可以登录dcrm了

七.设置站点
1.点击example.com进行修改。

2.修改为自己的域名和软件源名称,点击“Save”保存。

保存完了像这样:

3.再添加元数据。点击菜单栏的WEIDCRM,再点击“元数据”,从右侧点击“添加”。

4.设定元数据,完了点击右侧“Save”。

5.激活“元数据”。点击菜单栏的WEIDCRM,再点“设置”,接着点击“活跃元数据”右侧的方框,选择刚才创建的元数据,最后点击右侧的“Save”。

九.解除上传文件限制
用winscp登录自己的服务器

出现这个直接点击“更新”。

然后进入
/root/DCRM/docker/nginx/conf.d
这个文件夹,打开修改 default.conf 这个文件。

添加一段
client_max_body_size 1024M;
改完保存退出。
(不要关闭winscp,下一步接着用)

2.设置个人源服务自启动。
进入/root/DCRM 这个文件夹下找到并打开修改docker-compose.yml这个文件,在下列的行中加入自启动代码。
services:

pure-ftpd:

app:

worker-default:

worker-high:

scheduler:

保存并关闭,退出WinSCP。
重新打开Putty登录服务器。
1.进入DCRM目录
cd /root/DCRM
2.附加改动后的文件到容器中
docker exec -i -t dcrm_app /bin/bash

分别运行下面两条命令:
python manage.py collectstatic --no-input
python manage.py migrate

至此,搭建就算是全部完成。重启服务器,开始愉快的玩耍吧。本文搭建的 Cydia 为纯正官方血统,并非二次修改版。
https://lanzoui.com/b03gqzsba密码:30pg