Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Thursday, March 15, 2012

Yum cannot retrieve repository metadata for CentOS 5

If you encountered this type of errors, do look at your repo configuration at /etc/yum.repos.d. In my situation, I was trying to update a package which falls under Centos-Base.repo

http://mirror.centos.org/centos/5/addons/x86_64/repodata/repomd.xml: [Errno 12] 
Timeout: 
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: 
addons. Please verify its path and try again


http://mirror.centos.org/centos/5/addons/x86_64/repodata/primary.sqlite.bz2: 
[Errno 12] Timeout: Trying other mirror.
http://mirror.centos.org/centos/5/addons/x86_64/repodata/primary.sqlite.bz2: 
Errno 12] Timeout: Trying other mirror.
Error: failure: repodata/primary.sqlite.bz2 from addons: 
[Errno 256] No more mirrors to try.
 

3 things you need to do
  1. Check that your mirriorlist in /etc/yum.repo.d is uncommented. It should look something like
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  2. Check that your baseurl is uncommented. (Usually this is not needed, but this is a last resort
    baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
  3. Type the parameter in the repo list
    enabled=1


Monday, March 12, 2012

Flushing DNS Cache in CentOS

If you need to flush dns, you can use the following command to:
# service nscd restart

Usually you do not need to modify the /etc/nscd.conf and the current default should suffice for most situation.

According to Linux Manual Page
Nscd  is a daemon that provides a cache for the most common name  service  requests.  The  default  configuration file,  /etc/nscd.conf,  determines  the  behavior  of the cache daemon. See nscd.conf(5).
 

Nscd provides cacheing for  accesses  of  the  passwd(5), group(5),  and  hosts(5)  databases through standard libc interfaces,  such  as  getpwnam(3),  getpwuid(3),  getgrnam(3), getgrgid(3), gethostbyname(3), and others.......

Monday, December 19, 2011

Upgrading of Broadcom Drivers to resolve eth0 NIC SerDES Link is Down

If the post Encountering eth0 NIC SerDES Link is Down did not resolve your issue and you are still encountering "eth0 NIC SerDES Link" issues, do upgrade the Broadcom Drivers from your vendor site and it will eliminate your issue immediately. Since my vendor is IBM, so I downloaded the Broadcom BNX2 Drivers
Broadcom BNX2 driver version bnx2-2.0.23b for RHEL 5 - IBM System x and BladeCenter

If you are not sure what is your version of drivers, you can do a
# ethtool -i eth0

The version 2.0.8 and above should resolve the above issue

Oh yes, if you are using IBM Products and the above drivers from IBM, after unpacking the drivers from IBM and ensuring you have the necessary prerequistics, just do a

If you are using the Free Clone of Redhat which includes CentOS or Scientific Linux, you may want to temporarily modify the /etc/redhat-release information to simulate a real RHEL Distribution. Vendor patches often requires RHEL distribution

#CentOS release 5.4 (Final)
Red Hat Enterprise Linux AS release 5


# mkdir brcm
# cd brcm
# tar -zxvf brcm_dd_nic_netxtreme2-2.0.23b_1.62.15_rhel5_32-64.tgz
# ./install.pl --update 

 INSTALL_OPTIONS --yes --update


        Drivers will be installed/migrated to 2.6.18-164 version

----------------------------------------------------------------------
Checking kmod-brcm-netxtreme2-6.2.23-1.x86_64.rpm
WARNING: Non Whitelist symbol detected
----------------------------------------------------------------------
kmod-brcm-netxtreme2-6.2.23-1.x86_64.rpm installed successfully
SUCCESS

Friday, March 25, 2011

Switching off CPU Throttling on CentOS or Fedora

Under CentOS and Fedora, you can switch off CPU Throttling or "Dynamic Frequency Scaling" to maximise your CPU performance. For more information of CPU Throttling, you can also read Dynamic Frequency Scaling from Wikipedia. Just type the command

# /usr/bin/cpufreq-selector -g performance

For Debian-based hardware, you may want to take a look at
Looking at Xorg High CPU Usage Issue for netbook

Saturday, January 8, 2011

Command line for Networking

Read this interesting article from Linux Journal 200th Issue of "Networking on the Command Line"

ifconfig is one of the utility discussed. It can be used to configure many aspects of networking. For example,

1. Using ifconfig to change and activate IP Address
# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up

2. Using ifconfig to change netmas
# ifconfig eth0 netmask 255.255.255.0

3. Using ifconfig to change MTU
# ifconfig MTU 1500

4. Using ifconfig to change network promiscuous mode
# ifconfig promisc

For more information, do look at "man ifconfig"

Friday, October 22, 2010

Using Yum Provides

This is a continuation of Using Yum effectively (Part 1) and Using Yum effectively (Part 2)

I have learned a cool command line "yum provides". "yum provides" help you search for the packages that will install either a file or directory. For example

# yum provides bash

bash-3.2-24.el5.x86_64 : The GNU Bourne Again shell (bash) version 3.2
Repo : base
Matched from:

bash-3.2-24.el5.x86_64 : The GNU Bourne Again shell (bash) version 3.1.
Repo : installed
Matched from:
Other : Provides-match: bash

Sunday, October 3, 2010

Installing HandBrake on Fedora 13

Handbrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder, available for MacOS X, Linux and Windows.

Installation is straight-forward and much of this material is taken from Compiling HandBrake on Linux

Install the following packages
# yum groupinstall "Development Tools" "Development Libraries" \
"X Software Development" "GNOME Software Development"

# yum install yasm zlib-devel bzip2-devel \
dbus-glib-devel libgudev1-devel webkitgtk-devel libnotify-devel \
gstreamer-devel gstreamer-plugins-base-devel

More Information
  1. HandBrake Wiki
  2. HandBrake Wiki FAQs
  3. HandBrake Site
Another Useful DVD-Backup or DVD-ripping tool is Thoggen. For more information, see Installing Thoggen on Fedora 11

Sunday, September 19, 2010

Uninstalling Nouveau driver and Installing NVIDIA Drivers on Fedora 13

I was trying to install the proprietary NVIDIA Driver for my workstation with Fedora 13, but was unable to install due to the presence of Nouveau Driver which Fedora installed by default and this installation by Fedora caused a conflict with the intended installation of NVIDIA Driver

Source for this information is derived from a Forum http://www.linuxquestions.org/questions/fedora-35/fedora-12-nouveau-nvidia-driver-solution-771248/

Step 1: Blacklist Nouveau Driver
# vim /etc/modprobe.d/blacklist.conf
Add the below line to the end of /etc/modprobe.d/blacklist.conf
blacklist nouveau

Step 2: Edit /boot/grub/grub.conf and add the following to the end of the kernel line
rdblacklist=nouveau vga=31B
Replace 31B with the desired mode:
1600x1200 - 346
1280x1024 - 31B
1400x1050 - 348
1024x768 - 318
800x600 - 315

For example:
......
kernel /vmlinuz-2.6.34.6-54.fc13.i686 ro 
root=/dev/mapper/vg_kittycool-lv_root rd_LVM_LV=vg_kittycool/lv_root rd_LVM_LV=vg_kittycool/lv_swap 
rd_NO_LUKS rd_NO_MD rd_NO_DM 
LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 
KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet rdblacklist=nouveau vga=31B
......

Step 3: Download and Install NVIDIA Drivers
# chmod 755 NVIDIA......run

# ./NVIDIA......run

# reboot

Friday, August 13, 2010

Connection activation failed Device not managed by NetworkManager

After a fresh installation of Fedora 13, I encountered "Connection activation failed Device not managed by Network Manager". I have no ethernet connection.

Just like all RH users, I did a
# service network restart

And I go this error
Shutting down interface eth0:  Error org.freedesktop.DBus.Error.ServiceUnknown:
The name com.redhat.ifcfgrh1 was not provided by any .service files
Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting
failed: Cannot disconnect an inactive device.
                                                           [FAILED]
Shutting down interface eth1:  Error org.freedesktop.DBus.Error.ServiceUnknown:
The name com.redhat.ifcfgrh1 was not provided by any .service files
Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting
failed: Cannot disconnect an inactive device.
                                                           [FAILED]
Shutting down loopback interface:  Error
org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.ifcfgrh1 was not
provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.ifcfgrh1
was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.ifcfgrh1
was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.ifcfgrh1
was not provided by any .service files
                                                           [  OK  ]
Bringing up loopback interface:  Error

It is only starting the Network Manager Manually, I got my ethernet connection
# /etc/init.d/NetworkManager start

For more information on this phenomenon, you can take a look at Bug 583113 - Error while starting network service soon after fresh installation  

Tuesday, July 13, 2010

Users encountering Invalid Configuration Location on Eclipse

After installing the Eclipse software as according to Eclipse Integrated Development Environment ( IDE ) for Linux, your users may encounter error after they type "eclipse"

The error found Locking is not possible in the directory

"/usr/local/eclipse/configuration/org.eclipse.osgi. A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location,or disable file locking passing "=Dosgi.lockling=none" as a VM argument. 'usr/local/eclipse/configuration/org.eclipse.orgi/.manager/.fileTableLock (Permission denied)"

To solve the issue, you simply have to initiate a flag "-configuration" and point the location to your home directory
$ eclipse -configuration < location >

Saturday, July 10, 2010

Alacarte Gnome Menu Editor



Alarcarte is Gnome Menu Editor. A sniffy little tool to help you manage your Gnome Menu. To install, just type

# yum install alacarte

You will be able to manipulate menus

Tuesday, July 6, 2010

Installing Wireless Driver on HP Mini 2140 with Fedora 13


Installing Fedora 13 on HP Mini Note 2140 is a breeze except that for the Broadcom 4312G 802.11b/g Wi-Fi Adapter will not be installed. To install the driver for Broadcom 4312G 802.11b/g Wi-Fi Adapter will not be installed, follow the excellent tutorial on Fedora Broadcom Linux STA Driver .

Step 1: Get a wired connection to the Internet.

Step 2: Configure RPM Fusion. Download both free and non-free repository
# rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

# rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm 


Step 3: Install the Broadcom wireless driver package
# yum install broadcom-wl

Step 4: Finally Try loading the driver
# modprobe wl

If the modprobe doesn't work, just reboot
# reboot

Monday, July 5, 2010

Using GParted to resize partition

The GParted application is a graphical partition editor for
  1. Creating, reorganizing, and deleting disk partitions. GParted allows you to perform actions on partition such as resize or move (while preserving data) , create, labelling and deleting of partition.
  2. The supported file system includes ext3, ext4, NTFS, linux-swap, FAT16/FAT32
  3. Enable and Disable partition
GParted can be found on most distribution. For Fedora, you can install by
# yum install GParted

Using GParted is quite easy to use. If you need more information, you can use GParted Live Howto Guides
  1. How to put GParted live on USB
  2. How to put GParted live on a PXE server
  3. How to put GParted live on a hard drive
  4. How to create GParted live from scratch
You can also use GParted partitioning software - Full tutorial

Saturday, July 3, 2010

Using TestDisk to conduct emergency recovery for Linux and Windows

Testdisk by CGSecurity is a useful toolkit to help. According to the TestDisk Website,
"TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy."
"In addition, it can
  1. Fix partition table, recover deleted partition
  2. Recover FAT32 boot sector from its backup
  3. Rebuild FAT12/FAT16/FAT32 boot sector
  4. Fix FAT tables
  5. Rebuild NTFS boot sector
  6. Recover NTFS boot sector from its backup
  7. Fix MFT using MFT mirror
  8. Locate ext2/ext3 Backup SuperBlock
  9. Undelete files from FAT, NTFS and ext2 filesystem
  10. Copy files from deleted FAT, NTFS and ext2/ext3 partitions. "

Testdisk is very useful expecially if you are dual-booting from both Linux and Windows and if accidentally deletion. a few listed tutorial from a much larger list.
  1. Recover Damaged Hard Disks (bad sectors)
  2. TestDisk Step-by-Step
  3. Recovery of CD/DVD 

Monday, June 21, 2010

Rpmbuild Tutorial

RPMBuild is used to build both binary and source packages that can be used with the rpm commands.

There are a few good resources
  1. Rpmbuild Tutorial is a detailed well-written tutorial on rpmbuild utilities.
  2. RPM.org User Documentation is also another good material to read on.
  3. RPM Guild an excellent document that covers all aspects of the Red Hat Package Management system

Monday, June 14, 2010

Fstab and Device UUID on Fedora

When I added a Hard Disk on my Fedora box, I noticed that the /etc/fstab are already using UUID to mount disk.

Knowing UUID is quite essential if you wish to mount the drives using /etc/fstab especially for more current version of Linux. The advantage of using UUID is really identify the disk correctly and mitigate mounting issues caused by reordering of HDD

First thing first, you may want to list all the detected devices by UUID
# ls -l /dev/disk/by-uuid/

To list the UUID of a particular disk For example /dev/sdb1, you can use blkid command
# blkid /dev/sdb1

Much thanks to fstab with uuid by Linux by Example

Sunday, June 6, 2010

Setting ProFTPD on Fedora and CentOS

I have not setup FTP server for a long time. Most of the time when I want to transfer files, I usually use SCP of SFTP. But this blog entry is a simple instruction set how to setup and configure basic FTP service. I'm using the ProFTPD on Fedora 12. Most of the material has been taken and modified from Linux Format Magazine

First thing first. What is ProFTP?

 ProFTPD is a stable and full-featured FTP Server. It can be run as a standalone server or from xinetd. It supports anonymous, authenticated logins, authenticated with LDAP directories or even sql databases.

 Installation of ProFTP Server
yum install proftpd
chkconfig --levels 235 ptoftpd on

To enable anonymous logins, edit the /etc/sysconfig/proftpd file
# vim /etc/sysconfig/proftpd

Inside the /etc/sysconfig/proftpd file
PROFTPD_OPTIONS="-DANONYMOUS_FTP"

# service proftpd restart

The default home directory of the anonymous logins is /var/ftp/
The default directory to place content for anymous users to put is at /var/ftp/pub
The default directory for anonymous users to upload to /var/ftp/upload


2. Virtual Hosting
Unfortunately, FTP require different IP Address for each site even though it is supposed to be virtual hosting. Unlike HTTP protocol which includes a host header field.

 Assuming you have several IP Addresses which you can use uniquely for your Virtual Hosting, you still need to set up IP Alias on the network card and a "VirtualHost" section in the proftpd.conf

Create a Network Card Alias
Step 2a - Create a network card alias for the network card
# touch /etc/sysconfig/network-scripts/ifcfg-eth0:N 
(where N is the alias number)

Step 2b: Inside ifcfg-eth0:N
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
HARDWARE=xx:xx:xx:xx:xx:xx

Step 2c: Restart Network Service
# service network restart


Step 3: Configure the VirtualHost inside the /etc/proftpd.conf
The script is rather long, you can get a sample from http://www.proftpd.org/docs/configs/virtual_authuserfile.conf

Bascially, you can change the Default Chdir to a new path ie /var/ftp/site2/pub. You can also change the message /var/ftp/site2/welcome.msg


Further Notes:
  1. List of Directives for ProFTPD configuration files 
  2. Active FTP vs. Passive FTP, a Definitive Explanation
  3. Virtual Hosting With Proftpd And MySQL (Incl. Quota)
  4. PROFTPD virtual user – quick howto

Thursday, May 27, 2010

Installng xsensors and lm-sensors on fedora 12



Background
It is quite useful to know information regarding  your hardware especially the temperature.

Lm-sensors is the low level driver and service that connects to the motherboard components capable of monitoring temperatures and voltages. Lm-sensors collects the data over the reevant subsystem, an I2C interface.

XSensors is the front-end to display the data collected by Lm-sensors

Hardware Prerequisites.
For more information on hardware support by lm_sensors, please visit the Device lm-sensors wiki



Install Prerequisites and XSensors
Step 1: Install lm_sensors package
yum install lm_sensors lm_sensors-devel

Step 2: Install gtk2

yum install gtk+

Step 3: Download the xsensors from the http//linuxhardware.org). The current version at this point in writing is xsensors-0.70.
*Ensure you have GNU compilers installed so that you can compile the program
tar -zxvf xsensors-0.70.tar.gz
cd xsensors-0.70
./configure
make
make install

Tuesday, May 25, 2010

Use Yum to download without installing it

Step 1: First, you have to install the yum-downloadonly plugin for yum
# yum install yum-downloadonly

Step 2: Run the command to download the latest vsftpd
# yum install vsftpd --downloadonly 

Step 3: To specifies an alternate directory to store packages
# yum install vsftpd --downloadonly --downloaddir=/opt

Thursday, May 13, 2010

BOINC - Open-source software for volunteer computing and grid computing

BOINC is a program that lets you donate your idle computer time to science projects like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others. Currently more than 500,000 computers are linked and BIONIC is delivering 5 PetaFlops of Computin Hours! Amazing.


Gentoo, Fedora, Ubuntu and Debian are supported. For more information on installation on Linux, you can read the BIONIC wiki. Installing BOINC
For Fedora, do the following
Install the package using yum
yum install boinc-client boinc-manager

Start the service
service bionic-client start