How to install phpmyadmin in Ubuntu 18.04.1 LTS Server using source code.

Hello guys in this tutorial we are going to learn how to install phpmyadmin application using source code in ubuntu 18.04.1 LTS  Server. so without wasting time now we will start this tutorial step by step .
1 update our system package through below commands.

#sudo apt-get update 

2 now  we will install Apache server through below Commands.

#sudo apt-get install apache2 -y 

3 Then we will install php which one we want here in my case i want 7.2 version so i will be install 7.2 php version through below commands.

# apt install php7.2

4 Then we will install mysql-server through below commands.

#sudo apt-get install mysql-server -y

5 Then now we will going to /var/www/html directory and put phpadmin source code using wgit Command.

 #wget https://files.phpmyadmin.net/phpMyAdmin/4.8.0/phpMyAdmin-4.8.0-all-languages.zip

6 if you get error :Unable to establish SSL connection then you need to put below Commands  then continue stap 5 commands.

#openssl s_client -connect minecraft.net:443 -tls1

7 extract Phpmyadmin source code and rename the folder using below commands.

 
l# unzip phpMyAdmin-4.8.0-all-languages.zip
#rm -rf  phpMyAdmin-4.8.0-all-languages.zip
#mv phpMyAdmin-4.8.0-all-languages/ phpmyadmin

8 now we want to setup specify user for phpmyadmin directory we can do through below commands.

# sudo adduser phpmyadmin
Adding user `phpmyadmin' ...
Adding new group `phpmyadmin' (1001) ...
Adding new user `phpmyadmin' (1001) with group `phpmyadmin' ...
Creating home directory `/home/phpmyadmin' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for phpmyadmin
Enter the new value, or press ENTER for the default
Full Name []: admin
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@vishnuhost:/var/www/html# 

9 After finish user creating work we need to setup phpMyAdmin install wizard in phpmyadmin directory we can do this through below commands.

# cd phpmyadmin/
# sudo mkdir config
# sudo chmod o+rw config
# sudo cp config.sample.inc.php config/config.inc.php 
# sudo chmod o+w config/config.inc.php

10 now we will go  to our machine localhost or ip address in browser and type following commands.

#sudo apt-get install php7.2-mysqlnd

11 then we need to create mysql super admin user we can do it through below commands

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.23-0ubuntu0.18.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE USER 'admin'@'%' IDENTIFIED BY 'admin';
Query OK, 0 rows affected (0.06 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql>\q 

12. Then we need to restart mysql service through below commands.

# sudo /etc/init.d/mysql restart 

13 . Now we are going in browser and type our server machine ip and phpmyadmin setup path like below screen short.

 

phpmyadmin install in ubuntu

14 then we will going to new server option and create new server we will put mysql-server user name ans password

15. Then we will put in browser server IP Address and phpmyadmin path like this. for example my ip address is 192.168.2.253/phjpmyadmin . Then maybe it’s possible you get error like this screen short .phpmyadmin configuration with source code Don’t worry we can easily fix this error through below  commands .

sudo apt-get install php-mysqlnd  

Then refresh the browser and look your phpmyadmin application login screen.

how to install phpmyadmin in linux how to install phpmyadmin in ubuntu

if you have any problem in this process please comments here I will see your problem or error. If  possible i will gave you solution otherwise like and follow my blog

Thank you

By- Vishnu Sharma

Advertisements

how to increase swap memory after installation Linux

Hello guys today in this article we are going to learn how to increase swap memory in linux after installation. As well we know swap memory is play very important roll in linux  operating system Actually swap memory is use some space of heard disk space as a ram , but  its a very important think that how space we create for swap memory. All Linux Administrator and engineers always recommend we need configure swap area just double to physical memory. For example we have 4 GB physical memory then we need to configure 8 GB swap area or partition during Linux installation.  so let we now we are focus on our article heading. for example let’s assume we have 8 GB Linux Server or Desktop operating system we realized that our system need to increase physical memory so here we increase 8 GB Physical memory so here everything is normal our system is work perfectly and good but according to Linux expert rules we have to need just dual swap are to physical memory. so in this case we have two option 1st we will create extra swap partition or if we don’t have heard disk space we can also use file as a swap space its a very simple process so without wasting time we are learn how its possible.

(notice- in this tutorial all commands fire by root account you can also fire through other user you just use sudo  )

1 we will create directory where we hold swap file (its not necessary you can hold anywhere in your system ) 

mkdir -v /var/cache/swap

2 then we will go in this directory through this commands

cd /var/cache/swap

3 next here we will create any Empty file according to our Requirement using dd Command here my requirement is 8 GB swap area so look below Commands

dd if=/dev/zero of=swapfile bs=1K count=8M

4 then next we provide 600 permission 

chmod 600 swapfile

5 next we will Convert newly created file into a swap space file.

mkswap swapfile

6 then here we enable swap file and look this is work ?

sudo swapon swapfile
top -bn1 | grep -i swap

7 then we next we will stop swap file and entry in main swap file 

swapoff swapfile 

then we add entry this file is /etc/fstab 

echo "/var/cache/swap/swapfile none swap sw 0 0" | tee -a /etc/fstab

9 then we on swapfile using blow Commands 

 swapon -va

if you have any problem in this tutorial please comments here i will solve your problem

thank you

Writer- Vishnu Sharma (Linux and Network system Administrator)

what is Firewall Security ? and How to Configure in RedHat Server

Hello guys today we are going to learn what is Firewall and how to configure Firewall Security in Redhat Linux Server.before we will configure Firewall Security we will Know about some theory of Firewall .

you can teach through this article

1   Structure of firewall

2 Firewall Configuration

3 some important Firewall Commands

4 Block and allow ip address

5 Ethernet Security on port

6 Make address security

7 Domain Address Security

Continue reading

How to encrypt file through open SSL (Secure,Socket,Layer)in Linux RedHat part 1

hello guys today we are going to learn how to encrypt file through open ssl method. but  before  i enplane some knowledge of  open SSL method. open ssl is a file encrypt method.  this method in several Version of file encrypting its a very strong method . in  this tutorial  we will discuss some use full and strong  version of encrypt method  and we will also learn in our linux machine that  how can we apply on our file.

(note- in this tutorial all commands use on redhat linux 5 if you have other version of linux like fedora ,Ubuntu ,kubuntu, or other .Open ssl File encryption method is work on all type of linux .you onlly need to install package according to linux Operating system.

Step 1 here we will install openssl package through Yum Server. if you want to know how to configure yum Server in linux redhat  then click on  this link and look.

[root@localhost exp]# yum install openssl -y

Here before  we will learn base64 version open ssl method. in this method we can write encrypted content and also make encrypted file so you just follow me and look with piratical

 

Step 2 before we will learn how to write encrypt text through  base64

[root@dhcppc16 ~]# echo "hello this is encrypt method base64 demo"|openssl enc -base64
aGVsbG8gdGhpcyBpcyBlbmNyeXB0IG1ldGhvZCBiYXNlNjQgZGVtbwo=

now if we want to decriypt  content we will just put our encrypt content mid in” “and run command

[root@dhcppc16 ~]# echo "aGVsbG8gdGhpcyBpcyBlbmNyeXB0IG1ldGhvZCBiYXNlNjQgZGVtbwo="|openssl enc -base64 -d 
hello this is encrypt method base64 demo

Step 3 we can encrypt any file through this Commands

[root@localhost exp]# openssl enc -base64 -in a.txt -out a.enc
[root@localhost exp]# ls
a.enc  a.txt
[root@localhost exp]# rm -rf a.txt
[root@localhost exp]# cat a.enc
IGhlbGxvIHRoaXMgaXMgbXkgZGVtbyBmaWxlCg==

we can decrypt file through this below Commands

[root@localhost exp]# openssl enc -base64 -d -in a.enc -out a.txt
[root@localhost exp]# ls
a.enc  a.txt
[root@localhost exp]# rm -rf a.enc
[root@localhost exp]# cat a.txt
 hello this is my file encryption base64 demo

Step 4 Encrypt and decriypt a File or message using AES-256-cvc method

[root@localhost exp]# echo "hello this is AES-256-CVC demo"|openssl enc -aes-256-cbc >a.bat
enter aes-256-cbc encryption password: 12345
Verifying - enter aes-256-cbc encryption password:12345
[root@localhost exp]# ls
a.bat
[root@localhost exp]# cat a.bat
Salted__Y,@o???a?4???tc(t[?c???$F^?$O???|??[root@localhost exp]#

now we will decriypt through below commands

[root@localhost exp]# echo "hello this is AES-256-CVC demo"|openssl enc -aes-256-cbc -d -in a.bat
enter aes-256-cbc decryption password:12345
hello this is AES-256-CVC demo

here we will learn if we have already any file we want encrypt then we will use below commands

[root@localhost exp]# openssl enc -aes-256-cbc -in a.txt -out a.bat
enter aes-256-cbc encryption password:12345
Verifying - enter aes-256-cbc encryption password:12345
[root@localhost exp]# ls
a.bat  a.txt
[root@localhost exp]# cat a.bat
Salted__?cJ??D^??0?7??6?i???+?#??7??+?z
+^W?[root@localhost exp]#
we can decrepit file through this Commands 
[root@localhost exp]# openssl enc -d -aes-256-cbc -in a.bat -out a.txt
enter aes-256-cbc decryption password:
[root@localhost exp]# ls
a.bat  a.txt
[root@localhost exp]# cat a.txt
hello this is my file demo

if you have any problem in this process so please Comments here i will solve your problem otherwise like share and follow my blog for Linux Networking and IT Solution

thank you

BY Vishnu Sharma

how to write encrypt text content in RedHat Linux server part -1

hello guys today we will learn how to write encrypt text. actually encrypt matter is provide security our data .if we will write encrypt content then anybody con’t read our data or content . Linux Server in have many encrypted method here we will discuss some method  encrypt text

Step 1 here i encrypt some numeric digit for eg. 7297868765

[root@localhost exp]# echo "7297868765" |tr '0-9' '9876543210' >e.txt (Note- here i encrypt 7297869765 numeric and
 this digit is  encrypt matter in put in e.txt file)

if we want look e.txt file then we look encrypt numeric content

[root@localhost exp]# cat e.txt
2702131234  

now we want to receive original data then we fire below commands

[root@localhost exp]# echo "27021311234" |tr '0-9' '9876543210' >f.txt (Note- Here we will put encrypt file content)
[root@localhost exp]# cat f.txt 
72978688765

Step 3 now we will encrypt text matter below commands

[root@localhost exp]# echo "hello this is file content encrypt Demo "|tr 'a-zA-Z' 'nza-mN-ZA-M' >a.txt
[root@localhost exp]# ls
a.txt
[root@localhost exp]# cat a.txt
fcjjm RfgQ gQ dgjc amlRnlR claPWNR Bckm
[root@localhost exp]# echo "fcjjm rfgQ gQ dgjc amlRn1R claPWNR Bckm "|tr 'a-zA-Z' 'nza-mN-ZA-M' >b.txt (Note- Here we will put encrypt file content)
[root@localhost exp]# ls
a.txt  b.txt
[root@localhost exp]# cat b.txt
hello this is file content encrypt demo

4 Here we will learn how to encrypt numeric and text

[root@localhost exp]# echo "Hello my name is vishnu my mobile is 7297868765"|tr 'a-zA-Z0-9' 'n-za-mN-ZA-M9876543210' >a.txt
[root@localhost exp]# ls
a.txt
[root@localhost exp]#cat a.txt
Uryyb zl anzr vf ivfuah zl zbovyr vf 2702131234
(Note-if we want decrypt contant .then we will put encrypt code )
[root@localhost exp]# echo "Uryyb zl anzr vf ivfuah zl zbovyr vf 2702131234"|tr 'a-zA-Z0-9' 'n-za-mN-ZA-M9876543210' >b.txt
[root@localhost exp]# ls
a.txt b.txt
[root@localhost exp]# cat b.txt
Hello my name is vishnu my mobile is 7297868765

if you have any problem in this process please comment here i will solve your problem otherwise like share and follow my website

Thank you

by Vishnu Sharma

Key based security (Digital Signature )with gpg encryption in RedHat Linux Server

Hello guys today we will learn how to configure key based Security in RedHat Linux. its a very simple process you just Follow my Simple Steps

file encrypt

Step 1 here i Create a.txt File and put something text matter in this file

[root@localhost exp]# vim a.txt
Hello this is my Digital key signature demo in linux redhat Server
~
~
~
~
:wq

Step 2 then we will encrypt our file below commands

[root@localhost exp]# gpg -c a.txt
Enter passphrase: redhat
Repeat passphrase: redhat
(Note-Here we will remove a.txt file then we have a.txt.gpg file. this is a encrypt file )
[root@localhost ~]# rm -rf a.txt
(Note- now we will open a.txt.gpg file then we will found encrypt data )
[root@localhost ~]# cat a.txt.gpg
?Q]?q*k?`????@?E?x??[???F??{??6Q??

Step 3 now we can get original file data through below commands

[root@localhost ~]# gpg -d a.txt.gpg
gpg: CAST5 encrypted data
Enter passphrase:redhat
Hello this is my Digital key signature demo in linux redhat Server
(Note- if we want remove encrypt security we will used below Commands)
[root@localhost exp]# gpg a.txt.gpg
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected
[root@localhost exp]# ls
a.txt  a.txt.gpg

now suppose we have multi pal file and we want to protract  all file then we can use digital key.if we will create digital key then again to again no need to create password any time we can apply same password on all file through digital key .

Step 4 then we will Create Digital key through below Commands

[root@localhost exp]# gpg --gen-key
gpg (GnuPG) 1.4.5; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Please select what kind of key you want:
   (1) DSA and Elgamal (default)
   (2) DSA (sign only)
   (5) RSA (sign only)
Your selection? 1 (note- here we will select 1 )
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 2048 (note- here we will put our key bits size)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 0 (notes- here we will select 0 becouse we want not Expiry key )
Key does not expire at all
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: vishnu sharma        (note- here we will put our name email Address and something Comments)
Email address: vlalitsharma@gmailcom  
Comment: this is digital key password
You selected this USER-ID:
    "vishnu sharma (this is digital key password) <vlalitsharma@gmailcom>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o (note- here will press o for okay)
ou need a Passphrase to protect your secret key. (Note- here we will put our password )
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.++++++++++++++++++++++++++++++.++++++++++..+++++++++++++++.+++++++++++++++++++++++++++disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.++++++++++..+++++++++++++++.++++++++++..+++++++++++++++..++++++++++..++++++++++++++++++
gpg: key 52747DF7 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
pub   1024D/52747DF7 2017-03-10
      Key fingerprint = B00B 24CC CA58 9DBB AC29  DFB5 7DBF FE59 5274 7DF7
uid                  vishnu sharma (this is digital key password) <vlalitsharma@gmailcom>
sub   2048g/1C25308A 2017-03-10

Step 5 here we will look our file key below Commands

[root@localhost exp]# gpg --list-key
/root/.gnupg/pubring.gpg
------------------------
pub   1024D/5B148026 2017-03-09
uid                  vishnu sharma (hindiitsolution.com) <vlalitsharma@gmail.com>
sub   2048g/7DB30C64 2017-03-09

Step 6 now we will provide key on file through below Commands

[root@localhost exp]# gpg -e -r 'vlalitsharma@gmail.com' a.txt(Note- here we will gave file name which we want protract)

Step 7 we can also broken file in parts through gpg commands 

[root@localhost exp]# gpgsplit a.txt.gpg
[root@localhost exp]# ls
000001-001.pk_enc  000002-018.encrypted_mdc  a.txt  a.txt.gpg

Step 6 we can combine our file below Commands 

[root@localhost exp]# cat 000001-001.pk_enc 000002-018.encrypted_mdc >a.txt
[root@localhost exp]# ls
000001-001.pk_enc  000002-018.encrypted_mdc  a.txt 

if you have any problem in this process so please Comments here i will solve your problem

Thank you

by Vishnu Sharma

How to Write and compile C Programs in RedHat Linux Server

Hello guys in this tutorial we are going to learn how to write and Compile C program in RedHat Linux Server.Its a very simple process you just need to following Simple Steps. At Fast we will Install C Compiler in Linux Server. we will install C Compiler through Yum Server. If you don’t have any idea about YUM server so please click and look how to install yum server in Redhat LInux Serverc labguage Step 1 Here i assume that  you have configured YUM Server in redhat linux, then you  will install C -Compiler  through below Commands

[root@localhost ~]# yum install gcc* -y 

Step 2 then we will write C Program like this

[root@localhost ~]# vim vishnu.c
#include<stdio.h>
void main()
{
printf("hello this is my linux server c programming demo');
}
~
:wq

Step 3 then we will compile Program below Commands

[root@localhost ~]# gcc vishnu.c -o cprogram

Step 4 now if we don’t found any error in this  program then we will run below commands 

[root@localhost ~]# ./cprogram
hello this is my linux server c programming demo

if you have any Problem in this process please comments here i will solve your problem

Thank you

Vishnu Sharma