NETWORKSTIP Networking CCNA,Centos,Ubuntu,Sql,

Made By Muhammad Nafees

Breaking

Friday 28 December 2018

December 28, 2018

Clipbucket Recomended Requirements And Installation


Operating System

  • Linux (CentOS 6, CentOS 6.5, Fedora, Ubuntu)
  • CentOS 7 ( Recomended )

Requirements

  • Apache
  • MySQL v5.6,5.7 (major)
  • PHP v7.0 (major)
  • FFMPEG
  • MP4Box
  • FFPROBE
  • MediaInfo
  • ImageMagick

Utilities
  • yum groupinstall -y Development Tools
  • yum install autoconf automake gcc gcc-c++ git libtool make pkgconfig zlib-devel
  • yum install yum-utils
  • yum-config-manager --add-repo http://www.nasm.us/nasm.repo
  • yum install nasm
FFmpeg Installation Steps
Export :
  • export TMPDIR=/opt/tmp-ffmpeg
  • mkdir $TMPDIR && mkdir /opt/ffmpeg_sources
Installing yasm
  • cd /opt/ffmpeg_sources
  • wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
  • tar xzvf yasm-1.3.0.tar.gz && cd yasm-1.3.0
  • ./configure && make && make install
  • cd /opt/ffmpeg_sources
  • git clone --depth 1 https://github.com/yasm/yasm.git
  • cd yasm && autoreconf -fiv
  • ./configure --prefix="/opt/ffmpeg_build" --bindir="/opt/bin"
    make && make install && make distclean
Installing x264
  • cd /opt/ffmpeg_sources
  • git clone --depth 1 git://git.videolan.org/x264
  • cd x264 && ./configure --prefix="/opt/ffmpeg_build" --bindir="/opt/bin" --enable-shared --disable-lavf
  • make && make install && make distclean
  • git clone --depth 1 git://git.videolan.org/x264
  • cd x264 && ./configure --prefix="/opt/ffmpeg_build" --bindir="/opt/bin" --enable-shared --disable-lavf
  • make && make install && make distclean
Installing libfdk-aac
  • cd /opt/ffmpeg_sources
  • git clone --depth 1 https://github.com/Distrotech/fdk-aac.git
  • cd fdk-aac && autoreconf -fiv && ./configure --prefix="/opt/ffmpeg_build" --disable-shared
  • make && make install && make distclean
Installing libLame
  • cd /opt/ffmpeg_sources
  • curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
  • tar xzvf lame-3.99.5.tar.gz
  • cd lame-3.99.5
  • ./configure --prefix="/opt/ffmpeg_build" --bindir="/opt/bin" --disable-shared --enable-nasm
  • make && make install && make distclean

Installing Opus

  •   cd /opt/ffmpeg_sources
  •   wget http://downloads.xiph.org/releases/opus/opus-1.1.2.tar.gz
  •   tar xzvf opus-1.1.2.tar.gz
  •   cd opus-1.1.2 && ./configure --prefix="/opt/ffmpeg_build" --disable-shared
  •   make && make install && make distclean

Installing libogg

  •   cd /opt/ffmpeg_sources
  •   wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
  •   tar -xJf libogg-1.3.2.tar.xz
  •   cd libogg-1.3.2 && ./configure --prefix="/opt/ffmpeg_build" --disable-shared
  •   make && make install && make distclean

Installing libvorbis

  •   cd /opt/ffmpeg_sources
  •   wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz
  •  tar -xJf libvorbis-1.3.5.tar.xz && cd libvorbis-1.3.5
  •   LDFLAGS="-L/opt/ffmeg_build/lib" CPPFLAGS="-I/opt/ffmpeg_build/include" /configure --prefix="/opt/ffmpeg_build" --with-ogg="/opt/ffmpeg_build" --disable-shared
  •   make && make install && make distclean

Now Finally FFmpeg

  • cd /opt/ffmpeg_sources
  • git clone --depth 1 https://github.com/FFmpeg/FFmpeg.git
  • cd FFmpeg && PKG_CONFIG_PATH="/opt/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/opt/ffmpeg_build" --extra-cflags="-I/opt/ffmpeg_build/include" --extra-ldflags="-L/opt/ffmpeg_build/lib" --bindir="/opt/bin" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libx264
  •  make && make install && make distclean && hash -r && unset TMPDIR

Edit /etc/ld.so.conf

·  give path of lib folder for ffmpeg such as
/opt/ffmpeg_build/lib
/usr/local/lib
/usr/lib
·  Execute : ldconfig
MP4Box
Mediainfo
Imagick
  • yum -y install php-pear
  • yum -y install ImageMagick*
  • yum -y install php-imagick
  • yum -y install gcc php-devel
  • yum -y install ImageMagick ImageMagick-devel
  • pecl install imagick
##if above command does not work, use following one
  • pecl install imagick-3.1.2
  • echo extension=imagick.so >> /etc/php.ini

PHP,MariaDB
  • yum install httpd mariadb-server mariadb php php-gd php-mysql php-curl php-xsl php-cli php-mbstring php-pear unzip
  • ·         systemctl start mariadb.service
  • ·         systemctl enable mariadb.service
  • ·         mysql_secure_installation
  • ·         systemctl restart httpd
  • ·         systemctl enable httpd
December 28, 2018

Create Subdomain in windows Server

How To Create Subdomain In Windows Server

  •  Open IIS Manager
  •  Add new site 
  • Assign ip address 
  • Configure physical Directory Path
  • Configure Site name 
  • Configure host name
 

  • Now Configure DNS Entery to site Zone
  • Add a New A Record 
  • Assign IP
  • Add Subdomain name

Thursday 20 December 2018

December 20, 2018

Ether Channel Configuration

What is LACP?

This is Standards-based (IEEE 802.3ad) negotiation protocol. Link Aggregation Control Protocol, is used to dynamically build an EtherChannel. There are different modes of LACP.
  • Active: The active end of the group sends out a LACP frame and initiates the negotiation to form the EtherChannel. Both ends could be active and the result would be the same.
  •  Passive: Passive Mode does not initiate the negotiation. It just responds to LACP packets initiated by other end. So if both ends were passive, the EtherChannel would not be formed.

What is PAgP? 

This is Cisco proprietary negotiation protocol. Port Aggregation Protocol is used to achieve the same goal as LACP. PAgP has 2 modes:
  •  Desirable: In this mode, the negotiation will be initiated by sending the special frames to form EtherChannel with the other end.
  • Auto: In this mode, negotiation is not initiated. It only responds to the special frames received for negotiation form the other end. So, if both ends are in Auto mode, EtherChannel would not be formed.
There is basically no difference between the two other than the names of the mode.

One thing to note is that there is no particular command to enable LACP or PAgP on a Cisco router. Instead, the mode names are used.

For example: If you use Desirable mode, then the router understands that you are implementing PAgP and if you use Active mode, the router will understand that you're trying to use LACP. 


Ether Channel Modes
-------------------------------------------------------------------------------------------------
Mode        Protocol                                Description
-------------------------------------------------------------------------------------------------
Auto         |  PAGP  |                  Sets the interface to respond to PAgP negotiation packets, but
                                                   the interface will start negotiations on its own.

Desirable  |  PAGP  |                 Sets the interface to actively attempt to negotiate a PAgP
                                                   connection.

On           | EtherChannel |         Forces the connection to bring all links up without using a
                                                   protocol to negotiate connections. This mode can only connect to
                                                  another device that is also set to on. When using this mode, the
                                                  switch does not negotiate the link using either PAgP or LACP.

Active      |  LACP   |                Sets the interface to actively attempt to negotiate connections
                                                 with other LACP devices.

Passive    |  LACP   |               Sets the interface to respond to LACP data if it receives
                                                 negotiation requests from other systems.

 ----------------------------------------------------------------------------------------------------------------

  EtherChannel Configuration:

SW1 
  • Conf t
  • interface range fastEthernet 0/1 - 2
  • speed auto
  • duplex full 
  • switchport trunk encapsulation dot1q
  • switchport mode trunk
  • channel-group 10 mode desirable


SW2
  • Conf t
  • interface range fastEthernet 0/1 - 2
  • speed auto
  • duplex full 
  • switchport trunk encapsulation dot1q
  • switchport mode trunk
  • channel-group 20 mode auto
 Note:channel group should not be same on both switches (Recommend)
SW1 
  • sh ip inter br
Port-channel 10        unassigned      YES unset  up                    up
  •  sh etherchannel summary
 Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+----------------------------------------------

10     Po10(SU)           PAgP   Fa0/1(I) Fa0/2(I)



SW2
  • sh ip inter br
Port-channel 20        unassigned      YES unset  up                    up
  •  sh etherchannel summary
 Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+----------------------------------------------

20     Po20(SU)           LACP   Fa0/1(I) Fa0/2(I) 

  •  show etherchannel port-channel 
      Channel-group listing:
                    ----------------------

    Group: 20
    ----------
                    Port-channels in the group:
                    ---------------------------

    Port-channel: Po20    (Primary Aggregator)
    ------------

    Age of the Port-channel   = 00d:00h:11m:53s
    Logical slot/port   = 2/20      Number of ports = 0
    GC                  = 0x00000000      HotStandBy port = null
    Port state          = Port-channel
    Protocol            =   PAGP
    Port Security       = Disabled
SW2
  • show interfaces Port-channel 20 (To check bandwidth of etherchannel)
Port-channel 20 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 00e0.b008.3130 (bia 00e0.b008.3130)
  MTU 1500 bytes, BW 500000 Kbit, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Half-duplex, 500Mb/s
  input flow-control is off, output flow-control is off
  Members in this channel: Fa0/1 ,Fa0/2 ,Fa0/3 ,Fa0/4 ,
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:08, output 00:00:05, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Wednesday 5 December 2018

December 05, 2018

Install PHP 7.2 on CentOS 7 To Resolve Clipbucket 4 Installation Problem

Install PHP 7.2 on CentOS 7 To Resolve Clipbucket 4 Installation Problem PHP Recommend Version for Clipbucket

Enabling Remi repository

  • sudo yum install epel-release yum-utils
  • sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm 

Installing PHP 7.2 on CentOS 7

  • sudo yum-config-manager --enable remi-php72

Once the repository is enabled install PHP 7.2 and few most common PHP modules:

  •  sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd

Verify the PHP installation, by typing the following command which will print the PHP version: 

  • php -v 

OutPut 
PHP 7.2.9 (cli) (built: Aug 15 2018 09:19:33) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.9, Copyright (c) 1999-2018, by Zend Technologies

 Installing PHP 7.1 on CentOS 7

Enable the PHP 7.1 repository by typing: 
  • sudo yum-config-manager --enable remi-php71
Install PHP 7.1 and few most common PHP modules:
  • sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql 
  • php -v 
OutPut
PHP 7.1.21 (cli) (built: Aug 15 2018 17:56:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.21, Copyright (c) 1999-2018, by Zend Technologies
  
  • sudo systemctl restart httpd 

 Configuring PHP 7.x to work with Nginx

  • sudo yum install php-fpm
By default PHP FPM will run as user apache on port 9000. We’ll change the user to nginx and switch from TCP socket to Unix socket. To do so edit the lines highlighted in yellow:
  • /etc/php-fpm.d/www.conf
...
user = nginx
...
group = nginx
...
listen = /run/php-fpm/www.sock
...
listen.owner = nginx
listen.group = nginx 


Make sure the /var/lib/php directory has the correct ownership:
  • chown -R root:nginx /var/lib/php
Once you made the changes, enable and start the PHP FPM service: 
  • sudo systemctl enable php-fpm
  • sudo systemctl start php-fpm 
  • sudo systemctl restart nginx
     
December 05, 2018

Completely remove MariaDB or MySQL from CentOS 7 or RHEL 7

Completely remove MariaDB or MySQL from CentOS 7 or RHEL 7

 

  •  sudo yum remove -y mariadb mariadb-server && sudo rm -rf /var/lib/mysql /etc/my.cnf
If Above Command does not work

  • yum remove mariadb mariadb-server
  • rm -rf /var/lib/mysql
  • rm /etc/my.cnf
  • yum install mariadb mariadb-serve
  • yum remove MariaDB-server MariaDB-client
  • sudo systemctl stop mysqld.service && sudo yum remove -y mariadb mariadb-server && sudo rm -rf /var/lib/mysql /etc/my.cnf
  • rpm -qa | grep mariadb
  • rpm -e --nodeps "mariadb-libs-5.5.56-2.el7.x86_64"
  • rpm -e --nodeps "mariadb-server-5.5.56-2.el7.x86_64"
  • rpm -e --nodeps "mariadb-5.5.56-2.el7.x86_64"
  • rm -f /var/log/mariadb
  • rm -f /var/log/mariadb/mariadb.log.rpmsave
  • rm -rf /var/lib/mysql
  • rm -rf /usr/lib64/mysql
  • rm -rf /usr/share/mysql

Monday 19 November 2018

November 19, 2018

How do I allow Windows 7 users to run only specific applications

How do I allow Windows 7 users to run only Specific applications?

  • The first thing you must do is open the Group Policy Editor. You won't find a menu entry for this tool. Instead you start the tool by clicking the Start menu and then entering the command gpedit.msc. When this tool opens, you will find yourself looking at a dual-paned window that looks deceptively simple to use (Figure A)
  • Figure A

  • The next step is to navigate to the correct location of the configuration option we want to change. This is to be found in the following path:
    User Configuration | Administrative Templates | System
    When you navigate to that path, you will want to click on the System entry to reveal the available settings in the right pane (Figure B). 
  • Figure B

  • Double-click on the entry for Run Only Specified Windows Applications to open the preferences for this setting. When this is opened (Figure C), you will need to first make sure Enabled is checked. Once you have done that, the Show button will become available.
  • Figure C

     
  • The next step is to click the Show button, which will open a small window where you can enter the allowed applications (Figure D). In this window, you will add, one per line, the executable file name (including extension) for each of the applications you want the users to be allowed to execute. 
  • Figure D

  • After these step just open cmd and type command gpupdate

Sunday 18 November 2018

November 18, 2018

CentOS 7 SSH key for no password Authentication login with RSA Key

CentOS 7 SSH key for no password Authentication login with RSA Key

 1. ssh-keygen -t rsa
 just simply press enter
if you want to configure password on Rsa file just type a password to protect the other wise leave it blank in my case i am typing password nafees12345

key is generated now copy the id-rsa file in to your pc
next is change mode
2. chmod 700 ~/.ssh 
3. mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

the above command no 3 will change the rsa.pub file to authorized_key this file will used when we try to login via ssh and ssh will match the rsa key from this file now change the mode of file
4. chmod 600 ~/.ssh/authorized_keys 
5. vi /etc/ssh/sshd_config 


 6. systemctl restart sshd

7.Go to official Putty download page, grab the last version of the Putty Windows Installer executable package and install it onto your Windows computer. 

 8.After you have finished installing Putty go to Windows Start, type putty string to search field and open PuTTygen program which you will use it to generate Keys pairs.



Click on load and load the
Now type tha passphrase key which is in my case nafees12345


clik on save private key to save key for putty access
Open putty to left Category menu, select SSH –> Auth, hit the Browse button, search and add your Private Key.


just type user name root and done