Saturday, March 7, 2020

rsync -rv uploads_old/ uploads

rsync -rv uploads_old/ uploads


I hope it helped. Feel free to comment...

Saturday, January 18, 2020

Display Center | Start your fashion business | Apna Fashion ka Karobar S...





Be your own boss. Apna fashion ka karobar shroo krain. Display center pr display area book krain pooray mahiny k liye sirf 2000 se 15000 mai. KHAS, Opposite Soldier Plaza, Civil Lines, Jhelum.
http://www.displaycenter.pk/
http://www.displaycenter.pk/pdf/Displ...

Sell with minimum Risk and maximum Growth
Zero Commission and Total Control
Every rupee you earn is yours




 I hope it helped. Feel free to comment...

Friday, January 22, 2016

Vagrant for the beginners ... Tutorial.



Vagrant is a higher level wrapper around different virtualization and configuration management software.

Virtualization Software:
  1. VirtualBox, 
  2. VMware, 
  3. KVM and 
  4. Linux Containers (LXC)
Configuration Management Software:
  1. Ansible, 
  2. Chef, 
  3. Salt, and 
  4. Puppet.

Deploy your uniform environment on any virtual platform. For example, you may deploy with vagrant on Amazon Cloud or Virtual Box  with same environment without any hassle. As a best practice, push vagrant file in the version control repository so that others can benefit without any upfront work.

vagrant init

vagrant box add hashicorp/precise64
 
 

The box add command creates a box from the image "hashicorp/precise64". The box name consists of 2 parts;  is username and  is box name.


Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
end 
 
 
vagrant up
 
 


We see there is an error in mounting and syncing the directories. The issue is fixed by upgrading to virtual box 5.0.14

We will not be able to see anything since Vagrant runs VM without any user-interface. To check if its running, we can SSH it.

vagrant ssh




SSH failed since SSH client is not installed. We will use Putty to SSH the virtual machine. Import the private key to puttygen and save .ppk file.

Now we can connect to box using putty.

vagrant reload --provision

I hope it helped. Feel free to comment...

Monday, September 21, 2015

Automating Build and Deployment of PHP Applications



Download Jenkins for Windows from http://jenkins-ci.org/;

Unzip the Jenkins.zip file in to setup files.

Install Jenkins.

Run command line.

Make sure that java is installed and its path is set.

To start Jenkins, please run this command.

java -jar jenkins.war
https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins
 
Open in browser, using the following URL.
 
http://localhost:8080/ 




I hope it helped. Feel free to comment...

Sunday, April 27, 2014

Auto-Code Deployment on Production Servers Using GIT

sudo apt-get install git

git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git --work-tree=/var/www/ init

git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git clean -df & git checkout .

git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git pull

pulls the contents in the current directory in  which you are.

git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git --work-tree=/var/www/ pull

code is pulled in the --work-tree directory. But there is still one issue, it asks for username and password which is entered manually.

git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git config credential.helper store

To store credentials in a file on disk, by default stored at ~/.git-credentials

We can set credentials file path by following
git --git-dir=/home/ubuntu/git/oneworldbox-stb-api/.git config credential.helper store=<path>

git remote set-url origin http://username:password@gitlab.jemtv.com/oneworldbox-stb-api.git

I hope it helped. Feel free to comment...

Tuesday, April 8, 2014

ab - staging

 $ ab -n 1000 -c 5 http://baseurl/qa.php/2_4/gxml/tier1/2/0/0/cc/device_id
Where,
  • -n 1000: ab will send 1000 number of requests to server 202.54.200.1 in order to perform for the benchmarking session
  • -c 5 : 5 is concurrency number i.e. ab will send 5 number of multiple requests to perform at a time to server 202.54.200.1
----------------------
staging
-----------------------
[Tue Apr 08 15:12:29 2014] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 1 idle, and 205 total children

------------------------
HA-Proxy
------------------------
Apr  8 14:45:55 ip-10-11-144-86 rsyslogd-2177: imuxsock begins to drop messages from pid 19954 due to rate-limiting

I hope it helped. Feel free to comment...