Skip to content

Commit 6865528

Browse files
committed
gh-113: update C API example
* update download instructions for CentOS 6 * remove sudo from RedHat repositories, they prefer 'su' and docker images even don't have 'sudo'. Recommend using root command prompt instead.
1 parent 2cf0516 commit 6865528

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

doc/book/app_server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ The C file should look like this:
142142
#include <lua.h>
143143
#include <lauxlib.h>
144144
#include <lualib.h>
145-
#include <tarantool.h>
145+
#include <tarantool/module.h>
146146
static int
147147
myfun(lua_State *L)
148148
{

download.rst

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -161,38 +161,40 @@ Tarantool - Downloads
161161
| ``$basearch`` (i.e. base architecture) must be either i386
162162
or x86_64.
163163
164-
Copy and paste the script below to the terminal prompt:
164+
Copy and paste the script below to the *root* terminal prompt:
165165
166166
.. code-block:: bash
167167
168+
# Clean up yum cache
169+
yum clean all
168170
# Enable EPEL repository
169-
sudo yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
171+
yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
170172
sed 's/enabled=.*/enabled=1/g' -i /etc/yum.repos.d/epel.repo
171173
172174
# Add Tarantool repository
173-
sudo rm -f /etc/yum.repos.d/*tarantool*.repo
174-
sudo tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
175+
rm -f /etc/yum.repos.d/*tarantool*.repo
176+
tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
175177
[tarantool_1_7]
176178
name=EnterpriseLinux-\$releasever - Tarantool
177-
baseurl=http://download.tarantool.org/tarantool/1.7/el/7/\$basearch/
179+
baseurl=http://download.tarantool.org/tarantool/1.7/el/6/\$basearch/
178180
gpgkey=http://download.tarantool.org/tarantool/1.7/gpgkey
179181
repo_gpgcheck=1
180182
gpgcheck=0
181183
enabled=1
182184
183185
[tarantool_1_7-source]
184186
name=EnterpriseLinux-\$releasever - Tarantool Sources
185-
baseurl=http://download.tarantool.org/tarantool/1.7/el/7/SRPMS
187+
baseurl=http://download.tarantool.org/tarantool/1.7/el/6/SRPMS
186188
gpgkey=http://download.tarantool.org/tarantool/1.7/gpgkey
187189
repo_gpgcheck=1
188190
gpgcheck=0
189191
EOF
190192
191193
# Update metadata
192-
sudo yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7' --enablerepo='epel'
194+
yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7' --enablerepo='epel'
193195
194196
# Install tarantool
195-
sudo yum -y install tarantool
197+
yum -y install tarantool
196198
197199
* RHEL 7 and CentOS 7
198200
@@ -203,13 +205,15 @@ Tarantool - Downloads
203205
| ``$releasever`` (i.e. CentOS release version) must be 7, and
204206
| ``$basearch`` (i.e. base architecture) must be either i386 or x86_64.
205207
206-
Copy and paste the script below to the terminal prompt:
208+
Copy and paste the script below to the *root* terminal prompt:
207209
208210
.. code-block:: bash
209211
212+
# Clean up yum cache
213+
yum clean all
210214
# Add Tarantool repository
211-
sudo rm -f /etc/yum.repos.d/*tarantool*.repo
212-
sudo tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
215+
rm -f /etc/yum.repos.d/*tarantool*.repo
216+
tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
213217
[tarantool_1_7]
214218
name=EnterpriseLinux-\$releasever - Tarantool
215219
baseurl=http://download.tarantool.org/tarantool/1.7/el/7/\$basearch/
@@ -227,10 +231,10 @@ Tarantool - Downloads
227231
EOF
228232
229233
# Update metadata
230-
sudo yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7'
234+
yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7'
231235
232236
# Install Tarantool
233-
sudo yum -y install tarantool
237+
yum -y install tarantool
234238
235239
* Amazon Linux
236240
@@ -243,17 +247,19 @@ Tarantool - Downloads
243247
| ``$releasever`` (i.e. RHEL / CentOS release version) must be 6, and
244248
| ``$basearch`` (i.e. base architecture) must be either i386 or x86_64.
245249
246-
Copy and paste the script below to the terminal prompt:
250+
Copy and paste the script below to the *root* terminal prompt:
247251
248252
.. code-block:: bash
249253
254+
# Clean up yum cache
255+
yum clean all
250256
# Enable EPEL repository
251-
sudo yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
257+
yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
252258
sed 's/enabled=.*/enabled=1/g' -i /etc/yum.repos.d/epel.repo
253259
254260
# Add Tarantool repository
255-
sudo rm -f /etc/yum.repos.d/*tarantool*.repo
256-
sudo tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
261+
rm -f /etc/yum.repos.d/*tarantool*.repo
262+
tee /etc/yum.repos.d/tarantool_1_7.repo <<- EOF
257263
[tarantool_1_7]
258264
name=EnterpriseLinux-\$releasever - Tarantool
259265
baseurl=http://download.tarantool.org/tarantool/1.7/el/6/\$basearch/
@@ -271,10 +277,10 @@ Tarantool - Downloads
271277
EOF
272278
273279
# Update metadata
274-
sudo yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7' --enablerepo='epel'
280+
yum makecache -y --disablerepo='*' --enablerepo='tarantool_1_7' --enablerepo='epel'
275281
276282
# Install Tarantool
277-
sudo yum -y install tarantool
283+
yum -y install tarantool
278284
279285
* Snappy package
280286

0 commit comments

Comments
 (0)