ejabberdctl not found in bash Ubuntu(installing ejabberd) - bash

I was trying to install ejabberd with applying the tutorials in many site to my VM which is ubuntu but I am stuck in the beginning. After I wrote
sudo apt-get update
sudo apt-get -y install ejabberd
it installs ejabberd. But when I try to write the following
ejabberdctl register admin localhost mypassword
it says ejabberdctl not found. I also tried to restart it with but it is still same.
sudo service ejabberd restart
Note: I did not install erlang seperately. Can it be the problem?

Try sudo ejabberdctl,
if it didn't work, Do:
sudo updatedb
sudo locate ejabberdctl
check if the output is in your $PATH variable.

Related

Shell driver install with `ACCEPT_EULA=Y` error

As described here, I am trying to install the following driver in shell, using this code (modified from the original slightly):
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/debian/8/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
But I get an error on the last command:
sudo: sorry, you are not allowed to set the following environment variables: ACCEPT_EULA
After searching, I can't seem to find this exact error anywhere else.
One solution is to run the last command without ACCEPT_EULA=Y as sudo apt-get install msodbcsql17. And then to enter Y at the prompt. This indeed works but I would like to run the above installation for other users without need of their input.
Is there a way to resolve the above error so I can use ACCEPT_EULA=Y, or
alternatively is there a simple way to enter the Y response for the EULA
automatically so the end user never needs to take any action?
Thank you in advance.
You appear to have access to run arbitrary commands, but not to modify the environment.
The simple workaround is to hand off environment changes to the command:
sudo env ACCEPT_EULA=Y apt-get install msodbcsql17
I don't have enough rep to post a comment.
But I was doing the same install for pyodbc inside a python:3 docker container.
In the dockerfile the following command works:
ACCEPT_EULA=Y apt-get install -y msodbcsql17
(I was after this particular driver #17.)
Reading: https://github.com/microsoft/mssql-docker/blob/master/oss-drivers/pyodbc/Dockerfile can help see the environment set up from a base ubuntu (ubuntu:16.04) box.
Also check up on: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017
for microsoft first hand docs.
The ACCEPT_EULA=Y apt-get install -y msodbcsql17 command above did the trick for me as I was trying to set up msodbcsql17 via a Dockerfile.

Linux server sudo command not found

I am having Linux server with
2.6.32-673.8.1.lve1.4.3.el6.x86_64 - GNU/Linux
and trying to run following commands :
sudo apt-get update
-bash: sudo: command not found
I have also tried - sudo su
-bash: sudo: command not found
And for lsb_release -a
-bash: lsb_release: command not found
I am trying to install ruby. Any help is highly appreciated.
sudo is in its own package. You probably don't have it installed, so you'll have to login as root and install it.
Sadly, just showing the kernel version doesn't help much, so see if this returns anything: cat /etc/*-release
If it does, you could be using something like CentOS or any other flavor of linux, so apt-get may not work anyway.
Hopefully, you are logging in with root if sudo isn't available. Running whoami should let you know your username if you are not sure.
If you are root, then try (for CentOS) yum install sudo to get sudo or just yum install ruby to install Ruby. If yum is not found, then try apt-get. If that still doesn't work, then you could be using a system with a different package manager (like emerge for Gentoo Linux).
EDIT: Does anything happen if you try /sbin/sudo (or /usr/sbin/sudo)?
Often sudo is not installed by default on distributions like Debian.
Tipe into the console:
su -
After that try to install sudo with this line:
apt-get install sudo -y
To use sudo properly you should give yourself Superuser permissions:
usermod -aG sudo USERNAME
After this step reboot your device and everything should work fine.

How to mount HDFS on Ubuntu 14.04

So,I can't mount HDFS on Ubuntu 14.04. Mucommander not working, fuse not working, can somebody explain me with images or make me some tutorial. Thanks, best regards.
I successfuly did it today using instructions on Cloudera site
wget http://archive.cloudera.com/cdh5/one-click-install/trusty/amd64/cdh5-repository_1.0_all.deb
sudo dpkg -i cdh5-repository_1.0_all.deb
sudo apt-get update
sudo apt-get install hadoop-hdfs-fuse
sudo mkdir -p <mount_point>
hadoop-fuse-dfs dfs://<name_node_hostname>:<namenode_port> <mount_point>
What OS and version of HDFS do you use?
You have to add the CDH5 repository first (tested on 15.04):
wget http://archive.cloudera.com/cdh5/one-click-install/trusty/amd64/cdh5-repository_1.0_all.deb
sudo dpkg -i cdh5-repository_1.0_all.deb
sudo apt-get update
Then proceed with #AlexDvoretsky's answer.
Alternative instructions for CDH5 repository installation on Ubuntu 16.04: From Cloudera.
sudo wget 'https://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/cloudera.list' -O /etc/apt/sources.list.d/cloudera.list
sudo apt-get update
sudo apt-get install hadoop-hdfs-fuse
Then back to #AlexDvoretsky's answer
I developed a python program that uses FUSE to mount HDFS as a standard filesystem, it also works with Kerberos and it works well: https://github.com/EDS-APHP/py-hdfs-mount

How to install and configure LAMP on ubuntu 12.04

Could somebody please tell me how to install and configure LAMP on ubuntu 12.04 ? Is there a package similar to WAMP Server that is all-in-one ? I have tried to install from command line ,PHP,MySQL work but apache gives me this after sudo service apache2 restart
* Restarting web server apache2
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
And I think probably I did something wrong when installing !
Thank you !
From this tutorial,
Run this commands in Ubuntu Terminal-
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
For Checking-
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
If u get-
Your PHP installation is working fine.
Then you are done.
You can follow tutorial from below link to setup LAMP on your Ubuntu 12,
http://technarco.com/ubuntu-linux/how-install-lamp-ubuntu-12
Enjoy, :)
To resolve this error, you need to stop other process using this port.
In some of cases it is nginx. you can stop it
sudo /etc/init.d/nginx stop
you can install lamp server using Tasksel (Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. This program is used during the installation process, but users can also use tasksel at any time)
check this post http://wiki.workassis.com/ubuntu-install-lamp-using-tasksel/

Installing cloudera impala without cloudera manager

Kindly provide the link for installing the imapala in ubuntu without cloudera manager. Couldn't able to install with official link.
Unable to locate package impala using these queries :
sudo apt-get install impala # Binaries for daemons
sudo apt-get install impala-server # Service start/stop script
sudo apt-get install impala-state-store # Service start/stop script
First you need to get the list of packages and store it in /etc/apt/sources.list.d/, then update the packages, then you fire the Impala queries.
At the terminal do the following:
cd /etc/apt/sources.list.d/
wget http://archive.cloudera.com/impala/ubuntu/precise/amd64/impala/cloudera.list
sudo apt-get update
sudo apt-get install impala # Binaries for daemons
sudo apt-get install impala-server # Service start/stop script
sudo apt-get install impala-state-store # Service start/stop script
Have you installed the correct list file?
See "Packages and Repositories" on page 14.
http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/PDF/Installing-and-Using-Impala.pdf

Resources