I recently had to do some work on a RHEL6 environment, where the application I needed to test mandated python 2.7. Not a big ask...but RHEL6 is joined at the hip to python 2.6. so what to do...
There's a nice and easy way to use more 'up-to-date' versions of software platforms on RHEL without breaking the OS....
Software Collections
Software Collections provides a method for newer software platforms to co-exist with the versions that the OS relies upon. With a RHEL subscription, all you need to do is subscribe to the SCL channel, and you'll have access to all the new 'stuff'.
Here's how
rhn-channel --add --channel rhel-x86_64-server-6-rhscl-1
<enter your rhn credentials>
(if you're using CentOS - take a look at http://wiki.centos.org/AdditionalResources/Repositories/SCL for how you enable the repo)
Then go and grab the software with yum
yum install python27
This will establish a python2.7 environment under /opt/rh/root/python27
You can then check that all is well by
[root@my-host ~]# scl enable python27 'python -V'
Python 2.7.5
Now once you have the environment in place you can switch over to it, and install python packages through easy_install or pip as normal.
eg.
>scl enable python27 bash
>easy_install pip
>pip install <module>
Job done.
Now for the next bit. If you have a user that wants this environment everytime they login what do you do...getting them to issue the scl command is likely to provoke screams! So to keep them happy, get them to update their bash profile, to enable the scl whenever they start a shell.
Add the following to the user's .bash_profile
. /opt/rh/python27/enable
Now when they login they'll automagically pickup the python 2.7 environment :)
And the beauty of the SCL, is the python environment used by the system is untouched
Simples.
Wednesday, 21 May 2014
Saturday, 5 April 2014
Home wifi slow? Try this..
If you're like me and you live in a typical city environment, you'll may find that your wifi connection speeds between your device and your router can vary drastically for no apparent reason.
Annoying isn't it!
The bad news is this can be caused by wifi routers in your local area sharing the same 'channel'.
The good news is that there are tools out there that allow you to detect and display wifi activity in your area, so that you can potentially move your wifi router to a less congested channel, and you should see your speed stabilise.
There are lots of tools out there. I have an Android tablet, so I used an app called "Wifi Analyzer" from the Play Store. This tool has a number of modes for displaying signal strengths but this is my favourite view (channel graph)
This is from view -> channel graph.
This shows that the channel 6 has a number of overlapping wifi routers that are using the same channel. Devices connected to these routers will be experiencing performance/throughput variations when using services on the web.
By contrast, the red area is where I've placed my router - as you can see not so busy and a higher signal strength. The picture gets a little bit more messy during the day as more devices come online, but overall pushing my router to a less crowded channel has helped.
I'm a Linux user (my wife would say addict), so if you're afflicted too - you can use the CLI to build a similar picture - albeit in text :)
This may not be the cure you're looking for...but every little bit helps. Maybe this will help you too.
[root@laptop ~]# iwlist wlp3s0 scanning | egrep '(Channel:|Quality|ESSID)'
Channel:13
Quality=70/70 Signal level=-3 dBm
ESSID:"Do"
Channel:5
Quality=43/70 Signal level=-67 dBm
ESSID:"Re"
Channel:6
Quality=56/70 Signal level=-54 dBm
ESSID:"Mi"
Channel:6
Quality=33/70 Signal level=-77 dBm
ESSID:"Fa"
Channel:1
Quality=38/70 Signal level=-72 dBm
ESSID:"Sol"
Channel:1
Quality=34/70 Signal level=-76 dBm
ESSID:"La"
So you can see easily the overlaps on channels 1 and 6Channel:13
Quality=70/70 Signal level=-3 dBm
ESSID:"Do"
Channel:5
Quality=43/70 Signal level=-67 dBm
ESSID:"Re"
Channel:6
Quality=56/70 Signal level=-54 dBm
ESSID:"Mi"
Channel:6
Quality=33/70 Signal level=-77 dBm
ESSID:"Fa"
Channel:1
Quality=38/70 Signal level=-72 dBm
ESSID:"Sol"
Channel:1
Quality=34/70 Signal level=-76 dBm
ESSID:"La"
This may not be the cure you're looking for...but every little bit helps. Maybe this will help you too.
Subscribe to:
Posts (Atom)
