Entries by howto

How to Add Date & Time with History in Linux

Introduction The command history allows the use of words from previous command lines at the command prompt type. This simplifies spelling corrections and the repetition of complicated commands or arguments. History Command # history 850 useradd admin 851 passwd admin 852 cd /home/admin/ 853 ls -l 854 ls -la 855 top Edit the file /etc/bashrc […]

How to Install PHP in nginx

Prerequisites Install nginx web server Step 1: Install PHP & PHP-FPM Install packages php & php-fpm package on server using epel repository. # yum –enablerepo=epel -y install php php-mbstring php-pear php-fpm Step 2: Configure PHP-FPM Modify user and group name in php-fpm configuration file. # vi /etc/php-fpm.d/www.conf user = nginx group = nginx Step 3: […]

How to reset root password in Linux

Introduction If you forgot your root password, then it’s not a big deal. Below are the methods to reset root password in different linux distributions. Step 1: Power on Redat/CentOS 7 Server First power on your Redhat/CentOS 7 server. At the boot menu, select the Kernel you want to boot up and press e to […]

How to Configure MySQL Master-Master Replication

Step 1: Install MySQL Server Install MySQL Server on both machines. # apt-get update # apt-get install mysql-server mysql-client Step 2: Configure MySQL Servers Edit the /etc/mysql/my.cnf file on both machines. Add or modify the following values: Server 1: # vi /etc/mysql/my.cnf server_id = 1 log_bin = /var/log/mysql/mysql-bin.log log_bin_index = /var/log/mysql/mysql-bin.log.index relay_log = /var/log/mysql/mysql-relay-bin relay_log_index […]

How to create repository in Redhat 7 Linux

Introduction Repository is database of application installation and up-gradation of packages which are available on different Linux distributions. The packages of distros are available on official websites or you can extract them from official CD/DVD. We can easily install, upgrade or delete packages from repository. Step 1: Mount ISO from DVD or Folder In order […]