ckan-extension.md 3.75 KB
Newer Older
Patipat Jo's avatar
Patipat Jo committed
1
2
### 1. ckanext-pdfview:
```sh
Patipat Jo's avatar
Patipat Jo committed
3
source /usr/lib/ckan/default/bin/activate
Patipat Jo's avatar
Patipat Jo committed
4

Patipat Jo's avatar
Patipat Jo committed
5
cd /usr/lib/ckan/default
Patipat Jo's avatar
Patipat Jo committed
6

Patipat Jo's avatar
Patipat Jo committed
7
pip install -e 'git+https://gitlab.nectec.or.th/opend/ckanext-pdfview.git#egg=ckanext-pdfview'
Patipat Jo's avatar
Patipat Jo committed
8
9
```
แก้ไขไฟล์ config ของ CKAN ดังนี้:
Patipat Jo's avatar
Patipat Jo committed
10
```sh
Patipat Jo's avatar
Patipat Jo committed
11
12
13
14
#สำหรับ CKAN 2.9:
sudo vi /etc/ckan/default/ckan.ini
#สำหรับ CKAN 2.8:
sudo vi /etc/ckan/default/production.ini
Patipat Jo's avatar
Patipat Jo committed
15
```
Patipat Jo's avatar
Patipat Jo committed
16
```sh
Patipat Jo's avatar
Patipat Jo committed
17
18
19
20
    - ckan.plugins (เติม pdf_view ต่อจากที่มีอยู่แล้ว)
        > ckan.plugins = ... pdf_view
    - ckan.views.default_views (เติม pdf_view ต่อจากที่มีอยู่แล้ว)
        > ckan.views.default_views = ... pdf_view
Patipat Jo's avatar
Patipat Jo committed
21
22
```
```sh
Patipat Jo's avatar
Patipat Jo committed
23
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
24
sudo supervisorctl reload
Patipat Jo's avatar
Patipat Jo committed
25
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
26
27
28
29
sudo service apache2 restart
```
### 2. ckanext-scheming:
```sh
Patipat Jo's avatar
Patipat Jo committed
30
source /usr/lib/ckan/default/bin/activate
Patipat Jo's avatar
Patipat Jo committed
31

Patipat Jo's avatar
Patipat Jo committed
32
cd /usr/lib/ckan/default
Patipat Jo's avatar
Patipat Jo committed
33

Patipat Jo's avatar
Patipat Jo committed
34
pip install -e 'git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming'
Patipat Jo's avatar
Patipat Jo committed
35

Patipat Jo's avatar
Patipat Jo committed
36
pip install -r src/ckanext-scheming/requirements.txt
Patipat Jo's avatar
Patipat Jo committed
37
38
```
แก้ไขไฟล์ config ของ CKAN ดังนี้:
Patipat Jo's avatar
Patipat Jo committed
39
```sh
Patipat Jo's avatar
Patipat Jo committed
40
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
41
sudo vi /etc/ckan/default/ckan.ini
Patipat Jo's avatar
Patipat Jo committed
42
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
43
44
sudo vi /etc/ckan/default/production.ini
```
Patipat Jo's avatar
Patipat Jo committed
45
```sh
Patipat Jo's avatar
Patipat Jo committed
46
47
    - ckan.plugins (เติม scheming_datasets ต่อจากที่มีอยู่แล้ว)
        > ckan.plugins = ... scheming_datasets
Patipat Jo's avatar
Patipat Jo committed
48
49
```
```sh
Patipat Jo's avatar
Patipat Jo committed
50
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
51
sudo supervisorctl reload
Patipat Jo's avatar
Patipat Jo committed
52
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
53
54
55
sudo service apache2 restart
```

Patipat Jo's avatar
Patipat Jo committed
56
### 3. ckanext-hierarchy:
Patipat Jo's avatar
Patipat Jo committed
57
```sh
Patipat Jo's avatar
Patipat Jo committed
58
source /usr/lib/ckan/default/bin/activate
Patipat Jo's avatar
Patipat Jo committed
59

Patipat Jo's avatar
Patipat Jo committed
60
cd /usr/lib/ckan/default
Patipat Jo's avatar
Patipat Jo committed
61

Patipat Jo's avatar
Patipat Jo committed
62
pip install -e 'git+https://github.com/davidread/ckanext-hierarchy.git#egg=ckanext-hierarchy'
Patipat Jo's avatar
Patipat Jo committed
63

Patipat Jo's avatar
Patipat Jo committed
64
pip install -r src/ckanext-hierarchy/requirements.txt
Patipat Jo's avatar
Patipat Jo committed
65
66
```
แก้ไขไฟล์ config ของ CKAN ดังนี้:
Patipat Jo's avatar
Patipat Jo committed
67
```sh
Patipat Jo's avatar
Patipat Jo committed
68
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
69
sudo vi /etc/ckan/default/ckan.ini
Patipat Jo's avatar
Patipat Jo committed
70
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
71
72
sudo vi /etc/ckan/default/production.ini
```
Patipat Jo's avatar
Patipat Jo committed
73
```sh
Patipat Jo's avatar
Patipat Jo committed
74
75
    - ckan.plugins (เติม hierarchy_display hierarchy_form ต่อจากที่มีอยู่แล้ว)
        > ckan.plugins = ... hierarchy_display hierarchy_form
Patipat Jo's avatar
Patipat Jo committed
76
77
```
```sh
Patipat Jo's avatar
Patipat Jo committed
78
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
79
sudo supervisorctl reload
Patipat Jo's avatar
Patipat Jo committed
80
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
81
82
sudo service apache2 restart
```
Patipat Jo's avatar
Patipat Jo committed
83
### 4. ckanext-dcat:
Patipat Jo's avatar
Patipat Jo committed
84
```sh
Patipat Jo's avatar
Patipat Jo committed
85
source /usr/lib/ckan/default/bin/activate
Patipat Jo's avatar
Patipat Jo committed
86

Patipat Jo's avatar
Patipat Jo committed
87
cd /usr/lib/ckan/default
Patipat Jo's avatar
Patipat Jo committed
88

Patipat Jo's avatar
Patipat Jo committed
89
pip install -e 'git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat'
Patipat Jo's avatar
Patipat Jo committed
90

Patipat Jo's avatar
Patipat Jo committed
91
pip install -r src/ckanext-dcat/requirements.txt
Patipat Jo's avatar
Patipat Jo committed
92
93
```
แก้ไขไฟล์ config ของ CKAN ดังนี้:
Patipat Jo's avatar
Patipat Jo committed
94
```sh
Patipat Jo's avatar
Patipat Jo committed
95
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
96
sudo vi /etc/ckan/default/ckan.ini
Patipat Jo's avatar
Patipat Jo committed
97
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
98
99
sudo vi /etc/ckan/default/production.ini
```
Patipat Jo's avatar
Patipat Jo committed
100
```sh
Patipat Jo's avatar
Patipat Jo committed
101
102
    - ckan.plugins (เติม dcat dcat_json_interface structured_data ต่อจากที่มีอยู่แล้ว)
        > ckan.plugins = ... dcat dcat_json_interface structured_data
Patipat Jo's avatar
Patipat Jo committed
103
104
```
```sh
Patipat Jo's avatar
Patipat Jo committed
105
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
106
sudo supervisorctl reload
Patipat Jo's avatar
Patipat Jo committed
107
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
108
109
sudo service apache2 restart
```
Patipat Jo's avatar
Patipat Jo committed
110
### 5. ckanext-thai_gdc:
Patipat Jo's avatar
Patipat Jo committed
111
```sh
Patipat Jo's avatar
Patipat Jo committed
112
source /usr/lib/ckan/default/bin/activate
Patipat Jo's avatar
Patipat Jo committed
113

Patipat Jo's avatar
Patipat Jo committed
114
cd /usr/lib/ckan/default
Patipat Jo's avatar
Patipat Jo committed
115

Patipat Jo's avatar
Patipat Jo committed
116
pip install -e 'git+https://gitlab.nectec.or.th/opend/ckanext-thai_gdc.git#egg=ckanext-thai_gdc'
Patipat Jo's avatar
Patipat Jo committed
117
118
```
แก้ไขไฟล์ config ของ CKAN ดังนี้:
Patipat Jo's avatar
Patipat Jo committed
119
```sh
Patipat Jo's avatar
Patipat Jo committed
120
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
121
sudo vi /etc/ckan/default/ckan.ini
Patipat Jo's avatar
Patipat Jo committed
122
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
123
124
sudo vi /etc/ckan/default/production.ini
```
Patipat Jo's avatar
Patipat Jo committed
125
```sh
Patipat Jo's avatar
Patipat Jo committed
126
127
    - ckan.plugins (เติม thai_gdc ไว้ท้ายสุด)
        > ckan.plugins = ... thai_gdc
Patipat Jo's avatar
Patipat Jo committed
128
129
```
```sh
Patipat Jo's avatar
Patipat Jo committed
130
#สำหรับ CKAN 2.9:
Patipat Jo's avatar
Patipat Jo committed
131
sudo supervisorctl reload
Patipat Jo's avatar
Patipat Jo committed
132
#สำหรับ CKAN 2.8:
Patipat Jo's avatar
Patipat Jo committed
133
sudo service apache2 restart
Patipat Jo's avatar
Patipat Jo committed
134
```