Những phần mềm nguồn mở tốt nhất năm 2010

Weekly Tips September 3rd, 2010

Danh sách Những ứng dụng nguồn mở dành cho doanh nghiệp xuất sắc nhất năm 2010 đã được InfoWorld bình chọn bao gồm bốn nhóm: Ứng dụng, phần mềm phát triển ứng dụng, nền tảng và tầng trung, phần mềm mạng.

Giải thưởng BOSSIE Awards 2010 – Nguồn: InfoWorld

Chín chương trình thuộc nhóm Ứng dụng nhận giải thưởng Bossie (Best Open Source Software) Awards 2010 của InfoWorld bao gồm một số gương mặt tiêu biểu như phần mềm ERP OpenBravo, giải pháp CRM SugarCRM, Pentaho Business Intelligence Suite, hệ thống quản lý văn bản Alfresco. Còn phải kể đến các nền tảng web cũng thuộc nhóm Ứng dụng như Drupal và Tiki Wiki (CMS) hay WordPress (blog).

Kế đến, nhóm Công cụ phát triển có gương mặt mới là ngôn ngữ Go của Google, JRuby, Zend PHP framework, JQuery và thư viện jQTouch JavaScript, một framework để tạo ra các ứng dụng cho iPhone và Android sử dụng HTML, CSS và JavaScript.

Trong nhóm Nền tảng và tầng trung, chú robot Android xuất sắc hiện diện ở vị trí đầu tiên, kế tiếp là máy chủ web Nginx. Giải cũng đánh dấu chiến thắng lớn của các giải pháp phần mềm ảo hóa như VirtualBox lẫn KVM (ảo hóa trong môi trường Linux) và OpenVZ.

Cuối cùng, 10 Công cụ mạng đoạt giải Bossie Awards năm nay bao gồm các giải pháp theo dõi mạng như Hyperic HQ hay OpenNMS, Vyatta, FreeNAS dựa trên nền tảng FreeBSD và Cacti cùng các ứng dụng khác.

Bossie (Best Open Source Software) Awards là giải thưởng hằng năm được các chuyên gia từ InfoWorld chọn lựa trong các giải pháp phần mềm mã nguồn mở dành cho doanh nghiệp nhằm chọn ra những phần mềm xuất sắc nhất thuộc các nhóm lĩnh vực.

Những phần mềm nguồn mở được chọn lọc nằm trong danh sách Bossie Awards rất hữu ích cho các doanh nghiệp vừa và nhỏ với kinh phí đầu tư cho các giải pháp phần mềm còn hạn hẹp. Tuy miễn phí nhưng chúng có cộng đồng sử dụng và phát triển đông đảo, các chức năng mới và lỗi thường xuyên được cập nhật.

Nguồn: TTO

How to install TTF Fonts on Fedora

Linux, Weekly Tips July 28th, 2010

  1. This HOWTO assume that you have TTF fonts collection in a directory /home/extras/fonts/TTF. Change the script below, if you use a different location.
  2. Login as ‘root’ (or equiv thru su or sudo).
  3. Copy the script below and save to file /home/extras/fonts/TTF/install.sh:
    #!/bin/tcsh
    echo ------------------------------------------------------------
    echo Installing true type fonts
    echo ------------------------------------------------------------
    pushd /usr/share/fonts
    echo Creating directory /usr/share/fonts/TTF ...
    mkdir TTF
    echo Copying true type fonts
    cd TTF
    cp /home/extras/fonts/TTF/*.ttf .
    umask
    echo Creating fonts.scale file ...
    ttmkfdir
    echo Creating index of scalable font files
    mkfontdir
    echo Adding /usr/share/fonts/TTF to font server path ...
    chkfontpath -a /usr/share/fonts/TTF
    echo Building font information cache files ...
    fc-cache
    popd
    echo Done!!!
  4. Ensure that script is executable
    # cd /home/extras/fonts/TTF
    # chmod 744 install.sh
  5. Execute the script
    # ./install.sh
  6. You should be able to use the TTF fonts now.

This script can be run each time new fonts are added to your collection.

Source: FedoraForum.org

Configuring A High Availability Cluster On RHEL/CentOS

Linux, Nginx, Weekly Tips May 19th, 2010

This guide shows how you can set up a two node, high-availability HTTP cluster with heartbeat on RHEL/CentOS. Both nodes use the Nginx web server to serve the same content.

Pre-Configuration Requirements

  1. Assign hostname nginx-primary to primary node with IP address 192.168.100.203 to eth0.
  2. Assign hostname nginx-slave to slave node with IP address 192.168.100.204 to eth0.

Note: on nginx-primary

uname -n

must return nginx-primary.

On nginx-slave

uname -n

must return nginx-slave.

192.168.100.9 is the virtual IP address that will be used for our Nginx webserver (i.e., Nginx will listen on that address).

Assume that Nginx web server has been installed and configured correctly on both nodes.

Configuration

  1. Download and install the heartbeat package on both nodes. In our case we are using RHEL/CentOS so we will install heartbeat with yum:
  2. yum install heartbeat

  3. Now we have to configure heartbeat on our two node cluster. We will deal with three files. These are:
  4. authkeys
    ha.cf
    haresources

  5. Now moving to our configuration. But there is one more thing to do, that is to copy these files to the /etc/ha.d directory. In our case we copy these files as given below:
  6. cp /usr/share/doc/heartbeat-2.1.4/authkeys /etc/ha.d/
    cp /usr/share/doc/heartbeat-2.1.4/ha.cf /etc/ha.d/
    cp /usr/share/doc/heartbeat-2.1.4/haresources /etc/ha.d/

  7. Now let’s start configuring heartbeat. First we will deal with the authkeys file, we will use authentication method 2 (sha1). For this we will make changes in the authkeys file as below.
  8. vi /etc/ha.d/authkeys

    Then add the following lines:

    auth 2
    2 sha1 test-nginx-ha

    Change the permission of the authkeys file:

    chmod 600 /etc/ha.d/authkeys

  9. Moving to our second file (ha.cf) which is the most important. So edit the ha.cf file with vi:
  10. vi /etc/ha.d/ha.cf

    Add the following lines in the ha.cf file:

    logfile /var/log/ha-log
    logfacility local0
    keepalive 2
    deadtime 30
    initdead 120
    bcast eth0
    udpport 694
    auto_failback on
    node nginx-primary
    node nginx-slave

    Note: nginx-primary and nginx-slave is the output generated by

    uname -n

  11. The final piece of work in our configuration is to edit the haresources file. This file contains the information about resources which we want to highly enable. In our case we want the webserver (nginx) highly available:
  12. vi /etc/ha.d/haresources

    Add the following line:

    nginx-primary 192.168.100.9 nginx
  13. Copy the /etc/ha.d/ directory from nginx-primary to nginx-slave:
  14. scp -r /etc/ha.d/ root@nginx-slave:/etc/

  15. Create the file index.html on both nodes:
  16. On nginx-primary:

    echo "nginx-primary test server" > /usr/html/index.html

    On nginx-slave:

    echo "nginx-slave test server" > /usr/html/index.html

  17. Now start heartbeat on the primary nginx-primary and slave nginx-slave:
  18. /etc/init.d/heartbeat start

  19. Open web-browser and type in the URL:
  20. http://192.168.100.9

    It will show “nginx-primary test server”.

  21. Now stop the hearbeat daemon on nginx-primary:
  22. /etc/init.d/heartbeat stop

    In your browser type in the URL http://192.168.100.9 and press enter.

    It will show “nginx-slave test server”.

  23. We don’t need to create a virtual network interface and assign an IP address (192.168.100.9) to it. Heartbeat will do this for you, and start the service (nginx) itself. So don’t worry about this.

    Don’t use the IP addresses 192.168.100.203 and 192.168.100.204 for services. These addresses are used by heartbeat for communication between nginx-primary and nginx-slave. When any of them will be used for services/resources, it will disturb hearbeat and will not work. Be carefull!!!

Howto setup Asterisk/FreePBX behind NAT

Asterisk, Weekly Tips March 10th, 2010

This HOWTO assumes that your FreePBX system is sitting behind a NATed firewall with no direct connection to the outside world and it is NOT in the DMZ zone. If you have your system facing outside, or have used Mapped IP addresses or other techniques, then it is assumed that you have adequate knowledge to interpret these instructions and also assure that you have properly secured your installation.

The three key considerations in setting up remote extensions are:

  • Asterisk Knows what network is external vs. internal
  • All Signaling and Media ports are forwarded to Asterisk
  • The Extension/Device is setup to be NATed

In order to accomplish the above we need to apply some configuration information into FreePBX, some Asterisk configuration files and on your firewall/router.

Internal/External Network Information

You must edit or create the file sip_nat.conf typically found in your /etc/asterisk directory and make sure it is owned by asterisk. We will assume that you have an internal network of 192.168.1.0/255.255.255.0 and that you have a static IP address of 24.72.182.16. If you have a dynamic IP, see the notes that follow. In this situation, you need to create or edit the following entries in your sip_nat.conf file:

externip=24.72.182.16
localnet=192.168.1.0/255.255.255.0

This tells Asterisk what IP address range is internal vs. external so that it can rewrite the SIP headers appropriately. If you have a dynamic address instead of a static address then you need to modify the above. You will need to have a domain name for the host, let’s assume you are using dyndns.com’s free service and have chosen the name mydomain.dyndns.org. Then your sip_nat.conf file would look like the following:

externhost=mydomain.dyndns.org
externrefresh=120
localnet=192.168.1.0/255.255.255.0

Where externrefresh tells Asterisk to recheck the IP address every 120 seconds in this case. You should adjust this higher or lower based on the frequency that this changes.

Firewall/Router Configuration

The default installation of FreePBX is configured to use UDP port 5060 as the SIP signaling port and UDP ports 10001-20000 as the RTP Media ports. All these ports must be forwarded to your FreePBX System. How to do this varies widely depending on the firewall or equipment that you are using. It is commonly referred to as Port Forwarding or maybe Destination NAT (DNAT). However it is referred, if we assume in this example that your FreePBX system has an internal IP address of 192.168.1.100 then you will want:

  • UDP/5060 -> Forward to 192.168.1.100
  • UDP/10001-20000 -> Forward to 192.168.1.100

Extension Information

We will assume you are using FreePBX in Extension mode but if you are using Devices/Users the same applies on the Devices page. You need to configure the extension with NAT enabled so that Asterisk knows this device is NATed and can apply the SIP rewriting rules that you previously configured in the sip_nat.conf file. Navigate to the desired extension and scroll down to the Device Options Section.

The configuration option nat must be set to yes, and you may want to set qualify to yes as well although not necessary.

With these steps, when properly configured, your external device should be able to communicate with your FreePBX server unless you have issues on the remote end where the device is located because of badly behaved Firewalls. The remote device should be configured to use your external IP address or domain name as configured above in the sip_nat.conf file.

The Top 7 Best Linux Distributions for You

Linux, Weekly Tips February 4th, 2010

There are various approaches to answering this question. The broad answer is: “any of them,” but that’s not very helpful if you’re just looking for a place to start.

The problem is, there never can be one best Linux distribution for everyone, because the needs of each user tend to be unique. Telling someone who’s looking for a good introductory distribution to try Gentoo, for instance, would be a mistake because for all its positive qualities, Gentoo is decidedly not a beginner’s distro.

All too often, Linux aficionados will tend to list the distributions they like as the best, which is fair, but if they are not aware of their audience, they could suggest something that does not meet that person’s needs. Finding a good Linux distribution is like finding a good match in an online dating service: good looks aren’t the only quality upon which to judge a Linux distro.

To help users discover the Linux distribution that’s best for them, this resource will definitively list the best candidates for the various types of Linux users to try. The use-case categories will be:

  • Best Desktop Distribution
  • Best Laptop Distribution
  • Best Enterprise Desktop
  • Best Enterprise Server
  • Best LiveCD
  • Best Security-Enhanced Distribution
  • Best Multimedia Distribution

Once you find the best Linux distribution for your needs, you can visit our Linux Migration Guides to assist you in installing and using the one you’d like to try.

Best Linux Desktop Distribution

There are a lot of Linux distributions that have the primary focus of becoming the next best desktop replacement for Windows or OS X. Of all the categories in this list, this is the most sought-after, and contentious, group of distros.

While it would be ideal to include many distributions on this list, the reality is that there really needs to be just one “best” Linux distribution. For early 2010, that distro has to be Canonical’s Ubuntu.

Ubuntu edges out its closest contenders, Fedora and openSUSE, because its development team is constantly focused on the end-user experience. Canonical and the Ubuntu community have spent a lot of time and resources on bringing ease-of-use tools to this distribution, particularly in the area of installing Ubuntu and installing applications within Ubuntu.

In addition, Ubuntu’s level of support for its desktop products is highly superior, which is important in this class of distributions since it is the most likely to contain users new to Linux. Both the official and unofficial Ubuntu documentation is robust and searchable, a big plus.

Best Linux Laptop Distribution

Laptop distributions almost fall into the same category as desktop users, but there are a number of key differences that make the criteria for evaluating a good laptop distribution important. Power management, docking tools, and wireless ease-of-use are critical to users on the go, as is having a distro that meets those needs.

Right now, the best laptop distribution is openSUSE, one of the lead contenders for the desktop honors. On the laptop, openSUSE shines with great connectivity tools, such as an easy-to-use networking toolset that not only handles WiFi connectivity, but also CDMA/cellular modem connections.

openSUSE also deals with docking stations for laptops very well, including dual-monitor management on the fly. Power management is very granular, which is great for detailing various power needs you might find yourself needing.

Best Linux Enterprise Desktop

This category is replete with great contenders as well, and it’s difficult to highlight just one. At the end of the day, though, the nod must be given to SUSE Linux Enterprise Desktop (SLED).

The reason is simple: while SLED and its primary competitor Red Hat Enterprise Linux Desktop are nearly identical in features and support performance, SLED has the advantage of the openSUSE Build Service, a free and open service that lets applications be built and delivered to SUSE Linux and openSUSE products (as well as Red Hat and CentOS).

This is a very important differentiator in enterprise desktop development, as it means that SLED has the current advantage of application building and deployment in the enterprise arena.

Best Linux Enterprise Server

Again, in this category it really comes down to two main contenders: Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES). Given the pick for the Enterprise Desktop category, you might expect SLES to get the “best of” label here.

But, when all factors for the enterprise server are weighed, RHEL is still the king of this particular hill.

Red Hat edges out Novell with its server product, because RHEL users get a deeply mature distribution, and Red Hat’s support structure is second to none in the enterprise channels.

Best Linux LiveCD

As Linux technology improves, users can easily choose the LiveCD version of practically any of the Linux distros listed here to get the best LiveCD experience for their needs.

There is a specialized class of LiveCDs, however, that offers users utilities and tools for the specific purpose of repairing existing Linux and Windows installations. These distros are very useful to have regardless of what primary Linux distribution you like to use, because in a crisis they are invaluable to own.

In this class of distribution, KNOPPIX is hands-down the most complete and useful distro. Loaded on a CD or USB storage device, KNOPPIX will let you recover from nearly any rare Linux system crash as well as the much-less-rare Windows breakdowns.

Best Linux Security-Enhanced Distribution

Linux is inherently very secure compared to other operating systems, but there’s always room for improvement.

One of the challenges for locking down Linux is if you are not careful, you can take away too much functionality. Another challenge is that the best security-oriented Linux distro, SELinux, is historically known to be difficult to configure correctly. Still, if security out of the box is your priority, this is the best place to begin.

Another approach is the white hat method: using security and forensic tools to examine your existing installation, determine the holes, then lock your system down based on what gaps you find. If you have the time and inclination, this is a great way to do it, because this will get any existing system more secure right away.

For the white hat approach, the best distribution is BackTrack Linux, a dedicated penetration testing distro that will enable you to safely try to crack any system you are caretaking. Its toolset and strong community give it the advantage in this category.

Best Linux Multimedia Distribution

General Linux distributions have come a long way in terms of multimedia performance. Rare is the audio or video file that can’t be played on Linux. Music services such as Rhapsody and video sites like YouTube and Hulu are also standards-compliant and accessible to Linux users.

Still, for those users who are multimedia creators as well as consumers, there are Linux distributions that contain powerful tools for audio and video editing.

The best in this class is currently Ubuntu Studio. For audio, video, and graphic production, it contains a very complete set of tools, as well as format and codec support for a huge range of multimedia formats.

The applications contained in Ubuntu Studio are the same or similar to those used by major studios to create cutting edge work, so users are getting the best apps, coupled with the strong support ethos already found in the Ubuntu community.

In Linux there are as many opinions as there are lines of code. This represents one view of the best in Linux. What’s yours?

About Author:

Brian Proffitt is a Linux and Open Source expert, having worked as a member of the Linux media as well as the Linux Foundation. My off-hour activities include Habitat for Humanity, taekwondo, and being the lucky dad of three fantastic daughters. Follow me on Twitter @LinuxScribe.