Thứ Ba, 18 tháng 12, 2018

extend lvm

echo "- - -" > /sys/class/scsi_host/host#/scan pvcreate /dev/sdc pvscan vgextend vgdata /dev/sdc vgscan lvextend -l +100%FREE /dev/vgdata/lvdata lvscan resize2fs /dev/vgdata/lvdata ...
Read More

Thứ Hai, 17 tháng 12, 2018

How to Add a New Disk Larger Than 2TB

Find Out Current Disk Size Type the following command: # fdisk -l /dev/sdb Sample outputs: Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes 255 heads, 63 sectors/track, 364801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdb doesn't contain a valid partition table Linux Create...
Read More

Thứ Tư, 21 tháng 11, 2018

Convert Apache (x509 cert) SSL Certificate to Tomcat (Keystore)

When setting up SSL certificate for a website, we mainly use two types of SSL certificate one is x509 mostly used with applications support OpenSSL library and other is Keystore which is used with Java 1.6+ applications. Apache/Nginx uses x509 pem/crt files which is is very different than a Jetty/Tomcat (Java 1.6+) system that uses keystores and differences start right from generating a Certificate Signing Request (CSR). So,...
Read More

Thứ Ba, 30 tháng 10, 2018

Ways to kill parent and child processes in one command

Ways to kill parent and child processes in one command On linux, kill a process is simple, but sometimes, when something goes wrong, a process could fork hundreds and thousands child processes, you can either create a script to kill them all, or find some quick ways to kill them all in one command. Here is the ways I use, some of them may not work on all linux distributions. 1.kill a group of processes with negative PID(Process...
Read More

Thứ Tư, 10 tháng 10, 2018

Apache Tomcat SSL Configuration

Configuring Tomcat To Use SSL Setting up SSL for Tomcat can be pided into two main tasks: creating a functional keystore, and configuring the Tomcat connectors and applications. Let's tackle them one at a time. PART I - The Keystore Step 1 - Creating the Keystore The keys Tomcat will use for SSL transactions are stored in a password-protected file called, creatively, the "keystore." The first step to enabling SSL on your...
Read More

Thứ Năm, 4 tháng 10, 2018

How to Flush Memory Cache and Buffer Cache on Linux

Many times systems faced low memory issues of Linux systems running a while. The reason is that Linux uses so much memory for disk cache is because the RAM is wasted if it isn’t used. Cache is used to keep data to use frequently by the operating system. Reading data from cache if 1000’s time faster than reading data from hard drive.It’s good for the os to get data from the cache in memory. But if any data not found in the cache,...
Read More

Thứ Ba, 25 tháng 9, 2018

How to merge worksheets / workbooks into one worksheet?

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window. 2. Click Insert > Module, and paste the following code in the Module Window. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Sub Combine() Dim J As Integer On Error Resume Next Sheets(1).Select Worksheets.Add Sheets(1).Name = "Combined" Sheets(2).Activate Range("A1").EntireRow.Select Selection.Copy Destination:=Sheets(1).Range("A1") For...
Read More

Thứ Ba, 18 tháng 9, 2018

Share LUN giữa các host

Từ bước 1 -> 5 các bước này thực hiện trên tất cả các host 1. Cài đặt yum install pcs pacemaker fence-agents-all -y2. allow firewall# firewall-cmd --permanent --add-service=high-availability# firewall-cmd --add-service=high-availability3. Đặt passwork cho user hacluster# passwd hacluster4. Start pcsd# systemctl start pcsd.service# systemctl enable pcsd.service5. Add authentication trên mỗi hosts[root@ubqlvnn-app01-48 ...
Read More

Thứ Hai, 17 tháng 9, 2018

Using Powershell list of websites IIS using get-website

C:\Users\Administrator>powershell -ExecutionPolicy BypassWindows PowerShellCopyright (C) 2012 Microsoft Corporation. All rights reserved.PS C:\Users\Administrator> import-module WebAdministrationPS C:\Users\Administrator> get-website | select name,id,state,physicalpath, @{n="Bindings"; e= { ($_.bindings | select -expa collection) -join ';' }} ,@{n="LogFile";e={ $_.logfile | select -expa directory}}, @{n="attributes";...
Read More

Thứ Sáu, 14 tháng 9, 2018

How To Reset Root Password CentOS 7

1 – In the boot grub menu select option to edit. 2 – Select Option to edit (e). 3 – Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh. 4 – Now press Control+x to start on single user mode. 5 – Now access the system with this command. chroot /sysroot 6 – Reset the password. passwd root 7 – Update selinux...
Read More

Thứ Ba, 14 tháng 8, 2018

Microsoft Visual C++ Redistributable All Versions Direct Download Links

Microsoft Visual C++ Redistributable is the library that is having components which are required by many Applications to run, and the Apps which you develop on Visual C++ require components of the Microsoft Visual C++ Redistributable. These packages are used to run the contents that are developed or written in the C++ programming language.There are many Microsoft Redistributable packages installed on your System. You can view...
Read More

Thứ Tư, 8 tháng 8, 2018

How To Install Java on CentOS and Fedora

Introduction This tutorial will show you how to install Java on CentOS 7 (also 6 and 6.5), modern Fedora releases, and RHEL. Java is a popular software platform that allows you to run Java applications and applets. The installation of the following versions of Java are covered: OpenJDK 8 OpenJDK 7 OpenJDK 6 Oracle Java 9 Oracle Java 8 Feel free to skip to your desired section using the Contents button on the sidebar! Prerequisites Before...
Read More