Ubuntu

250

Solutions

338

Contributors

Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.

Share tech news, updates, or what's on your mind.

Sign up to Post

Ubuntu 16.04.1 LTS

Trying to add a plugin for Nagios 4.3.4 core  

https://github.com/op5/check_vmware_api

Part of the instructions are to run this

root@tgcs017:/usr/local/nagios/libexec# sudo yum install openssl-devel perl-Archive-Zip perl-Class-MethodMaker uuid-perl perl-SOAP-Lite perl-XML-SAX perl-XML-NamespaceSupport  perl-XML-LibXML perl-MIME-Lite perl-MIME-Types perl-MailTools perl-TimeDate uuid libuuid perl-Data-Dump perl-uuid libuuid perl-Data-Dump perl-UUID cpan libxml2-devel perl-libwww-perl perl-Test-MockObject perl-Test-Simple perl-Monitoring-Plugin perl-Class-Accessor perl-Config-Tiny
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>
root@tgcs017:/usr/local/nagios/libexec# yum repolist all
repolist: 0
root@tgcs017:/usr/local/nagios/libexec#

Open in new window


I ran this

root@tgcs017:/usr/local/nagios/libexec# yum-config-manager --enable Universe
root@tgcs017:/usr/local/nagios/libexec# yum-config-manager --enable Main
root@tgcs017:/usr/local/nagios/libexec# yum-config-manager --enable Restricted
root@tgcs017:/usr/local/nagios/libexec# yum-config-manager --enable Multiverse

Open in new window


I do not which repository this is looking for

root@tgcs017:/usr/local/nagios/libexec# yum repolist all
repolist: 0
root@tgcs017:/usr/local/nagios/libexec#

Open in new window



Any ideas?

Thank you

Tom
0
Learn SQL Server Core 2016
LVL 13
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

i'm using ubuntu 18.04 and i am trying to learn perl and get a window to appear like visual studios where i can create buttons and drop-down boxes, etc and i cannot seem to gt it installed.  i used https://www.perl.com/pub/2001/03/gui.html/ and i cannot get their examples:ptked and ptksh to execute.  these are listed in the paragraph right above: pTk Core Concepts.  is there a better example or do you see what i'm missing?
0
Can you someone provide guidance to setup SSH on Ubuntu Server running a small home network securely so we can remotely do work on our pIHole?
0
Hi Experts,

I get the following error as below for wagtail (Django application) inside a Docker container.  Please see the uwsgi logs inside the docker container as below.


*** Starting uWSGI 2.0.18 (64bit) on [Mon Mar  4 03:56:36 2019] ***
compiled with version: 5.4.0 20160609 on 04 March 2019 01:00:36
os: Linux-4.4.0-1057-aws #66-Ubuntu SMP Thu May 3 12:49:47 UTC 2018
nodename: e56d42de8c73
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/ntdl/code
writing pidfile to /tmp/ntdl.pid
detected binary path: /usr/local/bin/uwsgi
setgid() to 33
setuid() to 33
chdir() to /home/ntdl/code
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/ntdl.sock fd 8
uwsgi socket 1 inherited UNIX address @ fd 0
inherit fd0: chmod(): No such file or directory [core/socket.c line 1797]
Python version: 3.6.2 (default, Jul 17 2017, 23:14:31)  [GCC 5.4.0 20160609]
Python main interpreter initialized at 0x971510
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 543168 bytes (530 KB) for 20 cores
*** Operational MODE: threaded ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x971510 pid: 24 (default app)
*** uWSGI is running in 

Open in new window

0
Dear Wizards, I got this error when restored a Linux VM from recovery media iso file.

The username/password are correct for sure. Can you please suggest?  Many thanks!

e.PNG
ee.PNG
path.PNG
0
Hi Experts,

I get the following error when I run the docker

root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/NTDL-TEST/Harvest-Trove-Pictures# sudo docker start trove_pull
Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"start\\\": executable file not found in $PATH\"\n"
Error: failed to start containers: trove_pull

Open in new window


the docker file contents are as follows

FROM ubuntu:16.04

MAINTAINER bharath-ak@nt.gov.au

RUN apt-get update -y
RUN apt-get install -y software-properties-common python-software-properties curl
RUN add-apt-repository -y ppa:fkrull/deadsnakes

RUN apt-get update -y && apt-get install -y curl
RUN apt-get update -y && apt-get install -y \
        git \
        python3.6 \
        python3.6-dev \
        nginx \
        sqlite3 \
        nodejs \
        build-essential \
        libmagickwand-dev \
        cron \
        nginx \
        python3-pip

RUN rm -f /usr/bin/python3
RUN ln -s /usr/bin/python3.6 /usr/bin/python3
#RUN curl https://bootstrap.pypa.io/get-pip.py | python3


RUN mkdir -p /home/trove/trove
WORKDIR /home/trove


COPY . .
COPY ./ ./
RUN chmod -R 755 /home/trove
RUN chown -R www-data:www-data /home/trove
COPY . .

COPY build/docker/uwsgi_params .
COPY build/docker/uwsgi.ini .
COPY trove-variables.env .
RUN pip3 install --no-cache-dir uwsgi
RUN pip3 install --no-cache-dir -r requirements.txt

COPY build/docker/start 

Open in new window

0
I am trying to install partkeepr.org on a Ubuntu 16.04LTS machine

- It is running LEMP with nginx

When the install starts, it prompts that Symfony is not installed.

Symfony error message https://prnt.sc/mqmr0o

I have installed Symfony and it's still not working.

Anyone ever used Symfony and can give this Linux neophite a few tips to make it work?
0
AWS Design help

I have a Ubuntu server (basically a LAMP stack) hosted on Linode. There's a PHP script that gets heavy usage that I'd like to move to AWS (along with the DB it uses).

I was thinking of putting the PHP Script on AWS Elastic beanstalk and having it connect to an Aurora auto scaling MYSQL database.  Most of the PHP script does read operations with the exception of a call to increment a hit counter.

How do I go about keeping the master database (on linode) and the AWS RDS Aurora database in Sync so I can offload the heavily-used PHP script

Or am I completely going about this the wrong way .. please advise
0
force ubuntu/debian netinstall to use a specific variant of debian-installer

i've run into various changing bugs with the udeb distribution.
over the time, the ubuntu maintainers change stuff and in the end there is no way to get something reliable.
installs became sluggish since a kernel hange in january, now thy switched to a new version of glibc ( 2.23-0ubuntu11 with the introduction of known bugs dating from years ago ) which breaks the installer by producing segfaults.

does any of you know a way to use an older version of udeb in preseed ?

i know i can setup my own debian mirror, but i'd need to mirror both the udeb and the deb part. i'm ok to mirror udeb alone if that is feasible but AFAIK preseed only offers a single choice for package sources. maybe there is a way to use local files i can grab on an older ISO for udeb only ?

ideas ?

btw, i'm installing ubuntu-xenial should that matter.
yes i know it is outdated. no i do not currently have a choice in this case. please do not discuss that point.

thanks for your help
0
Hi Experts,

I have issue with running npm run script with forever.  Please find below forever.json

[
   {
      "uid": "app1",
      "append": true,
      "watch": true,
      "script": "npm run pack "
   },
   {
        "uid": "app2",
        "append": true,
        "watch": true,
        "script": "npm run render-prod"
   },
   {

        "uid": "app3",
        "append": true,
        "watch": true,
        "script": "npm run django8000"
   }
]

Open in new window


when I run forever start forever.json  I get the following error

[/code]
root@ip-10-252-14-11:/home/ubuntu/workarea/ntdl-2# forever start forever.json
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: npm run pack
info:    Forever processing file: npm run render-prod
info:    Forever processing file: npm run django8000
error:   Cannot start forever
error:   script /home/ubuntu/workarea/ntdl-2/npm run pack  does not exist.
[/code]

 "scripts": {
 "runapp8000": "concurrently --no-color \"npm run pack \" \"npm run render\" \"npm run django8000\"",
}

Open in new window

Please help me in resolving this issue.

with many thanks,
Bharath AK
0
Cyber security certifications or degree?
Cyber security certifications or degree?

Cyber security is in demand—big-time. So what do you need to build a career in this lucrative field? Is a degree a must-have, or are industry-leading certifications more sought-after? Is it possible to break into cybersecurity without a bachelor’s or master’s degree in the field?

In Ubuntu 16.04LTS I'm suddenly unable to update apt from the previous to current version using either apt or dpkg.
Dpkg results below it simply hangs forever at the point I Ctl-C it.

apt-utils_1.2.29ubuntu0.1_amd64.deb
apt_1.2.29ubuntu0.1_amd64.deb

~# dpkg -i apt_1.2.29ubuntu0.1_amd64.deb
Selecting previously unselected package apt.
(Reading database ... 132298 files and directories currently installed.)
Preparing to unpack apt_1.2.29ubuntu0.1_amd64.deb ...
Unpacking apt (1.2.29ubuntu0.1) ...
Setting up apt (1.2.29ubuntu0.1) ...
^C^Cdpkg: error processing package apt (--install):
 subprocess installed post-installation script was interrupted
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 apt

How do I go about fixing this? I can't update the system at this point.
0
Hi Experts,

I get a bad gateway when running the web application from docker.

I had installed nginx inside the docker container.

for eg,

docker gateway is 1.2.3.4

public ip is 4.3.2.1

I create the environment for the docker container

declare -a ntdl_environment=( -e ES_CONNECTION=1.2.3.4:9200 -e DATABASE=postgres://user:****@1.2.3.4/ntdl -e LOCAL_URL_PREFIX==https://ntest-dev.s3.amazonaws.com -e IIIF_SERVER=http://4.3.2.1/iiif -e FACEBOOK_APP_ID=000000 -e CLOUD_WATCH=true -e AWS_ACCESS_KEY_ID=akz44 -e AWS_SECRET_ACCESS_KEY=******** -e AWS_DEFAULT_REGION=ap-abct-2 -e S3_BUCKET=abc-test-dev -e GENERIC_SERVER_NAME=http://4.3.2.1 -e SEARCH_PATH=/ -e SEARCH_DOMAIN=http://4.3.2.1 -e HANDLE_SITEMAP_PATH=https://s3-test.amazonaws.com/ntest/sitemap/sitemap.txt.gz -e DEBUG=true)

Open in new window


I had run the following commands to run the docker container

docker run --name ntdl -d --restart always  ${ntdl_environment[@]} f27af16c9ed6

to go inside bash shell for the docker container i had run the follow command from command prompt

docker exec -it ntdl /bin/bash

when I run gateway ip for elasticsearch it is running fine inside docker
I get the following results it is working fine

root@16a1d7df5399:/home/ntdl/code# curl -XGET 1.2.3.4:9200
{
  "name" : "C****D",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "FG4Sgll3Rau***6nQ",
  "version" : {
    "number" : "5.6.4",
    "build_hash" : "8bbedf5",
    "build_date" : "2017-10-31T18:55:38.105Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.1"
  },
  "tagline" : "You Know, for Search"
}

I had checked nginx status inside docker it is working fine.

root@16a1d7df5399:/home/ntdl/code# service nginx status
 * nginx is running

curl -XGET 'localhost' inside the docker gets the following below error


Open in new window

0
I just installed Ubuntu server 18 and trying to get netplan to take my static IP but not having luck.

Can someone assist me with this?

This what I entered but it's not working.

netplan
0
can i  do voice recognition in ubuntu 18.04?  i would like to start applications like a web browser or spreadsheet application.  i've used dragon naturally speaking in windows but i like the linux os better.  i've asked this question before but i caught a bad cold and couldn't pay much attention to it.
0
Ubuntu freezes and shuts down laptop when writing to c drive.

this same command runs fine on one laptop but crashes on another....

user@DESKTOP-NNT86U6:/mnt/c/unix$ sed 's/[^,]*/"&"/g' test2.csv > testx.csv
0
SYSTEM
Ubuntu Linux 16.04
Android Phone

BACKGROUND
We are on the floor of a convention and trying to connect our linux machine to our Android hot spot. There are too many WiFi hotspots and we cannot find the one from our phone.

QUESTION
On our Linux machine, how to find the hotspot that is being generated by our Android phone? Is there a way to search for the specific hotspot name? Is there a way to turn off the other 100 or more hotspots that are filling up the queue?
0
I need to copy a file from one Ubuntu server to another.

They are two servers in the same AWS VPC and are in the same Public Subnet. They are both running Ubuntu (Ubuntu 14.04.5 LTS and Ubuntu 18.04.1 LTS, respectively).

I've opened up the Security Group for BOTH Server using Port 22. I also confirmed that openSSH is running by using this command "ps -A | grep sshd" and seeing process ID's.

I created a Text file for testing.

Here's the command I used to copy between servers:

scp ubuntu@**.*.**.***:/usr/local/thomtesttext.txt ubuntu@**.*.**.***:/usr/local/testtext.txt

Open in new window


This is the error I'm seeing:
ssh: connect to host **.*.**.*** port 22: Connection timed out

Open in new window


What am I doing wrong? How can I get an AWS Ubuntu Server to copy files between them?

Thanks for your help!
0
Have 2 ubuntu installations on Oracle VM. They are in the same version. I ran the same python script against its own ubuntu in the exactly same way. Ran well on one, but got the error on the other one below:
"ModuleNotFoundError: No module named 'x'".
I knew the one without error was installed more packages, but I did not remember which more packages were installed. Under this condition, how to troubleshoot this issue? Can any gurus shed some light to it? Thanks a lot.
Background:
ubuntu 18.04 on VirtualBox V5.2.22 in Windows 7 (2 Ubuntus installed on the same box).
0
Have a sizeable on-line application in php on Virtual Box Ubuntu and like to understand it completely. Would like to use some debug tools to know what is going on which page to corresponding to the code behind it. Can any gurus shed some light to it: recommend some tools to debug and understand the code? Thanks a lot.
0
Price Your IT Services for Profit
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

I need to backup a Ubuntu 18.04 server. I use Storage Craft for all backups but they do not have anything that can backup that version of Linux. I need to find a product that can backup that server.

I am not a Linux tech so I would prefer something where I can install the backup agent on Linux and manage it from a Windows server. I also want it to backup the entire image of the server so I can restore it if necessary.

Can someone recommend a good product for that. Preferable one that is not expensive
0
I'm a IT / Music Composition double major.

At school we use PHP a lot.

I want to start learning Node.js and express, at least the basics to get familiar with it.

The operating system I run on my laptop is Ubuntu 18.04.

How can I run both Node and PHP on my laptop?

------
0
I am running Ubuntu 14.04.5 LTS in Amazon Web Services with an Elastic IP and an inbound connection for my Static IP.

I need to simply copy files from Ubuntu (Ubuntu 14.04.5) to my local mac (running OS 10.14.2) and then copy them back, both using a Terminal window and SSH.

I've tried scp, but can't seem to get the command correct as the error I'm getting is:

"ssh: connect to host **.*.**.*.** port 22: Connection timed out" (This IP is the Elastic IP).

What am I doing wrong? Help! Thanks in advance. :-)
0
Hello there,

I want to restart my java application which is running on Ubuntu 16.04 as service. But the problem I have is on Ubuntu when I want to restart my java application service, I do as follows
sudo service myapp restart

Open in new window

and then Ubuntu asks for password. Now how can I tell Ubuntu to not ask password when I send this cmd from my application.

//Restart application server
		router.get("/restartAppService").handler(ctx -> {
			/* Build command: sudo service AooService stop */
			  final ArrayList<String> command = new ArrayList<String>();
			  command.add("sudo service TutisService restart");
			  System.out.println("CMD ----"+command.toString());
			  final ProcessBuilder builder = new ProcessBuilder(command);
			  	try {
			  		builder.start();
				} catch (IOException e) {
					System.out.println("EXCEPTION WHILE RESTARTING SERVICE----"+e.getMessage());
					e.printStackTrace();
				}
			  //System.exit(0);
		});

Open in new window


Any help will be appreciated!!

cheers
Zolf
0
I'm looking to use apt-get for Ubuntu and yum for Centos to do the following as root:

1) Ubuntu: apt-get update ; apt-get -d dist-upgrade
to just download the update items for later install

2) How do I install the previously downloaded files at a different time? I was thinking apt-get -f install but can't tell if t will get all the updates. - my 2 Ubuntu systems are both up to date so I can't test this yet

3) yum for CentOS doesn't seem to have a download only option. This part of the question is not as critical.

Thanks in advance
0
Are there instructions somewhere for setting up VPN on Ubuntu via command line?

Anyone can provide any reference please?  Thank you!!
0

Ubuntu

250

Solutions

338

Contributors

Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.