7 June 2017

forgot the linux root user password how to change it

How to Change the Linux root user password

following the below steps:

1. reboot the system and press F8 or press space bar and  select rescue mode and press e
2.  come to last paragraph of linux16 and write rd.break console=tty1
3. ctrl+x
4. come in single user mode
5. mount -o, remount,rw /sysroot
6. chroot /sysroot
7. passwd root
applay the password

# touch /.autorelabel
#exit
#exit





Linux Kernel Updating

In Cent OS how to update Kernel

login with root user
download latest version of kernel and keep it in /opt directory

#uname -a
#cd /opt  (enter into /opt directory )
# rpm -ivh kernel*    --nodeps   (install / update kernel )

#reboot (after updating / installing reboot the system )
now check the kernel version

#uname -a

2 June 2017

How to Configure the HTTPS in Linux

#### HOW TO CONFIGURE HTTPS IN LINUX###########
first configure the http
step-1: To assign the Hostname
login the linux CentoOS with root user
#hostname (to Check the hostname)
#ifconfig (to Check the IP Address)
#vi /etc/hosts (to provide the ip & hostname)
like 172.35.32.230    www.myblog.com   www
:wq (save & quit)

#vi /etc/hostname   (to make permanent) 
www.myblog.com
:wq   (save & quit)

##### INSTALL THE PACKAGE#####

#yum install http*    mod_ssl*   -y



#rpm -qa http*    mod_ssl*   (to query )

##### CONFIGURE THE HTTP#####

#vim /etc/httpd/conf/httpd.conf

come to end of file and write below text

<VitrualHots *:80>
ServerAdmin    root@myblog.com
DocumentRoot    //var/www/html
DirectoryIndex    myblog.html
ServerName    www.myblog.com
</VirtualHost>

:wq  (save & quit)


#cd /var/www/html    (To enter the directory )
#vi  myblog.html    (to Create the html home page )

##### START THE HTTP SERVICE #####

#service httpd restart

#### OPEN THE BROWSER THROUGH THE TEMINAL######
#firefox http://www.myblog.com

########### TO CREATE THE CERTIFICATES & KEY ######
#cd /etc/pki/tls/certs   (to enter the dir)
#make myblog.crt    (to create the certificates )
#ls    (to check )

#mv myblog.key   /etc/pki/tls/private    (To move the key)

### TO CONFIGURE THE HTTPS#######

#vim /etc/httpd/conf.d/ssl.conf

go to line no. 100 replace localhost.crt myblog.crt
go to line no. 107 replace localhost.key myblog.key

come end of the file and add this parameter

ServerAdmin root@myblog.com
DocumentRoot    /var/www/html
DirectoryIndex   myblog.html
ServerName    www.myblog.com

:wq    (save & exti)

####### TO START THE SERVICE #########
#service httpd restart

##### TO OPEN THE BROWSER########

# firefox https:/www.myblog.com

######### TO REDIRECT HTTP TO HTTPS###########
#vim /etc/httpd/conf/httpd.conf

come end of file

above this </VirtualHost>
write this line
Redirect / https://www.myblog.com:443

:wq

#service httpd restart
##### OPEN THE BROWSER########
#firefox http://www.myblog.com
######## TO CHECK THE LOGFILE OF HTTP######
# tail /var/log/httpd/access_log