Centos7

How to Create Site With Hugo

Install hugo on Centos7 Add epel repo The Hugo package can be found at https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/, take the correct version, and place it in /etc/yum.repos.d/hugo.repo vim /etc/yum.repos.d/hugo.repo # add content below the file [copr:copr.fedorainfracloud.org:daftaupe:hugo] name=Copr repo for hugo owned by daftaupe baseurl=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/epel-7-$basearch/ type=rpm-md skip_if_unavailable=True gpgcheck=1 gpgkey=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/pubkey.gpg repo_gpgcheck=0 enabled=1 enabled_metadata=1 Install yum -y install hugo hugo version Quick start # Create a new site hugo new site mysite # Add a Theme cd mysite git init git submodule add https://github.

Mount S3 Bucket to a Local System

In this exercise, we will try to mount s3 to local system with s3fs package. Mount the s3 bucket to local directory aws configure aws s3 mb s3://testbucket sudo cp -r ~/.aws /root # install s3fs sudo yum install s3fs-fuse -y mkdir /mnt/s3data sudo s3fs {BUCKET_name} /mnt/s3data -o allow_other -o default_acl=public-read -o use_cache=/tmp/s3fs echo "<html><h1>test</h1><html>" > index.html #check file in local folder and s3 ll /mnt/s3data aws s3 ls s3://{BUCKET_name} Access the s3 bucket data from Docker Container Once mounted we can access the data in a container as well

Add Disk Storage to VirtualBox on Centos7

Add the Virtual Dirve Open Oracle VM VirtualBox Manager, select the virtual box which we want to add the storage, click Settings Click Storage, Select Drive (Controller: SCSI or Controller: IDE etc.) and click Adds hard disk Follow the instructions to enter all the details, such as disk file location, size etc. Partition the New Drive and file system # the new driver assigned to /dev/sdb ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sdb # partition with fdisk fdisk /dev/sdb # change: DOS Compatibility flag is not set (command 'c') and Changing display/entry units to sectors (command 'u') # enter n (new partion) , p(primary partition), 1 (partition number) ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1 # create a file system /sbin/mkfs.