Monitor Apache web server load and Page statistics

    Posted in Linux Servers on Jul 13, 2019

    Mod_status is an Apache module which helps to monitor web server load and current httpd connections with an HTML interface which can be accessible via a web browser.

    Enable mod_status in Apache

    vi /etc/httpd/conf/httpd.conf

    Search for the word “mod_status” or keep scrolling down until you find below line and remove # in order to enable mod_status.

    1.PNG

    Configure mod_status

    Search for the word "location" and put these lines in order to configure mod_status.

    2.PNG

    After this, define the same configuration for each virtual host file for any domain configured in apache. Like for example : www.exam...

    [Read more...]

    How To Reset Root Password On CentOS 7

    Posted in Linux Servers on Jan 24, 2019

    To get started, turn on the machine that you’ve forgotten the root password on. For CentOS 7 devices, you’ll be given 5 seconds at the boot menu to select the operating system kernel to boot into.

    That 5 seconds is important, because allows for admins to select different kernels or edit existing kernel parameters before booting.

    At the boot menu, press e to edit the existing kernel (Core) as shown below.

    Next, scroll down to the list until you see the line underlined below ( ro ) . What we need to do is change that ro to rw and start into a bash shell. It should look like this rw init=/sysro...

    [Read more...]

    How to manage csf via command line in linux server

    Posted in Linux Servers on Jan 02, 2019

    We can install the csf firewall to secure the Linux servers. We can manage the firewall via command line easily. Please read our the following article and command structure.

    Start the firewall rules
    Csf -s

    Example: #csf -s

    Flush/Stop firewall rules (note: lfd may restart csf)
    csf -f

    Example: #csf -f

    Restart the firewall rules
    csf -r

    Example: #csf -r

    Deny an IP and add to /etc/csf/csf.deny
    csf -d 

    Example: #csf -d 103.129.97.14

    Flush all IPs from the temporary IP entries
    csf -tf

    Example: #csf -tf

    Remove an IP from the temporary IP ban or allow list
    csf -tr

    Example: #csf -tr 103.129.97.14

    All...[Read more...]

    Wishing you and your family a Merry Christmas

    Posted in Linux Servers on Dec 24, 2018

    We would like to make the better use of this opportunity and congratulate our partners, who are benefited from our work. Hope for a better performing season in the new year.

    christmas.jpg

    [Read more...]

    How to export import a MySQL database via SSH

    Posted in Linux Servers on Nov 16, 2018

    In this article, we will cover exporting and importing a database via SSH. Make sure that you replace the following variables in the commands below:

    USERNAME - the MySQL user assigned to your database.

    DATABASE - the name of your MySQL database.

    Exporting a MySQL database

    To export a MySQL database, you need to use the mysqldump command. Here is the full command for exporting your database:

    mysqldump -uUSERNAME -p DATABASE > backup.sql

    You will be prompted for a password - this is your MySQL user's password.

    The MySQL database will be exported to a file named "backup.sql" in your current direc...

    [Read more...]

    How to Schedule a Backup of All MySQL Databases on Ubuntu

    Posted in Linux Servers on Nov 16, 2018

    Step 1: Create the Backup Script

    Create a folder to store your backup script in. I suggest /scripts for this example: sudo mkdir /scripts

    Create a file called mysql-backup.sh inside the scripts folder:

    sudo vim /scripts/mysql-backup.sh

    Add the following code to the file and save it:

    #!/bin/bash
    #----------------------------------------
    # OPTIONS
    #----------------------------------------
    USER='root'       # MySQL User
    PASSWORD='webdev' # MySQL Password
    DAYS_TO_KEEP=0    # 0 to keep forever
    GZIP=1            # 1 = Compress
    BACKUP_PATH='/backups/mysql'
    #----------------------------------------
    
    #...
    [Read more...]

    How to Schedule a Backup of All Websites Hosted on Ubuntu

    Posted in Linux Servers on Nov 15, 2018

    Step 1: Create the Backup Script

    The first thing we need to do is create a simple backup script that will backup websites located in /var/www. The script will change into the directory and then loop through archiving each folder into /backups/www. It will also be able to cleanup backups older than X days.

    Create a folder to store your backup script in. I suggest /scripts for this example:

    sudo mkdir /scripts

    Create a file called www-backup.sh inside the scripts folder:

    sudo vim /scripts/www-backup.sh

    Add the following code to the file and save it:

    #!/bin/bash
    #---------------------------------...
    [Read more...]

    CentOS Web Panel Installation

    Posted in Linux Servers on Nov 14, 2018

    First, we prepare the server or VPS for CentOS Web Panel
    yum -y install wget
    
    yum -y update
    
    reboot

    Set Hostname

    After the reboot is finished you would need a hostname for the server you are installing CWP on.

    To do that log into your server and type in the following:

    hostname srv.cloudtechtiq.com

    Download & installation steps for CentOS 7 server

    cd /usr/local/src
    wget http://centos-webpanel.com/cwp-el7-latest
    sh cwp-el7-latest
    
    After the screen has stopped moving which takes around 30-40 minutes you need to reboot your server to complete the installation:
    
    reboot

    That is it now you have CentO...

    [Read more...]

    How to Set or Change Hostname in CentOS 7

    Posted in Linux Servers on Oct 31, 2018

    to change or set a CentOS 7 machine hostname, use the hostnamectl

    hostnamectl set-hostname your-new-hostname

    hostname command you can also use hostnamectl command to display a Linux machine hostname

    hostnamectl

    New hostname, a system reboot is required, issue one of the below commands in order to reboot a CentOS 7 machine

    init 6
    systemctl reboot
    shutdown -r
    [Read more...]

    How to extend the volume size on ec2 instance aws

    Posted in EC2-Hosting, Linux Servers on Oct 30, 2018

    1. Confirm the kernel.

      # uname -r

    2.6.32-431.29.2.el6.x86_64

    1. Confirm the initial allocated size

      # df -h

      Filesystem Size Used Avail Use% Mounted on

      /dev/xvda1 7.9G 797M 6.7G 11% /

      tmpfs 498M 0 498M 0% /dev/shm

      # lsblk

      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 15G 0 disk └─xvda1 202:1 0 8G 0 part /

    2. Install EPEL6 Repo

      # wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
      # rpm -ivh epel-release-6-8.noarch.rpm
    3. Install the dracut & cloud-utils growpart modules-growroot

      # yum install -y dracut-modules-growroot cloud-utils-growpart
    4. The initrd needs...

    [Read more...]