×

Blog

How do I login to my website control panel (cpanel)?

To access your web control panel directly:

1. Enter the address of your CPanel in your web browser. The address can be in any of the following formats:

web control panel

  • http://www.your_domain.com:2082
  • https://www.your_domain.com:2083
  • http://www.your_domain.com/cpanel/
  • http://ip_address:2082

http://ip_address/cpanel/

2. Enter your user name and password in the Username and Password fields

3. Click on the OK button. You will now be logged on to CPanel.

Note: Your cpanel username/password for a specific hosting account is not your client/billing/support login. They are both different because one billing login can have multiple hosting accounts. If you lost your cpanel username/password, please open a support ticket to get your cpanel username, and password reset.

How to Change Process Priority using Linux Nice and Renice

In a Linux system, there are hundreds of processes, that are continuously running different tasks. Linux Kernel does a fantastic job of mediating between these processes and allotting CPU to these processes.

Every running process in Linux has a priority assigned to it. We can change the process priority using nice and renice utility.

With the help of the Nice command in Linux, you can set process priority. If you give a process a higher priority, then Kernel will allocate more CPU time to that process.

Linux Nice & Renice

The Nice command will launch a process with a user-defined scheduling priority. Renice command will modify the scheduling priority of a running process. Linux Kernel schedules the process and allocates CPU time accordingly for each of them.

The process scheduling priority range is from -20 to 19. We call this a nice value.

Nice value of -20 represents the highest priority, and a nice value of 19 represents the least priority for a process.

Follow the below process to increase the priority of any process:

1. Login into your Linux system via user name and password, enter # top command.

Cheap Linux VPS

After hitting enter you will get output like above screen, in that NI means Nice Value of particular process.

2. We can set NI value of any process or command in 2 ways.


a)
In the output of # top command, just enter ” r ”, we get the screen like below:

By default when a program is launched in Linux, it gets launched with the priority of ‘0’. However, you can change the priority of your service yourself.

Cheap Linux VPS

Simply just put the PID of any process or the PID of that process in which you want to increase the priority. Hit enter after putting PID.

Cheap Linux VPS

It will ask for Renice value, see the above screen. put the value priority range is from -20 to 19. We call this a nice value. Nice value of -20 represents the highest priority, and a nice value of 19 represents the least priority for a process.

After putting the renice value, the process priority will change according to NI value.

Check the NI column after purring renice value of any process, see below screen.

Cheap Linux VPS

In the above screen, PID of kthreadd is 2 and its nice value has been changed to -10, which means now it has higher priority among then all process, which is running under a Linux system.

We can also set the NI nice value of any process like httpd, java, mysql , ftp , sshd to make that service perform fast.

b) We can set NI via another way, by using simple below command

After top command, do the below step to increase the performance of any service, or process

# nice -10 httpd

Above command will set NI value of httpd service to 10, means it has lower priority among all the running process under Linux system.

# nice –10 httpd

The above command will set NI value of httpd service to -10, which means it has the highest priority, we can increase this value to -20, A nice value of -20 represents the highest priority.

For more information visit Ideastack.

What is LVM and how to create it on Cent Os?

Logical Volume Management

Logical Volume Management

LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes.

The physical volumes are combined into logical volumes, with the exception of the /boot/ partition.

The /boot/partition cannot be on a logical volume group because the boot loader cannot read it.

If the root (/) partition is on a logical volume, create a separate /boot/ partition which is not a part of a volume group.

Since a physical volume cannot span over multiple drives, to span over more than one drive, create one or more physical volumes per drive.

Centos

The volume groups can be divided into logical volumes, which are assigned mount points. When “partitions” reach their full capacity, free space from the volume group can be added to the logical volume to increase the size of the partition. When a new hard drive is added to the system, it can be added to the volume group, and partitions that are logical volumes can be increased in size.

If a system is partitioned with the ext3 file system, the hard drive is divided into partitions of defined sizes. If a partition becomes full, it is not easy to expand the size of the partition. Even if the partition is moved to another hard drive, the original hard drive space has to be reallocated as a different partition or not used.

For more information visit Ideastack.

 How to install KVM Virtualizor

  1. CentOS 5.x / 6.x / 7.x or Red Hat Enterprise Linux 5.x / 6.x or Scientific Linux 5.x /  6.x or Ubuntu 12.04 or Ubuntu 14.04 or Ubuntu 16.04(x86_64)
  2. yum / apt-get
  3. Storage to create the VPS disks

Step1: –> Take putty of the hardware server

Step2:–> Download and Install virtualizor

  1. wget  http://files.virtualizor.com/install.sh
  2. chmod 0755 install.sh
  3. ./install.sh [email protected] kernel=kvm           //put any email address

Step3: –> Reboot the server (# init 6)

Step4: –> Once rebooted.  Restart the virtualizor service on server

# /etc/init.d/virtnetwork restart      ——> in centos 6

# service libvirtd restart                      ——> in centos 7

Step5–> Check and put network interface for the server

  1. Open Virtualizor in browser
  2. Go to

Configuration-> Master setting -> network interface -> network_interface_name

  1. Save the configuration

Step6: –> Done

Step7: –>  Check firewall service and enable virtualizor port.

# service iptables stop ( For centos 6)

# Systemctl stop firewalld.service   (For centos7)

 

STEP FOR MYSQL MASTER TO MASTER REPLICATION

  • First, install MariaDB on both the centos 7 based servers.

 

  • Command:

#sudo yum install mariadb-server

#sudo systemctl start mariadb

#sudo systemctl enable mariadb

#sudo systemctl status mariadb

#sudo mysql_secure_installation(press enter for the root password for the first time when it asks and then provide your own password to mysql)

  • machines to explain the procedure.

Master1  IP : 192.168.1.25

Master2  IP : 192.168.1.26

  • Configuration Procedure:

 

  • Master1

 

  • In master1 terminal, check the status of MariaDB

#sudo systemctl status mariadb

  • Open my.cnf file and add the following statement to the file. Save and exit from the file. 

#vi /etc/my.cnf

server-id=10

log-bin=mysql-bin

  • Restart the MariaDB service by running the following command.

#sudo systemctl restart mariadb

  • After login to mysql we are going to create user

#mysql –u root –p

#MariaDB [Linux]> create user ‘reply’@’%’ identified by ‘12345’;(here reply is a user and 12345 is password)

#MariaDB [Linux]> grant replication slave on *.* to ‘reply’@’%’ identified by ‘12345’;

#MariaDB [Linux]> flush privileges;

#MariaDB [Linux]> flush tables with read lock;

#MariaDB [Linux]> show master status;   (it will show you the master log file and master position)

#MariaDB [Linux]>exit

  • Take the MySQL dump from master1 terminal and execute the following command

#mysqldump mysql –u root -p> mysql-db.sql

#rsync -Pavzxl mysql-db.sql [email protected]:/root/

 

  • Master2

 

  • In master 2 terminal, check the status of MariaDB

#sudo systemctl status mariadb

  • Open the my.cnf file and add the following statement to the file. Save and exit from the file.

#vi /etc/my.cnf

server-id=20

log-bin=mysql-bin

  • Restart the MariaDB service by running the following command

#systemctl restart mariadb.service

  • Now inject the MySQL dump file into master2 database.

#mysql mysql -u root -p < mysql-db.sql

  • After dumping, open the MySQL shell and do the replication configuration as shown below.

#mysql –u root –p

#MariaDB [Linux]> stop slave;

#MariaDB [Linux]> change master to master_host=’192.168.1.25′, master_user=’reply’, master_password=’12345′, master_log_file=’mysql-bin.000002′, master_log_pos=566;  (check the master log file and master log position of master1)

#MariaDB [Linux]> start slave;

#MariaDB [Linux]> show processlist;

  • Check the slave status by using the command as shown below. 

#MariaDB [Linux]> show slave status;

#MariaDB [Linux]> exit

  • Restart the MariaDB service by running the following command. 

#systemctl restart mariadb.service

  • Go to the master and check the master status using the command as shown below

# mysql –u root –p

#MariaDB [Linux]> show master status;   (it will show you the master log file and master position)

Master1

  • In the master terminal, check the established connection using netstat command.

# netstat -natp | egrep -i established.*mysql

  • Open the MySQL and check the process list and also configure the replication settings

#mysql –u root –p

#MariaDB [Linux]> unlock tables;

#MariaDB [Linux]> show processlist;

#MariaDB [Linux]> stop slave;

#MariaDB [Linux]> change master to master_host=’192.168.1.26′,

master_user=’reply’,master_password=’12345′, master_log_file=’mysql-bin.000004′, master_log_pos=245;

#MariaDB [Linux]> start slave;

#MariaDB [Linux]> show slave status;

  • Replication configuration is done. now Checking the Replication process

Master1

  • I have created one database named as Linux

          #MariaDB [(none)]> create database Linux;

#MariaDB [(none)]> use Linux;

  • Create a table for the newly created database.

# MariaDB [Linux]> create table Distribution(Distro varchar(25) NOT NULL);

  • Insert some values into newly created table.

# MariaDB [Linux]> insert into Distribution values(‘REDHAT’);

  • The table and the database has been created successfully. List the table from the database.

# MariaDB [Linux]> select * from Distribution;

Master2

  • In the master 2, login to MySQL and list the databases. 

# MariaDB [(none)]> show databases;

  • Now the database which is created in master1 is replicated into master2. Use the database and list the table.

# MariaDB [(none)]>  use Linux ;

 # MariaDB [Linux]> show tables;

  • Select and list the table from the selected database. 

# MariaDB [Linux]> select * from Distribution;

  • Insert some values into that table and list the table’s values the updated values is shown. Now the replication between master-master is working successfully. 

# MariaDB [Linux]> insert into Distribution values(‘Ubuntu’);

# MariaDB [Linux]> select * from Distribution;

Master1

  • Again goto master1 terminal, now select and list the tables to check the replication process. If the updated value from the master 2 is shown, then the replication process is done.

#mysql –u root –p

# MariaDB [Linux]> select * from Distribution;