Browsing all articles in Linux
May
6

“Cannot retrieve repository metadata” error on RHEL 5.7

Author Rai    Category Linux     Tags

If running yum on RHEL 5.7 spews out an error like:

"Cannot retrieve repository metadata (repomd.xml) for repository: rhel-5-server-cf-tools-1-rpms. Please verify its path and try again".

Try the following troubleshooting tips.

1.) Disable firewall like iptables to isolate firewall issues.
2.) Verify that your proxy settings are correct.
3.) Make sure that the machine is properly subscribed to RHN Network using certificate based management.

If none of these has fixed the problem, try upgrading the following packages to the version that works in RHEL 5.7:

  • python-rhsm-1.0.10-1.el5.x86_64.rpm
  • yum-3.2.22-40.el5.noarch.rpm
  • subscription-manager-1.0.24-1.el5.x86_64.rpm

These packages can be downloaded from the RHN package repository.

Once you have downloaded the RPM’s, transfer it to the server and run rpm:

rpm -Uvh /tmp/python-rhsm-1.0.10-1.el5.x86_64.rpm /tmp/yum-3.2.22-40.el5.noarch.rpm /tmp/subscription-manager-1.0.24-1.el5.x86_64.rpm

No package dependency should occur at this point, but if it does, resolve those dependencies first then try running the above command again.

After the package upgrade, you should now be able to run yum without errors:

[root@localhost ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-5-server-cf-tools-1-rpms | 2.8 kB 00:00
rhel-5-server-rhev-agent-rpms | 3.1 kB 00:00
rhel-5-server-rpms | 3.7 kB 00:00
repo id repo name status
Server Red Hat Enterprise 5Server - Server 3,261
Supplementary Red Hat Enterprise 5Server - Server 73
rhel-5-server-cf-tools-1-rpms Red Hat CloudForms Tools for RHEL 5 (RPMs) 35
rhel-5-server-rhev-agent-rpms Red Hat Enterprise Virtualization Agents for RHE 3
rhel-5-server-rpms Red Hat Enterprise Linux 5 Server (RPMs) 15,085
repolist: 18,529

Apr
1

Test GSM Modem Using minicom


If you want to test your GSM modem before running any application such as SMS gateway, a lightweight application called minicom can be used for this purpose.

To install minicom, run yum:

yum install minicom
After installing, create a symlink called /dev/modem to your serial or USB device. In this example, my GSM modem is detected and given the device name /dev/ttyS0, so:
ln -s /dev/ttyS0 /dev/modem
You need the symlink because minicom, by default, will use the device /dev/modem. If you have a USB device, it could be detected as /dev/ttyUSB0 or /dev/ttyACM0, depending on your setup.
Once you have your symlink ready, setup minicom by running:
minicom -s
You can use the next screen to setup your modem. In my case, I just need to setup the baud rate to 115200:
ââââââ[configuration]âââââââ

â Filenames and paths      â

â File transfer protocols  â

â Serial port setup        â

â Modem and dialing        â

â Screen and keyboard      â

â Save setup as dfl        â

â Save setup as..          â

â Exit                     â

â Exit from Minicom        â

ââââââââââââââââââââââââââââ

I selected Serial port setup -> E -> I
Then pressed Esc to fall back to minicom.
At the minicom screen, type the following commands to test SMS sending:

AT

You should get: OK

AT+CREG?

You should get : +CREG: 0,1

AT+CMGF=1

You should get: OK

AT+CMEE=1

You should get: OK

If all above commands executed without errors, try sending a test SMS by running:

AT+CMGS="639991234567"
> Testing
>

Exit the data sending part by pressing CTRL+z

You should get: +CMGS: 23

If not, try re-formatting the number to use the format +
(do not forget the + sign).

You should now receive your test SMS to mobile number +639991234567.
Mar
13

How to Verify SSL Certificates

How to Verify SSL Certificates

 

openssl x509 -in -text -noout
Example:
openssl x509 -in nagios.crt -text -noout
Output:

Not Before: Mar 29 09:38:10 2011 GMT

Not After : Jan 15 09:55:14 2018 GMT

Subject: C=PH, ST=Metro Manila, L=Mandaluyong City, O=PINOYTUX DOT COM, OU=IT Department, CN=nagios.pinoytux.com/emailAddress=admin@pintux.com

 

The advocate waits around a clipped unfortunate.

Mar
4

Install and Configure minidlna on Raspberry Pi

Raspberry Pi is a capable mini-device for learning and in my case, it also works as a media server.

Setting up a media server is simple, the more complex part of the process is arranging your media files in a way that makes sense to you. This was the case for me.  It took me about more than 3 hours to arrange the media files, when it only took me about 30 minutes to get minidlna up and running.

Get the media drive ready.

So first things first, make sure that you have your media storage mounted and ready to use. I have a 1 TB Seagate GoFlex FreeAgent Desk storage connected and mounted on my Raspberry Pi. Even though the drive is already powered by a separate power supply, I plugged its USB on a powered USB hub.  It just helps me sleep at night.

To get started, you need the UUID of your device:

$ sudo blkid

In the output of the command above, look for your storage device and take note of the value of UUID.

RPi does not come with NTFS support pre-installed, so we need apt-get to install NTFS support for my drive:

$ sudo apt-get install ntfs-3g

And create the mount point:

$ sudo mkdir /mnt/GoFlex

After you have the UUID of your device and the ntfs-3g package installed, you can edit your fstab. My GoFlex drive is configured to mount at boot time so I have the following line in my fstab:

UUID=76AE49F1-D79D-6FAF-B2FC-B806785F5721A /mnt/GoFlex ntfs-3g defaults 0 0

Run mount command to test:

$ sudo mount -a

If all goes well, you should have your media drive accessible by doing:

$ ls -l /mnt/GoFlex

Install minidlna

This part is so easy. Just run the apt-get command. That’s it.

sudo apt-get install minidlna

Answer yes if it asks. Done.

Configure minidlna

Your minidlna installation includes a config file named /etc/minidlna.conf. I want you to back the original file in case you need it.

$ sudo cp /etc/minidlna.conf /etc/minidlna.conf.$(date +%F)

After the backup, configure the minidlna.conf file:

$ sudo vi /etc/minidlna.conf

… and change the following lines:

# Change the Media Dir's to point to the external hard drive, obviously change these to match your directory layout
media_dir=V,/mnt/GoFlex/Files/DLNA/Movies
media_dir=V,/mnt/GoFlex/Files/DLNA/TV
media_dir=A,/mnt/GoFlex/Files/DLNA/Music

# Change db_dir so that the database is saved across reboots
db_dir=/home/pi/.minidlna

# Uncomment log_dir for now in case we hit problems
log_dir=/var/log

Almost there. Start the minidlna service:

$ sudo /etc/init.d/minidlna start

Tada! You now have a DLNA service ready for use with your DLNA-capable device, such as a Samsung SMART TV UA40EH5300.

Don’t forget to enable minidlna at startup:

$ sudo update-rc.d minidlna defaults

Caveat:

Although minidlna is a super lightweight and capable DLNA media server, it annoys me when it comes to updating the database. First, you need to to force-reload the service to update the database; and second, minidlna disconnects every time it detects a new media in any of the media directories defined in minidlna.conf.

I have no known way (yet) to address the first issue, but for the constant disconnection every time minidlna tries to update the media database when new media is found, I have disabled the inotify option in minidlna.conf:

inotify=no

The bad aftertaste of this is I have to force-reload minidlna after adding new media:

$ sudo /etc/init.d/minidlna force-reload

Aside from that, minidlna works for me.

Let me know if you run into an issue or a bug or something, and I will try to help you out.

Feb
3

How to Setup Raspberry Pi (Part 2)

On my previous post, I have shown the first steps on how to get the actual operating system of Raspberry Pi on an SD card. Here I will show you how to get the lean mean Raspberry Pi machine up and running.

Step 2: Attach peripherals, network and power

  1. On your RasPi board (which should be in its clear case by now), there is one (1) slot for the SD card. So I want you to place your SD card, the one where the Raspbian image was written onto, into the SD card slot. It should be snug and does not wiggle or move around.
  2. Connect your RasPi to your display device, I used our Samsung UA40EH5300 TV, by attaching the HDMI cable on your RasPi to the TV. Do not forget to change the source of your display to the HDMI port. (If you have the same model as I have, just press the Input button on the remote and select the highlighter HDMI option.)
  3. Connect the keyboard and mouse (if you want to use the GUI) to the two USB ports.
  4. Next, attach your ethernet or network patch cable to the ethernet port. Perform this step if you need your RasPi to be accessible over the network via SSH.
  5. Lastly, attach the Micro USB to the RasPi and plug the power supply in to the power outlet.
  6. Cross fingers.
  7. If everything goes well, you should see some texts running on your screen. It will eventually stop at the Setup guide. At this point, you may want to change the root password first by selecting the Change Password option. Reboot.
  8. At the next boot, you should be able to login using the user ‘pi’ and typing the password of your choice.
  9. Once you are logged in, you now have a fully working RasPi.

Congratulations!

In my next blog post, I will discuss how to setup DLNA on your RasPi for media sharing.

Powered by 1and1.comDomain Registrations starting at $9.98* Earn with Your BlogAdvertise @ PinoyTux

Search PinoyTux

Subscribe to Email Feeds

Enter Email Address:

Blog Lounge

Popular Posts

Recent Posts

Recent Comments

Site Stats