SSHD on OS X in Travis CI - macos

I need SSHD (SSH server) enabled in order to make Hadoop running in my Travis CI job.
For Linux I just do sudo apt-get install openssh-server and it works. But for OS X the only tips I've found say to enable Remote Login in settings: How to install sshd on Mac?
How can I enable SSHD using just .travis.yml for OS X?

I've finally found the command to enable Remote Login from terminal:
sudo systemsetup -setremotelogin on

Related

Connect to CentOS desktop (GUI) installed on Google cloud

I've installed Centos7 on the Google Cloud Platform, as you know there is just ssh option to connect to the machine.
Now I need to have access to its desktop(GUI) from my laptop (it's win10).
it's appreciated if anyone can help me.
Thanks in advance
you need to ssh login into your CentOS machine either from ssh button in Gcloud, or using the cloud shell:
gcloud compute ssh test-vws
then setup a password for your account:
sudo passwd `whoami`
After that, you will need to install a client that will allow you to navigate the GUI for your server.
again, on your server command line execute:
sudo yum -y update
sudo yum -y groupinstall 'Server with GUI'
once finished, follow this guige to install and setup Teradici Cloud Access Software (Remote Desktop Agent for CentOS).
Installing Teradici Cloud Access Software
On your virtual workstation, install the Teradici repositories:
sudo yum -y install https://downloads.teradici.com/rhel/teradici-repo-latest.noarch.rpm
Install Teradici Standard Agent for Linux:
sudo yum -y update
sudo yum -y install pcoip-agent-standard
Then you will have to register the Agent and create a firewall rule to allow the connection, just follow the guide, and your desktop connection will look like this:

How to run "docker-machine create" in OS X?

I started Docker and am now following the tutorial, but for all I know I couldn't run the docker-machine command on OS X.
The documentation states that you run the following command to create a local virtual machine:
docker-machine create --driver virtualbox manager
However, this command doesn't work in OS X (11.6), with the following error:
Running pre-create checks...
Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"
I tried to install the virtualbox; however, another page clearly states that you must not install it on your local machine:
VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac)
Note: If your system does not satisfy these requirements, you can install Docker Toolbox, which uses Oracle VirtualBox instead of HyperKit.
So I only installed Docker for Mac and not virtualbox. So what am I missing here? The example page says you can run the tutorial on OS X, so I wonder how I can proceed...
You can follow along and run this example using Docker for Mac, Docker for Windows or Docker for Linux.
I had the same issue today and resolved it by installing VirtualBox as an additional step after installing Docker for Mac (I did so with brew install --cask virtualbox)
I don't recall having to do the extra install previously, but maybe I already had VirtualBox already installed because of another tool (like Vagrant). Anyway, this is explained in the Docker Machine documentation:
If you are using Docker for Mac
Docker for Mac uses HyperKit, a lightweight macOS virtualization
solution built on top of the Hypervisor.framework in macOS 10.10
Yosemite and higher.
Currently, there is no docker-machine create driver for HyperKit, so
you will use virtualbox driver to create local machines. (See the
Docker Machine driver for Oracle VirtualBox.) Note that you can run
both HyperKit and Oracle VirtualBox on the same system. To learn more,
see Docker for Mac vs. Docker Toolbox.
Make sure you have the latest VirtualBox correctly installed on your system (either as part of an earlier Toolbox install, or manual
install).
I had the same issue. At the same spot ;-)
For me the xhyve driver, available from https://github.com/zchee/docker-machine-driver-xhyve, worked.
In short:
brew install docker-machine-driver-xhyve
You get a notice some links need to be created manually, so copy those and execute
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Create:
docker-machine create --driver xhyve manager
Without VirtualBox. Im using OS X 10.11.6, too.
After updating my docker docker-machine command stopper working on my mac terminal.
So found after updating my docker I'll have to reinstall docker-machine CLI just to get the latest version.
Updated docker-machine to latest one using the command below helped me making docker-machine command working again.
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-
machine &&
chmod +x /usr/local/bin/docker-machine
See Docs (https://docs.docker.com/machine/install-machine/#install-machine-directly)

how to get GUI on Amazon ec2 ubuntu instance

I have an Amazon ec2 instance in which I can login through putty. I want GUI on that instance. Please anyone help me, how can I get GUI on ec2 instance.
Install VNC and connect using VNC. View the video here.
You can also use an X11 server like MobaXTerm: http://mobaxterm.mobatek.net/ ot Xming: http://sourceforge.net/projects/xming/ (assuming you work on a PC running Windows).
login ec2 instance and execute below commands
Sudo apt-get update
Sudo apt-get install lxde
sudo start lxdm
sudo apt-get install xrdp
sudo passwd ubuntu
then open RDC
username -- hostname which you provided in putty

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

Clamav installation steps for linux centos

I have tried to install clamav in linux centos, but not able to succeed, so anybody provide me the procedure to install clamav antivirus and test the same.
Thanks in advance
First thing to do is install the program sudo apt-get install clamav
It´s necessary install the deamon program as well sudo apt-get install clamav-daemon
Once that we have the program properly installed, will be necessary configure to make it works with our app. /etc/clamav/clamd.conf
TCPAddr 127.0.0.1
TCPSocket 3310
To configure by console the antivirus just type sudo dpkg-reconfigure clamav-freshclam
Restart the service sudo /etc/init.d/clamv-* restart
For CentOS 6
Install ClamAV via yum epel repo:
yum install clamd
Edit config file:
vim /etc/clamd.conf
ExtendedDetectionInfo yes
ExcludePath /usr/local/maldetect/
DetectPUA yes
Set to start on boot:
chkconfig clamd on
Update ClamAV prior to a scan:
freshclam
Start ClamAV:
service clamd start
Add the cron for daily automatic scans:
vim /etc/cron.daily/daily-clamscan
#!/bin/bash
SCAN_DIR="/"
LOG_FILE="/var/log/clamav/daily-clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
Set proper cron permissions:
sudo chmod +x /etc/cron.daily/daily-clamscan
Update the logrotate file to look for all logs via wildcard
vim /etc/logrotate.d/daily-clamscan
/var/log/clamav/daily-clamscan.log {
missingok
notifempty
create 644 clam clam
}
Thats how I installed it on my machine. Here are a few good quick commands or you can use the cron to manually run it. I also installed Linux Malware Detect (LMD) with it so I can do more for my scans.
Full System Scan that only displays infected files and runs in the background with bell
Use jobs command to view status
clamscan -r --bell -i / &

Resources