Raafat Mohamed

Senior Linux Administrator

  • About Me
Menu
  • About Me
in Linux
July 10, 2013

How to change MAC address for Ubuntu

To change the MAC address permanently in Ubuntu : # vi /etc/network/interfaces Add the following lines : auto eth0 iface eth0 inet dhcp hwaddress ether 00:21:00:59:1f:86 Restart network service : # /etc/init.d/networking restart To change the MAC address Temporary in Ubuntu : # sudo ifconfig eth0 down # sudo ifconfig eth0 hw ether 00:21:00:59:1f:86 # sudo […]

Comments Off on How to change MAC address for Ubuntu
Read More »
in Linux
July 10, 2013

Configure apt Behind Authenticated Proxy Server

If you want to install some packages on your debian or ubuntu system or you need to update your system while you are behind an authenticated proxy ,then you have to do the following : # sudo nano /etc/apt/apt.conf Append the following line to the configuration file : Acquire::http::Proxy “http://user:password@proxy.innovationsol.com:8080”; Where : user          : proxy […]

Comments Off on Configure apt Behind Authenticated Proxy Server
Read More »
in Linux
April 29, 2013

Timestamp in bash history

If you want to record a time-stamp history on your BASH environment ,You can do that by running the following commands : echo -e ‘export HISTCONTROL=ignorebothnexport HISTTIMEFORMAT=”%d/%m/%y %T “‘ >>~/.bash_profile echo -e ‘export HISTCONTROL=ignorebothnexport HISTTIMEFORMAT=”%d/%m/%y %T “‘ >>/etc/profile  

Comments Off on Timestamp in bash history
Read More »
in Linux
March 3, 2013

Configure Yum Behind Authenticated Proxy Server

You can follow the following steps to get yum working behind a proxy server using user name & password for authentication. 1) Add the following lines to yum.conf file. vi /etc/yum.conf proxy=http://proxy_server_here:port/ proxy_username=user_name proxy_password=user_password   2)Export http proxy in bash login : vi /root/.bash_profile export http_proxy=”http://proxy_server_here:80/” 2)Export http proxy variable : export http_proxy=”http://proxy_server_here:80/” For testing […]

Comments Off on Configure Yum Behind Authenticated Proxy Server
Read More »
in Linux, Network
February 27, 2013

Setup Linux Network bonding

Bonding is a creation of a single bonded interface by combining two or more Ethernet interfaces. This helps to increase throughput, and to provide redundancy in case one of the links fails or Ethernet card fails. Steps for bonding in Redhat: Step 1. Create a Bond0 configuration file : $ cat /etc/sysconfig/network-scripts/ifcfg-bond0 Add the following […]

Comments Off on Setup Linux Network bonding
Read More »
in Linux
November 9, 2012

Change hostname on Centos6

There are two ways to change your server hostname : 1)Temporary : You can get your current hostname by typing the following commande into your terminal : [root@dhcppc2 ~]# hostname localhost.localdomain To change the hostname temporarily ,run the following command: [root@dhcppc2 ~]# hostname raafat.innovationsol.com Note:After reboot these changes will be lost. Now ,Check the current […]

Comments Off on Change hostname on Centos6
Read More »
in Linux
September 23, 2012

How To Create LVM Using pvcreate, vgcreate, lvcreate Commands

LVM stands for Logical Volume Manager. With LVM, we can create logical partitions that can span across one or more physical hard drives. First, the hard drives are divided into physical volumes, then those physical volumes are combined together to create the volume group and finally the logical volumes are created from volume group. To […]

Comments Off on How To Create LVM Using pvcreate, vgcreate, lvcreate Commands
Read More »
in Linux
August 29, 2012

Quit Bash Shell Without Saving History

How to log out / quit / exit Bash shell without saving Bash history : Remove Only Current Session Bash History and Leave Older History Untouched 1. Quit Bash Shell Without Saving History: Unset HISTFILE unset HISTFILE && exit 2. Quit Bash Shell Without Saving History: Kill Console kill -9 $$ Remove/Delete Bash History Completely […]

Comments Off on Quit Bash Shell Without Saving History
Read More »
in Linux
August 29, 2012

How to Install CentOS EPEL Repo.

How to install EPEL on CentOS (all version) RHEL/CentOS 7 64 Bit: # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm # rpm -ivh epel-release-7-5.noarch.rpm   CentOS 6.x 64-bit (x64): rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm or rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm or rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm CentOS 6.x 32-bit (32): rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm CentOS 5.x 32-bit (x86/i386): rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm CentOS 5.x 64-bit (x64): rpm -Uvh […]

Comments Off on How to Install CentOS EPEL Repo.
Read More »
in Linux
August 11, 2012

error: cannot open Packages database in /var/lib/rpm

While trying add some packages on Centos6 ,I got the following error: [root@raafat src]# yum install ksh rpmdb: Thread/process 22748/140143661344512 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 –  (-30974) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: […]

Comments Off on error: cannot open Packages database in /var/lib/rpm
Read More »

Previous Posts Next posts

Recent Posts
  • Exalogic Power On Sequence
  • Exalogic Power Off Sequence
  • Clear Winbind cache
  • ifconfig not found in CentOS 7 Minimal Install
  • How to install Vmware Vcenter server step by step
Categories
  • Apache (2)
  • Benchmarking (1)
  • CitrixXen (3)
  • Cpanel (5)
  • DBs (1)
  • DNS (2)
  • Exim (3)
  • Fireawall (3)
  • IIS (1)
  • Linux (21)
  • MSSQL Server (1)
  • Mysql (10)
  • Network (2)
  • Oracle (6)
  • Others (2)
  • Plesk (3)
  • Storag (3)
  • Uncategorized (2)
  • Virtualization (4)
  • Windows (9)
  • Xen (4)
  • Zpanel (1)
Archives

Join the mailing list

Your Name:
E-mail:*
Type the characters you see here:

Copyright © 2015 Raafat IT blog

Theme created by PWT. Powered by WordPress.org