Posts

Mongod is not stopping properly on Centos6.5

Just change the following line on function mongo_killproc() in mongod init script[line 94], # vim /etc/init.d/mongod local pid=`pidof ${procname}` instead of local pid=`pidofproc -p "${pid_file}" ${procname}`

How to install and configure the GitLab in Ubuntu 14.04

Step 1:- Check the Hardware requirements. ====== http://doc.gitlab.com/ce/install/requirements.html Here I going to use Ubuntu 14.04 LTS version. Step 2:- Choose an installation method [ Installation from source or Omnibus package installer ]. ====== But they recommend installing the Omnibus package instead of installing GitLab from source. Omnibus GitLab takes just 2 minutes to install and is packaged in the popular deb and rpm formats. Compared to an installation from source, the Omnibus package is faster to install and upgrade, more reliable to upgrade and maintain, and it shortens the response time for our subscribers' issues. A package contains GitLab and all its dependcies (Ruby, PostgreSQL, Redis, Nginx, Unicorn, etc.), it can be installed without an internet connection. But I am going to try both methods now. Step 3:- Install GitLab from Omnibus package. ====== Enterprise Edition is license-based, so I going to install Community Edition which is free. 1. Install and config...

P2V Migration in VMware

Question:- --------------- i need to migrate a Linux box with no downtime to ESXi and with VMware tool that is not possible or i don't know how because you can't install the VCenter Converter into a linux OS and to the live migration with synchronization. Does any 1 know a way to do this? Solution:- --------------- Of course, we can migrate the Linux physical machine to ESXi host using vsphere converter tool. Yes, we can't install converter tool in linux but we can install it in windows machine then we can migrate the physical machine to ESXi through windows VM. Recently I did this task. Please follow the below steps. 1. Install a windows machine in ESXi host where you want to migrate the physical machine. 2. Install the vsphere converter tool in that windows machine. 3. But please choose the source machine as linux physical machine instead of "localhost". If you select localhost then that win...

KVM & Qemu

QEMU is a powerful emulator, which means that it can emulate a variety of processor types. Xen uses QEMU for HVM guests, more specifically for the HVM guest's device model. The Xen-specific QEMU is called qemu-dm (short for QEMU device model) QEMU uses emulation; KVM uses processor extensions (intel-VT) for virtualization. Both Xen and KVM merge their various functionality to upstream QEMU, that way upstream QEMU can be used directly to accomplish Xen device model emulation, etc. Xen is unique in that it has paravirtualized guests that don't require hardware virtualization. Both Xen and KVM have paravirtualized device drivers that can run on top of the HVM guests. The QEMU hypervisor is very similar to the KVM hypervisor. Both are controlled through libvirt, both support the same feature set, and all virtual machine images that are compatible with KVM are also compatible with QEMU. The main difference is that QEMU does not support native virtualization. Consequently, QEMU has ...

Packet Drop issue

Packet drops can happen at two layers. one at the NIC level or at the Network stack level. 1. Nic level:-  Check 'ifconfig' output. RX packets:297126179 errors:0 dropped:3981 overruns:0 frame:0 TX packets:233589229 errors:0 dropped:0 overruns:0 carrier:0 That means packets drops at the NIC level. These are most likely caused by exhaustion of the RX ring buffer. Increase the size of the Ethernet device ring buffer. First inspect the output of "ethtool -g eth0". If the "Pre-set maximums" are more than the what's listed in the current hardware settings it's recommend to increase this number. As an example: # ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 1020 RX Mini: 0 RX Jumbo: 16320 TX: 255 Current hardware settings: RX: 255 RX Mini: 0 RX Jumbo: 0 TX: 255 To increase the RX ring buffer to 4080 you would run "ethtool -G eth0 rx 1020". 2. Network stack level:- Need  to tweak sysctl kernel...

Active vs Passive ftp

Active and passive are the two modes that FTP can run in. FTP uses two channels between client and server, the command channel and the data channel, which are actually separate TCP connections. The command channel is for commands and responses, the data channel is for actually transferring files. It's a nifty way of sending commands to the server without having to wait for the current data transfer to finish. In active mode, the client establishes the command channel (from client port X to server port 21 (b) ) but the server establishes the data channel (from server port 20 (b) to client port Y , where Y has been supplied by the client). In passive mode, the client establishes both channels. In that case, the server tells the client which port should be used for the data channel. Passive mode is generally used in situations where the FTP server is not able to establish the data channel. One of the major reasons for this is network firewalls. While you may have...

Create a simple webserver container on Docker

1. Start the container with a shell, #docker run -i -t -p 8080:80 214a4932132a /bin/bash Mapped the host port 8080 to container port 80, so that you can access the container webserver contents through apache. [It is similar as DNAT] 2. Install the web server package inside the container, At first, the containers have only internal IP addresses. To access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on theHardware Node. [root@proxy ~]# iptables -t nat -A POSTROUTING -s 172.17.0.0/24 -o eth0 -j SNAT --to 31.x.x.x 172.17.0.0 - Container's ip range 31.x.x.x - Host public IP Now you can able to access the internet from container, then we can install the apache server. [root@c576532e21ab /]# yum install httpd -y 3. Create a custom content in document root, [root@c576532e21ab /]# echo "Hello world" > /var/www/html/index.html 4. Test the web server, We cant start the httpd service through ...