OpenVAS installation and running errors - openvas

I've installed Greenbone Security Assistant Version 9.0.1 (OpenVAS) by this instruction on my VirtualBox's Ubuntu 20.4.
sudo apt install postgresql
sudo add-apt-repository ppa:mrazavi/gvm
sudo apt install gvm
greenbone-nvt-sync
sudo greenbone-scapdata-sync
sudo greenbone-certdata-sync
Unfortunately, it does not works.
When I'm trying to create a task by Wizard, I have the task completed just in moment, with an empty log. And that's all.
I've tried three commands:
systemctl status ospd-openvas # scanner
systemctl status gvmd # manager
systemctl status gsad # web ui
Everything is okay, except ospd-openvas. The status is green and active, but there are some errors too:
Jul 20 15:00:27 alex-VirtualBox ospd-openvas[833]: OSPD - openvas:
ERROR: (ospd_openvas.daemon) Failed to create feed lock file
/var/run/ospd/feed-update.lock. [Errno 2] No such file or directory:
'/var/run/ospd/feed-update.lock'

From the error message it looks like the directory /var/run/ospd/ does not exist.
Create the directory and try to restart the service.
In ubuntu 20.04 /var/run points to /run which is a temporary file system. That means that if you create the directory /var/run/ospd manually, it will be gone after the next reboot. To fix it permanently (in case the missing directory is the issue), please refer to this post.

This may help some people with some of the issues I've been facing:
mkdir -p /var/run/ospd/
touch /var/run/ospd/feed-update.lock
chown gvm:gvm /var/run/ospd/feed-update.lock

Related

JFrog Xray installation Docker install on CentOS - permission denied

Trying to install JFrog Xray on a CentOS machine, using the Docker installer.
I've created a /opt/xray directory, where I've downloaded the install file into.
Then ran chmod +x xray on this file.
When I try to install using sudo "./xray install", I get the following output:
[root#xray xray]# sudo ./xray install
INFO: Using XRAY_MOUNT_ROOT=/root/.jfrog/xray
Verifying Xray prerequisites ...
WARNING: Running with 3GB Total RAM
WARNING: Running with 1 CPU Cores
The System resources are not aligned with Xray minimal prerequisites, Do you want to proceed with the process? [Y
touch: cannot touch '/data/installer.info': Permission denied
Are you adding this node to an existing cluster? (not relevant for the first cluster node) [Y/n]: n
mkdir: cannot create directory '/xray_global_mount_root/xray': Permission denied
./wrapper.sh: line 583: /xray_global_mount_root/xray/ha/ha-node.properties: No such file or directory
./wrapper.sh: line 586: /data/installer.info: Permission denied
./wrapper.sh: line 589: /data/installer.info: Permission denied
./wrapper.sh: line 592: /data/installer.info: Permission denied
ERROR: Installation failed
Any ideas what may be causing this?
I had a similar issue on RHEL and it was selinux getting in the way. To fix it, change the following line in the xray script: -
XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root"
To this: -
XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data:z -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root:z"
(basically adding :z to each volume).
This makes sure the folder is labelled to be used by multiple containers in selinux.

Fresh install: httpd.service: Unit not found

Currently I'm trying to follow this guide:
https://marxtudor.com/how-to-install-wordpress-using-ssh-on-centos-vps/
I'm using Google Cloud Platform (free edition to test) and I've created a fresh CentOS 7 VM. The guide above are the first commands I fill in and I keep getting this error:
I've followed so many tutorials, created a new VM and all the time I bump into this error that it doesn't know the httpd command.. I even deleted the project and started all over, but still no luck.
[rsa-key-XXXXXX]$ sudo service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Failed to restart httpd.service: Unit not found.
[rsa-key-XXXXXX]$ httpd -t
-bash: httpd: command not found
[rsa-key-XXXXXX]$
Could anyone please let me know what could be causing this ?
Thanks in advance!
I was also getting the same error, this is how i resolved my issue.
After logging to the machine:
Step 1: Become the root user.
command: sudo su
Step 2: Update Kernal
command: yum update -y
Step 3: Install Apache command: yum install
httpd -y
Step 4: Start Apache command: service httpd start
Step 5: Check Status of Service command: service httpd status
This should solve your problem. good luck
Do you want to install WordPress for your Compute Engine VM instance, using CentOS 7?
If this is the case, you may do so by setting up LAMP for your VM, as described here [1], and then download the WordPress release of your choice [2] and install it on your VM.
I understand that you have successfully set up a VM instance using Centos 7, is this correct? Assuming this, and as you may see from [1], for CentOS 7, these would be the commands to perform this installation:
1) Update and install Apache and PHP:
sudo yum check-update
sudo yum -y install httpd php
2) Start the Apache service:
sudo service httpd start
sudo chkconfig httpd on
3) Install, configure and start DB:
sudo yum -y install httpd mariadb-server php php-mysql
sudo systemctl start mariadb
4) Configure MySQL (set a password for the root user if you want):
sudo mysql_secure_installation
5) Restart Apache
sudo service httpd restart
Once MySQL is set up, you will have to create a database for your WordPress installation.
Following this procedure, you will have Apache, MySQL and PHP installed and running on your Compute Engine VM instance.
Then, you can download the WordPress release of your choice [2], unzip the file and install WordPress by visiting your IP address and the folder where WordPress was downloaded. For example, http://YOUR_PUBLIC_VM_IP_ADDRESS/wordpress.
You will be asked for a database name, the user and password. This will allow WordPress to create the wp-config.php file on your behalf and proceed with the installation.
At this point, you should have WordPress already installed on your Compute Engine VM instance using CentOS 7.
An easier way to install WordPress on Compute Engine VM instances, would be by using the Marketpĺace in the Cloud Platform Console. Go to your Products and Services menu > Marketplace, and search for "Wordpress". You will be presented with many different options to launch WordPress in a Compute Engine VM instance. Nevertheless, it seems that Debian is the deafult OS used for these options.
Links:
[1] https://cloud.google.com/community/tutorials/setting-up-lamp
[2] https://wordpress.org/download/
In my case, I resolved it by looking what actual package name had "httpd" in it.
yum search httpd
It returned httpd.x86_64
Also, later on, when doing sudo service httpd start, I received the notification that PolicyKit1 was needed. So, all up, that command installed the package:
yum install -y httpd.x86_64 polkit-qt.x86_64
service httpd start

Error: Error trying install composer runtime. Error: Connect Failed

Prog:dist abhishek$ composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString
Deploying business network from archive: my-network.bna
Business network definition:
Identifier: my-network#0.1.6
Description: My Commodity Trading network
✖ Deploying business network definition. This may take a minute...
Error: Error trying deploy. Error: Error trying install composer runtime. Error: Connect Failed
Command failed
when trying to install the composer runtime,returns
Prog:dist abhishek$ composer runtime install -n my-network -p hlfv1 -i PeerAdmin -s randomString
✖ Installing runtime for business network my-network. This may take a minute...
Error: Error trying install composer runtime. Error: Connect Failed
Command failed
I've been working through the Hyperledger Composer tutorial (https://hyperledger.github.io/composer/tutorials/developer-guide.html) on an older Mac, running OS X Mavericks 10.9.5, which means I'm using Docker Toolbox instead of Docker for Mac. I encountered the same error message when deploying the sample Trading network .bna file on my local dev environment Fabric network.
Here is the command in Terminal:
$ composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString -A admin -S
And here is the error log:
Error: Error trying deploy. Error: Error trying install composer runtime. Error: Connect Failed
In my case, it was because Docker Toolkit answers to on an IP address assigned when you start docker, instead of localhost, 127.0.0.1, etc.
If you are also using Docker Toolkit and are getting the same error, first find the docker IP number, which should be listed under the Docker Whale logo in Terminal when you started it, and then edit the following files (TextEdit should be fine), changing all references to localhost and 127.0.0.1 to the IP number (leave the ports, such as :7050, there):
fabric-tools/fabric-scripts/hlfv1/composer/configtx.yaml
fabric-tools/fabric-scripts/hlfv1/composer/docker-compose.yml
fabric-tools/fabric-scripts/hlfv1/createComposerProfile.sh
fabric-tools/fabric-scripts/hlfv1/createPeerAdminCard.sh
Then, back in Terminal, navigate back to fabric-tools, and if Fabric is already started, stop it, and then recreate the Composer Profile, as documented:
$ ./stopFabric.sh
$ ./createComposerProfile.sh
The log should now show the Docker Toolkit IP for the orderers, CA and peers. Now restart Fabric:
$ ./startFabric.sh
Navigate back to fabric-tools/my-network/dist and re-run the compose command, and if all goes well, it should connect properly.
Is your Fabric running? What is the output of docker ps?
Try doing the next:
Pick a directory that you want and install Hyperledger Fabric and Hyperledger Composer Playground running:
curl -sSL https://hyperledger.github.io/composer/install-hlfv1.sh | bash
Then run your command.
Try the code below:
$composer runtime install -c PeerAdmin#hlfv1 -n basic
$composer network deploy -a basic.bna -A admin -S adminpw -c PeerAdmin#hlfv1 -f admincard

Luarocks error on ubuntu

I am trying to run Neuraltalk2 on Ubuntu. But I am getting an error as follows:
parag#parag:~/torch$ sudo luarocks install nn
[sudo] password for parag:
Error: No results matching query were found.
I followed the following steps uptill now:
sudo curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
sudo git clone https://github.com/torch/distro.git ~/torch --recursive
sudo cd ~/torch;
sudo ./install.sh
sudo source ~/.bashrc
Please help!
Try running this all without sudo. The last line, especially, sudo source ~/.bashrc does not work because source is meant to operate on the shell you are currently running. If you run it with sudo, it will load .bashrc into the temporary subshell created by sudo (in practice having no effect).
Your error message indicates that luarocks was installed correctly, but it failed to find the rock. Make sure the name of the rock is correct, try searching it with the luarocks search command, and check your configuration running luarocks with no arguments (it will display the name of your config files in use, helping you to troubleshoot the issue).

Can't complete the mup setup in Meteor-Up

I have been able to get past #mup setup. I get the following error;
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Started TaskList: Setup (linux)
[212.1.213.20] - Installing Node.js
[212.1.213.20] â Installing Node.js: FAILED
-----------------------------------STDERR-----------------------------------
Warning: Permanently added '212.1.213.20' (RSA) to the list of known hosts.
stdin: is not a tty
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
-----------------------------------STDOUT-----------------------------------
----------------------------------------------------------------------------
Completed TaskList: Setup (linux)
I've found a lot about the error stdin: is not a tty but none of them make much sense to me.
Open your /etc/sudoers file, find the line that says Defaults requiretty, and change it to Defaults !requiretty.
This will disable the tty requirement globally.

Resources