How to fix docker vulnerabilities (USN-4048-1) in ubuntu 18.08 LTS - amazon-ec2

I have AWS EC2 ubuntu 18.04 LTS machine. I want to fix the docker vulnerabilities (USN-4048-1).
Installed package : docker.io_17.03.2-0ubuntu7~ppa1
Fixed package : docker.io_18.09.7-0ubuntu1~18.04.3
How can i do that ? What's the steps to fix it ?

The simple way is to follow below step:
If the update-notifier-common package is installed, Ubuntu will alert you about pending updates via the message of the day (motd) upon console or remote login.
After logging in, you can check for and apply new updates with:
When performing an update, first review what apt is going to do, then confirm that you want to apply the updates (this is particularly true when running the development release).
If you would prefer to have updates applied automatically, make sure the unattended-upgrades package is installed, then run 'sudo dpkg-reconfigure unattended-upgrades'. Please note that updates may restart services on your server, so this may not be appropriate for all environments.
$ sudo apt-get update
$ sudo apt-get dist-upgrade
source : https://wiki.ubuntu.com/Security/Upgrades?_ga=2.36307296.1783287754.1567592268-1506938917.1567592268

Related

apt-get command not found in coreOS (cos)

I would like to install tools in my cluster VM to debug, like dnsutils or mysql to test connections.
My cluster VM use container optimized OS (cos).
Whenever I try
apt-get update
I got an error
-bash: apt-get: command not found
How could I achieve this ?
As explained here, execute
/usr/bin/toolbox
It will download docker images and login inside once completed, as root user.
You will be able to execute commands like apt-get update / install and debug

pkill does not seem to remove dpkg process in Ubuntu 18.04 LTS

I'm currently using Ubuntu 18.04 LTS, and I am trying to install GitLab via the instructions on https://www.linode.com/docs/development/version-control/install-gitlab-with-docker/.
Initially, I was following the instructions to download and install GitLab via Ubuntu 18.04 LTS at: https://about.gitlab.com/install/#ubuntu, which lead to a problem similar to the problem posed here: https://askubuntu.com/questions/637962/gitlab-install-is-stuck-at-0-on-ubuntu.
I then tried removing the processes involving dpkg with the help of sudo pkill gitlab, following the instructions posed at: https://unix.stackexchange.com/questions/94430/process-id-and-killing-process-ps-commmand.
However, I obtained the following error:
Is there a way to resolve this such that you must manually run sudo dpkg --configure -' to correct the problem does not appear again?
To answer your specific question, running dpkg --configure -a once should resolve the issue and you won't see the message again on future apt install execution. This problem arises because you kill apt in the middle of it doing work.
It seems like the root of the issue may be that you cannot access the GitLab package repository, or CloudFront, to pull the package?
Are you able to access https://packages.gitlab.com/gitlab/gitlab-ee from this system? i.e. curl https://packages.gitlab.com/gitlab/gitlab-ee
If the above works, can you try downloading an actual package manually to see if that works? i.e. wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ee/packages/ubuntu/xenial/gitlab-ee_12.2.4-ee.0_amd64.deb/download.deb
The image itself is served via CloudFront. So I wonder if you're able to connect to https://packages.gitlab.com but not cloudfront.net once the actual file is served.

how to uninstall sonarqube-6.4.1 from ubuntu

h all ,
i am trying to uninstall sonarqube from the ubuntu machine using command "sudo apt-get remove --purge autoremove sonarqube-6.4.1" but I am getting error as no packages foun some one kindly help me with uninstalling soanrqube complaetly from ubuntu machine
Your purge isn't working because SonarQube likely wasn't installed via apt-get. So how was it installed? The docs offer clues:
Installing the Web Server tells you to download the SonarQube zip, expand it, and configure the properties file. So your first step would be to wipe out the SonarQube directory.
Of course, if SonarQube is running as a service on your machine, just deleting the diretory could lead to errors at the next startup, so you'll need to unwind that part too. For setting up a service, the docs advise you to:
create /etc/init.d/sonar
create a link in /usr/bin/sonar to the SonarQube start script
update your defaults
So you'll want to back those things out too.

enable ldap module in laravel homestead

Currently have an issue where i can not enable the ldap module in homestead. I have changed multiple php.ini files and still nothing seems to be working. Has anyone else had issues with enabling modules in homestead?
Side note: when trying to restart php-fpm i am getting a permission denied issue. They prompt me with a password (which i have tried "secret") but still cant seem to get that to work either.
Have restarted the homestead instance multiple times as well. no prevail.
any thoughts?
Citti
I think this question deserves its own answer as it's pretty easy to install the wrong version of ldap on homestead and not know why things aren't working.
TL;DR: Match the version of ldap to the version of php you're running & install with apt-get.
For example, running homestead v.6.1.0:
cd HOMESTEADFOLDER # on your host
vagrant ssh # access the guest machine
sudo apt-get update # update apt-get package list
sudo apt-get install php7.1-ldap # or whatever version
In my example above, if you switch out php7.1-ldap for php7.0-ldap everything appears to install correctly (it does in fact install correctly) but, in reality, you've installed the module to a version of php that's not actually running. It took me several attempts at rebooting FPM to figure out this is what I had done.
Side note: apt-get will restart php and reload modules so there's no need to try and reboot the server or mess about with .ini files.
While ssh-ed in to the guest machine, you can check that the package is installed with php -m
If ldap is a thing your project needs, it's probably a better idea to handle this in a script. The answer referenced by fh-jashmore in his comment above comment has a simple but solid example: How to automatically enable php extensions in Homestead on vagrant up

Installing and Managing Jenkins on Amazon Linux

I'm looking to move Jenkins to Amazon EC2 running Amazon Linux.
Currently we have Jenkins installed as a package (via yum). I'm considering running Jenkins as the contained jenkins.war on EC2 (for auto-upgrades and ease of deployment).
Unfortunately I've been unable to find much documentation regarding managing jenkins as the latter.
I'm trying to determine:
Which installation is preferred, and why?
If running as a contained jar:
How do I start/stop jenkins?
Should I create a jenkins user?
Installation Steps :
Please launch an Amazon Linux instance using Amazon Linux AMI.
Login to your Amazon Linux instance.
Become root using “sudo su -” command.
Update your repositories
yum update
Get Jenkins repository using below command
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
Get Jenkins repository key
rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
Install jenkins package
yum install jenkins
Start jenkins and make sure it starts automatically at system startup
service jenkins start
chkconfig jenkins on
Open your browser and navigate to http://<Elastic-IP>:8080. You will see jenkins dashboard.
That’s it. You have your jenkins setup up and running. Now, you can create jobs to build the code.
Reference: http://sanketdangi.com/post/62715793234/install-configure-jenkins-on-amazon-linux
Jenkins Installation Ubuntu 14.04/16.01
Please follow the steps given below.
Switch to root user sudo su -
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install default-jre
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
apt-get install jenkins
Get jenkins Password from:- vi /var/lib/jenkins/secrets/initialAdminPassword
Browse:- eg: 192.168.xx.xx:8080

Resources