Articles with tag - centos

Install LAMP in CentOS 7

Posted on 3 years ago by Ping Cheng

Overview

LAMP is a term that stands for Linux, Apache, MySQL and PHP. LAMP provides the basic service for the web hosting. Most website application like WordPress requires those services. This guide will list the command you need to use for LAMP installation in CentOS 7. All commands should be run in the Terminal unless specific required

Steps

Step 1 - Install Apache Service

Apache is a service that runs under Linux system to provide web service through HTTP. To install Apache, we use this command to install:

sudo yum install httpd

After installation finish, use this command to start the Apache:

sudo systemctl start httpd.service

Now your Apache service is running. To check if it is running, accessing http://localhost or http://[IP address] by Firefox. If Apache is working, Firefox would display a page with "Testing 123..." If you would like to start Apache on boot, please input this command:


sudo 

...

[ Read More ]


Checking the size of directories in Linux

Posted on 3 years ago by Ping Cheng

This command line will help you to summary the size of all files/directories under present working directory:

du -shc *

Command explaination: du -> estimates space usage for the specific path (*)

-s, --summarize display only a total for each argument

-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)

-c, --total produce a grand total

example


Extending a Linux File System after Resizing the Volume

Posted on 3 years ago by Ping Cheng

Article source: AWS

This is a log to keep a note to help me on resizing the linux file system in the future. The steps are :

adjust the volume on the AWS, and wait for the complete of volume resizing process

check if the disk was resized

lsblk

extend the disk

sudo growpart /dev/xvdf 1

resize the volume to the new capacity (I am using the xfs file system, other file systems command may be different)

sudo xfs_growfs -d /mnt

check the new volume size

df -h
Search
Hand crafted with by Ping Cheng