How to install CentOS Web Panel

    Posted in Linux Servers on Nov 14, 2018

    linux-dedicated-seerver.jpg

    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 Cent...

    [Read more...]

    How to Set or Change Hostname in CentOS 7

    Posted in Linux Servers on Oct 31, 2018

    linux-vps-hosting.jpg

    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 Amazon Cloud Services, Linux Servers on Oct 30, 2018

    linux-dedicated-seerver.jpg

    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 need...

    [Read more...]

    Check Apache concurrent Connections using Netstat command

    Posted in Linux Servers on Oct 12, 2018

    linux-dedicated-seerver.jpg When your server is hitting high & overload, you might want to check, how many active connections are there and which IP take maximum of hit/connection from apache.

    To Count Apache concurrent connection's, use any of the below commands.

    netstat -nt | grep :80 | wc -l
    
    netstat -plan|grep :80 | wc -l
    
    netstat -an | grep 'EST' | wc -l
    
    netstat -ant | grep ESTABLISHED | grep :80 | wc -l
    
    ps -A | grep httpd | wc -l
    
    ps -ef | grep http | wc -l
    
    ps aux | grep httpd | wc -l
    
    ps aux | grep http | grep -v "\(root\|grep\)" | wc -l

    To print the active Internet connections to the server at port 80 and sor...[Read more...]

    How to sync the data from one server to another server via ssh

    Posted in Linux Servers on Oct 12, 2018

    linux-vps-hosting.jpg

    Sync the data from one server to another server using rsync on linux server.

    Rsync is one of common ways to copy files and folders between two servers, whether the servers are local or remote.

    Login to the server via ssh OR putty Gen windows application.

    ssh root@oldserverIP 
    
    rsync -ravP /home/user/file_name root@xx.xx.xx.xx:/home/user/d

    Here first refers the source path from where you are syncing the file

    and xx.xx.xx.xx refers destination server IP and the destination path where you would like to save the data.

    Please check the following usefull rsync variables :

    -v : Verbose
    
    -a : archiv...
    [Read more...]

    How to change the hostname of your linux virtual nodes india

    Posted in Linux Servers on Oct 11, 2018

    Change Virtual Compute Nodes Hostname

    Please follow the below steps to change the hostname of your Virtual Compute Node.

    Login to your Virtual Compute Node as a root user.

    To check the current hostname of your server, run the command

    hostname

    To change the hostname of your server, type new name followed by hostname

    hostname new-name

    Change the hostname under the path /etc/sysconfig/network

    vi /etc/sysconfig/network

    Edit the content of the file so that it looks like this

    HOSTNAME=new-name

    Ubuntu/Debian

    Next, edit the /etc/hostname file and update hostname:

    vi /etc/hostname

    Edit the /etc/hosts f...[Read more...]

    How to Fix client intended to send too large body

    Posted in Linux Servers on Aug 24, 2018

    First you need to edit the /etc/nginx/nginx.conf file by typing the vi command:

    $ sudo vi /etc/nginx/nginx.conf

    In http (server/location) section add the following directive to set the

    maximum allowed size in 10MB:
    
    client_max_body_size 10M;

    Save and close the file.

    Test nginx configuration for error

    Run the following command:

    $ sudo nginx -t

    Sample outputs:

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful

    If no error means, restart the nginx web server.

    $ sudo systemctl reload nginx
    
    OR
    
    $ sudo service nginx re...
    [Read more...]

    How to setup automysql backup/dump scripts for regular backups

    Posted in Linux Servers on Jul 30, 2018

    First download it via following link :-

    root@cloudtechtiq.com:~$ wget http://ncu.dl.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v3.0_rc6.tar.gz

    Create a directory in /root named as automysqlbackup and Unzip file :-

    root@cloudtechtiq.com:~$ tar zxvf automysqlbackup-v3.0_rc6.tar.gz /root/automysqlback

    After unzip install that file :-

    root@cloudtechtiq.comk:~$ sh install.sh

    -> Press enter

    -> Press enter

    then open:- /etc/automysqlbackup/automysqlbackup.conf

    root@cloudtechtiq.com:~$ vim /etc/automysqlbackup/automysqlbackup.conf
    make followin...[Read more...]

    How to create MySql db and username via CLI

    Posted in Linux Servers on Jun 23, 2018

    linux-dedicated-seerver.jpg

    Login to mysql

    mysql -u <username> -p

    Creating a database

    create database database_name;

    put database name at the place of database_name.

    Creating a user

    create user 'username'@'localhost' IDENTIFIED BY 'passwordhere';

    Grant privileges to user on database

    grant all privileges ON database_name .* TO 'username'@'localhost';

    TO grant on all databases need to issue below query

    grant all privileges ON *.* TO 'username'@'localhost';

    The asterisks(*) in above query is representing all database(first asterisks) and all tables of that databases(second asterisks).

    Grant privileges with remote access

    gr...
    [Read more...]

    How to Install Nginx on CentOS 7

    Posted in Linux Servers on Apr 17, 2018

    linux-vps-hosting.jpg

    NGINX (short for Engine X) is a free, open-source and powerful HTTP web server and reverse proxy with an event-driven (asynchronous) architecture. It is written using C programming language and runs on Unix-like operating systems as well as Windows OS.

    It also works as a reverse proxy, standard mail and TCP/UDP proxy server, and can additionally be configured as a load balancer. It is powering many sites on the web; well known for its high-performance, stability and feature-rich set.

    In this article, we will explain how to install, configure and manage Nginx HTTP web server on a CentOS 7 or R...

    [Read more...]