How to start tarantool console? - lua

I've installed tarantool (tarantool_box) and tarantool-client. I can start tarantool
/usr/bin/tarantool_box --background
but when I try to connect to server
/usr/bin/tarantool
I see only admin console
localhost>
and can only use some commands and sql-like queries. I can not use any of commands from user guide, and almost all commands which start with lua fail:
lua console = require('console')
---
error: 'Lua error: [string "local console = require(''console'')"]:1: attempt to call global ''require'' (a nil value)'
...

Solution, for clean Debian wheezy, found on tarantool github https://github.com/tarantool/tarantool
sudo apt-get update
sudo apt-get upgrade
after update
sudo apt-get install git
sudo apt-get install build-essential
sudo apt-get install libreadline-dev
sudo apt-get install cmake
sudo git clone https://github.com/tarantool/tarantool
cd ./tarantool
sudo git submodule update --init --recursive
sudo cmake .
sudo make
after build
sudo ./tarantool/src/tarantool

Usually I use this command for docker version of tarantool/tarantool:
tarantoolctl connect 3301
But you can also use docker directly
docker exec -it tarantool_1 console

Related

Couldn't find an alternative telinit implementation to spawn in DOCKER while starting MarkLogic application in CENTOS7

I am running a docker file in windows 11 which will do two operations by running two scripts parallelly. So there are 2 bash scripts to do these 2 operations-
Install an application MarkLogic in CentOS7 (marklogicinstall.sh)
Deploy some files in the application server (deploy.sh)
I have written a wrapper script which commands to first run the script1, then the second1
However, I get this below error where the first script ends and before the second one starts-
Couldn't find an alternative telinit implementation to spawn.
The installation script which is marklogicinstall.sh is like this -
#!/bin/bash
# Get any CentOS updates then clear the Docker cache
#install yum by rpm
#yum -y update && yum clean all
# Install MarkLogic dependencies
yum -y install glibc.i686 gdb.x86_64 redhat-lsb.x86_64 && yum clean all
# Install the initscripts package so MarkLogic starts ok
yum -y install initscripts && yum clean all
# Install MarkLogic then delete the .RPM file if the install succeeded
yum -y install MarkLogic.rpm && rm MarkLogic.rpm
printf "Marklogic installation done"
# Set the Path
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/MarkLogic/mlcmd/bin"
exec /usr/sbin/init
service /etc/init.d/MarkLogic start
Is it a problem with the start command?

Can't run Curl command inside my Docker Container

I created a docker container from my OS X VM Docker host. I created it using the run command and created the container based off the ubuntu:xenial image off docker hub.
I'm now connected to my container after it's created and logged in as root and at the command prompt inside my container.
I tried to install homebrew and for some reason, I can't run the command to install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
when I run that I get a bash:
curl: command not found
Not sure why I'm not able to use curl here inside my container.
curl: command not found
is a big hint, you have to install it with :
apt-get -y update; apt-get -y install curl
Ran into this same issue while using the CURL command inside my Dockerfile. As Gilles pointed out, we have to install curl first. These are the commands to be added in the 'Dockerfile'.
FROM ubuntu:16.04
# Install prerequisites
RUN apt-get update && apt-get install -y \
curl
CMD /bin/bash
So I added curl AFTER my docker container was running.
(This was for debugging the container...I did not need a permanent addition)
I ran my image
docker run -d -p 8899:8080 my-image:latest
(the above makes my "app" available on my machine on port 8899) (not important to this question)
Then I listed and created terminal into the running container.
docker ps
docker exec -it my-container-id-here /bin/sh
If the exec command above does not work, check this SOF article:
Error: Cannot Start Container: stat /bin/sh: no such file or directory"
then I ran:
apk
just to prove it existed in the running container, then i ran:
apk add curl
and got the below:
apk add curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20171114-r3)
(2/5) Installing nghttp2-libs (1.32.0-r0)
(3/5) Installing libssh2 (1.8.0-r3)
(4/5) Installing libcurl (7.61.1-r1)
(5/5) Installing curl (7.61.1-r1)
Executing busybox-1.28.4-r2.trigger
Executing ca-certificates-20171114-r3.trigger
OK: 18 MiB in 35 packages
then i ran curl:
/ # curl
curl: try 'curl --help' or 'curl --manual' for more information
/ #
Note, to get "out" of the drilled-in-terminal-window, I had to open a new terminal window and stop the running container:
docker ps
docker stop my-container-id-here
APPEND:
If you don't have "apk" (which depends on which base image you are using), then try to use "another" installer. From other answers here, you can try:
apt-get -qq update
apt-get -qq -y install curl
This is happening because there is no package cache in the image, you need to run:
apt-get -qq update
before installing packages, and if your command is in a Dockerfile, you'll then need:
apt-get -qq -y install curl
After that install ZSH and GIT Core:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird since sh does not understand the source command. So, you do this to install zsh:
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
and then you change your shell to zsh:
chsh -s `which zsh`
and then restart:
sudo shutdown -r 0
This problem is explained in depth in this issue.
If you are using an Alpine based image, you should do
RUN
... \
apk add --no-cache curl \
curl ...
...
You don't need to install curl to download the file into Docker container, use ADD command, e.g.
ADD https://raw.githubusercontent.com/Homebrew/install/master/install /tmp
RUN ruby -e /tmp/install
Note: Add above lines to your Dockerfile file.
Another example which installs Azure CLI:
ADD https://aka.ms/InstallAzureCLIDeb /tmp
RUN bash /tmp/InstallAzureCLIDeb
what worked successfully for me was:
FROM ubuntu:20.0.4
RUN apt-get update &&\
apt-get install -y curl
...
You could base your image on one that already has curl.
A minimalistic one:
FROM alpine/curl
or a full-fledged one:
FROM rockylinux:9

Can't install language pack

I'm trying to install italian language pack on a VM instance with Debian. I've tried almost everything but it still can't find the language pack.
$ apt-get update
$ apt-get install language-pack-it-base
$ apt-get install language-pack-it
It returns:
E: Unable to locate package language-pack-it
It's the same with other languages.
Any hint?
To install language-pack-it-base:
$ wget http://archive.ubuntu.com/ubuntu/pool/main/l/language-pack-it-base/language-pack-it-base_14.10+20141020_all.deb
$ sudo dpkg -i language-pack-it-base_14.10+20141020_all.deb
To install language-pack-it:
$ wget http://archive.ubuntu.com/ubuntu/pool/main/l/language-pack-it/language-pack-it_14.10+20141020_all.deb
$ sudo dpkg -i language-pack-it_14.10+20141020_all.deb
Verify the installation of the packages using dpkg -l
$ dpkg -l | grep language-pack-it
‘ii’ status indicates a successful installation.
If you get dependency errors during the installation, run the command below and re-install the packages.
$ sudo dpkg --configure -a

Can ejabberd be installed on Google Compute Engine?

Can ejabberd be installed on Google Compute Engine? Will there be any issues with using ejabberd on Compute Engine? I have looked but cannot find any references to anyone trying this before. Grateful for any help.
Yes. Compute Engine gives you VMs. You can put whatever you want on them, such as Erlang and ejabberd.
Yes you can.
You can use the Vm with Debian Image and follow this intructions.
http://www.howtoforge.com/virtual-mail-jabber-server-xmpp-with-iredmail-and-ejabberd-on-ubuntu-9.10
dont forget open the ports in the firewall.
Sorry I didn't have much time to put together a cleaner "how to". I just copied and pasted from my personal archive.
Here's what you'd have to do to compile the source code on a Compute Engine. Please let me know if you have any questions.
Image: debian-7-wheezy-v20140408
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libncurses5-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install libexpat1-dev
sudo apt-get install unixodbc-dev
wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
tar tar -xvzf yaml-0.1.5.tar.gz
cd yaml-0.1.5
./configure
sudo make
sudo make install
sudo apt-get install xsltproc
sudo apt-get install fop
cd ..
wget http://www.erlang.org/download/otp_src_R16B03-1.tar.gz
gunzip -c otp_src_R16B03-1.tar.gz | tar -xf -
cd o....
./configure --with-odbc=/usr/lib/odbc
sudo make
sudo make install
[.. Install git and clone repo here.. ]
git clone git#github.com:processone/ejabberd.git
cd ejabberd
./configure --enable-odbc --enable-mysql
sudo make
sudo make install

How to configure yaws webserver in the linux terminal?

can someone help me on to write my yaws webserver configuration file in the Linux terminal. when i follow the yaws tutorials i get errors. thanks a lot.
This is how I installed Yaws 1.89 on Ubuntu Server 10.10.
1. Update your Ubuntu system
sudo apt-get update
sudo apt-get upgrade
2. Install the tools you need to compile
sudo apt-get install gcc
sudo apt-get install libpam0g-dev
3. Download, compile and install Yaws 1.89
wget http://yaws.hyber.org/download/yaws-1.89.tar.gz
tar xfz yaws-1.89.tar.gz
cd yaws
./configure && make
sudo make install

Resources