Total Hit Counter

Wednesday, August 17, 2016

Wifi not getting up after suspend in ubuntu 16.04

Hi Friends,

Before couple of days I have upgraded my laptop from Ubuntu 14.04 to Ubuntu 16.04. After upgrade I was facing some misbehavior issues.

One of them was when I wake my laptop after suspend, it was unable to connect to any of wifi devices.

Here, I am going to give solution for the same. I figured it out that after suspend it was not able to start wifi again.


You just follow below steps and it will be done.

Step 1: To verify before applying this solution by executing below command after wake up from suspend, you check whether it will work for you or not.
$ sudo systemctl restart network-manager.service
Now if it works then further you apply below is permanent solution.

Step2: Create a file with name wifi-reset.service in /etc/systemd/system/ directory with below content:

[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target
[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
Step3: Now enable service at boot time, wakeup time and hibernet time using following command: 
systemctl enable wifi-resume.service
That's it, you are done now.
Please check after suspend again....................





Wednesday, June 8, 2016

Getting started with Docker Container service

Hi Guys,

Below are the steps to install docker container and start working on it. As I have installed docker on Centos Server, below are the steps to install on it.

System Requirement:
1) Kernel must be 3.10 or more then that.
2) device-mapper-libs must be installed on it.

Steps are as below:

Step1: Installation of latest kernel.
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
yum -y --enablerepo=elrepo-kernel install kernel-lt
yum -y install device-mapper-libs
vim /etc/grub.conf and chnage default kernel to 0
reboot
uname -a

Step2: Installation of Docker packge repository
sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

Step3: Installation and Start docker service.
yum install docker-engine
service docker restart

you can check logs by executing below command


tail -f /var/log/docker

Now Press CTRL+C

Step4: Start your hello-word container.
docker run hello-world
docker ps -a
You will see there will be 1 container running on your server with named hello-world


Example of Nginx Server: 

docker pull nginx
docker run --name docker-nginx -p 80:80 nginx
mkdir -p ~/docker-nginx/html
cd ~/docker-nginx/html
vim index.html

docker ps -a
docker stop docker-nginx
docker ps -a
docker rm docker-nginx
docker run --name docker-nginx -p 80:80 -d -v ~/docker-nginx/html:/usr/share/nginx/html nginx

Login to docker on bash shell:


docker exec -i -t 2f9f1cacb645 /bin/bash

Now you can check nginx service is running on it.
Also check ip address using below command
ip add

Now Browse the same ip in your server you will see sample page you have created.

That's it.................

Tuesday, January 5, 2016

Bootstrap Node in Chef-server

Now you need to bootstrap a node with your chef-server.

Please execute below command for the same.

knife bootstrap xxx.xxx.xxx.xxx --ssh-user root --ssh-password 'password' --run-list 'recipe[init-setup]'