lundi 30 décembre 2013

bc : une calculatrice intégrée

Le plus utile, le moins reconnu du mande unix et donc Linux bc:
bc une calculatrice scientifique complète...

bc est une calculatrice basique sous unix. Mais elle n'a de basique que le nom car elle permet d'avoir des possibilités et des fonctionnalités bien plus avancées que la plupart des calculatrices. bc est aux opérations mathématiques ce que awk est à la manipulation de texte.

Petit tour d'horizon

bc possède deux modes d'utilisation, un premier en mode interactif, qui permet de 'lutiliser directement en ligne de commande pour des opérations ponctuelles, un second mode, un mode flot, qui permet d'effectuer des opérations en série (à partir d'un fichier ou d'un script).

mode interactif

Le mode interactif est simplement appelé par la commande bc. Le programme attend ensuite les intructions, tout comme le ferait ftp ou telnet, et s'arrête avec la commande quit. Lançons donc bc :
# bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
puis demandons-lui d'effectuer quelques opérations qu'il suffit de valider par la touche entrée du clavier :
3+5
8
./2
4
./3
1

Remarque

Le point "." permet de rappeler la valeur courante. Dans notre exemple, le point rappelle 8 puis 4.
Nous remarquons que 4/3 renvoie uniquement la partie entière. Pour modifier la précision, il suffit d'utiliser scale :
scale=50
4/3
1.3333333333333333333333333333333333333333333333333
On peut aussi modifier le format de sortie avec obase :
obase=16
85+3
58
On peut aussi modifier le format d'entrée avec ibase :
ibase=2
111011101+110101010
387
Nous avons en entrée une opération en base 2 (binaire) et le résultat est affiché en hexadécimal (base 16).
Et ainsi de suite...

mode flot

Pour effectuer la même chose en mode flot, il suffit de rediriger les opérations d'une entrée vers bc :
# echo 'scale=50; ibase=10;obase=16; 85+49' | bc
86
Ou bien mettre les opérations dans un fichier :
3+5
./2
./3
scale=50
4/3
obase=16
85+3
ibase=2
111011101+110101010
...
en veillant à ce que chaque ligne se termine par un retour chariot et interpréter ces opérations avec bc de la façon suivante :
# cat monfichier.bc | bc
8
4
1
1.33333333333333333333333333333333333333333333333333
58
387
ou encore :
# bc < monfichier.bc
8
4
1
1.33333333333333333333333333333333333333333333333333
58
387
Nous retrouvons bien nos résultats.
Il peut arriver d'avoir à effectuer des opérations sur le contenu d'un fichier. Par exemple, de faire la somme d'une colonne. S'il est possible et aisé de le faire avec awk, bc permet tout aussi bien de le faire. Mais awk peut s'avérer vite moins efficace si les opérations deviennent complexes.
Avec bc, par exemple, une somme de colonne se fera de la façon suivante :
# ls -l | awk 'NR>1 {print ".+" $5}' | bc | tail -1
permet, par exemple de calculer la somme de l'espace occupé par les fichiers du répertoire courant. Ici, c'est une commande ls mais cela peut tout aussi bien être une redirection de fichier, etc.

Fonctions avancées

Si bc ne savait faire que cela, il n'aurait pas beaucoup d'intérêt. Cependant, tout comme awk, bc sait interpréter un langage qui permet de réaliser des fonctions bien plus avancées.

Fonctions avancées en mathématiques

L'option l permet à bc de disposer des opérations mathématiques suivantes :
  • s(x) : sin x
  • c(x) : cos x
  • e(x) : exp x
  • l(x) : ln x
  • a(x) : atn x
  • j(n,x) : bessel
Par exemple :
# echo 'scale=50; l(25)' | bc -l
3.21887582486820074920151866645237527905120270853703

Définir ses propres fonctions

Grâce à un langage associé, bc permet également de définir d'autres fonctions inexistantes. Par exemple :
/* Une fonction pour retourner le log n de x*/
define log(n,x) {
scale=50
y = l(x) / l(n)
return (y)
}
Cette fonction permet de calculer le logarithme en base n de la valeur x.
Cette fonction est créée dans un fichier. Par exemple, fnc.bc. Pour utiliser cette fonction, il suffit alors de l'employer comme suit :
# echo 'log(10,25)' | bc -l fnc.bc
1.39794000867203760957252221055101394646362023707578
Nous avons calculé ainsi le logarithme en base 10 de la valeur 25.
De la même façon, ce langage gère les boucles (if(cond)..., while(cond)... et for(init;cond;inc)...) , les condition (if(cond)..., else ...), etc. Pour plus de détails, reportez-vous au manuel de la commande.
Un problème peut subsister dans cet usage. La notation impose d'utiliser bc -l fnc.bc pour choisir quelle bibliothèque de fonctions personnelles employer. Cela sera plus simple si l'on n'avait pas à utiliser autant de paramètres. Pour cela, modifions notre fichier de définitions et ajouter sur la première ligne :
#!/usr/bin/bc -l
De plus, transformons ce fichier en exécutable en lui donnant les droits d'exécution.
Nous pouvons ainsi utiliser directement la bibliothèque en exécutant ce fichier, soit de manière directe :
# fnc.bc
log(10,25)
1.39794000867203760957252221055101394646362023707578
soit de manière indirecte :
# echo 'log(10,25)' | fnc.bc
1.39794000867203760957252221055101394646362023707578


Dormir tranquille: etteindre à une certaine heure

la commande leave laisser (leave) attend que le temps spécifié (dans les 12 prochaines heures), puis vous rappelle que vous devez partir en écrivant à la console que vous devez laisser vos sessions
pfares@pascal-Notebook:~$ leave 
When do you have to leave? 2300  
Alarm set for Mon Dec 30 23:00. (pid 8808)
Esayer et voir le résultat!

Des programmes prêts à l'emploi!

C'est vieux mais ça marche toujours!

date :  affichage de l'heure et de la date

     pfares@pascal-Notebook:~$ date
                lundi 30 décembre 2013, 20

cal : affichage du calendrier

pfares@pascal-Notebook:~$ cal
   Décembre 2013      
di lu ma me je ve sa  
 1  2  3  4  5  6  7  
 8  9 10 11 12 13 14  
15 16 17 18 19 20 21  
22 23 24 25 26 27 28  
29 30 31              
           :55:55 (UTC+0200)
--
uptime, ruptime : depuis quand le  système fonctionne-t-il?
pfares@pascal-Notebook:~$ uptime
 21:00:23 up  2:48,  3 users,  load average: 0,19, 0,26, 0,17
pfares@pascal-Notebook:~$ ruptime
pascal-Noteb  up       2:50,     1 user,   load 0.53, 0.34, 0.20
Question? Quel est la différence en ruptime et uptime? essayez, cherchez et répondez  

dimanche 29 décembre 2013

The first smartphones running the Linux-based OS will reportedly appear in 2014.

A smartphone running Ubuntu Touch.
Canonical has found a hardware partner to help it build the first generation of Ubuntu Touch smartphones.
In an interview with CNET, Canonical founder Mark Shuttleworth remained tight-lipped about the identity of the partner, but suggested that high-end devices running the Linux-based OS will appear in 2014: “We’ve shifted gears from ‘making a concept’ to ‘it’s going to ship.’ That has a big impact on the team.”
Shuttleworth also suggested his company is negotiating with other manufacturers: “We are now pretty much at the board level on four household brands.”
Canonical first unveiled in January 2013 that it was working on a version of Ubuntu for smartphones, following up that announcement with a set of system requirements for entry-level and higher-end devices, followed by a preview SDK and app design guides, then images and open-source code for a Touch Developer Preview. The Ubuntu mobile platform will allow HTML5 and native apps; Web apps can also run independently of the browser, with full access to system resources.
The biggest question, however, was always how Ubuntu Touch would end up on commercially available smartphones. Over the summer, Canonical tried to fund the Ubuntu Edge smartphone via crowdfunding Website Indiegogo. The funding goal was set at $32 million; within the first 24 hours of the project’s July 22 launch, some $3.45 million had poured in. But that momentum proved unsustainable, and the donations petered out at roughly $12 million—nowhere near what Canonical needed to build the Ubuntu Edge.
Even as its crowdfunding effort petered out, Canonical was negotiating with other manufacturers. “While we passionately wanted to build the Edge to showcase Ubuntu on phones, the support and attention it received will still be a huge boost as other Ubuntu phones start to arrive in 2014,” read the company’s Indiegogo posting. “Thousands of you clearly want to own an Ubuntu phone and believe in our vision of convergence, and rest assured you won’t have much longer to wait.”

mercredi 25 décembre 2013

Get started with Juju!

Ubuntu and Android dual boot developer

Dual boot is not a feature suitable for regular users. It is recommended to be installed only by developers who are comfortable with flashing devices and with their partition layout. Dual boot rewrites the Android recovery partition and those installing it should be intimately familiar with re-flashing it in case something goes wrong.
Multiple Android flavours are supported (AOSP or stock, CyanogenMod) and installation of Ubuntu can be done for all versions available in the phablet-flash channels.
http://developer.ubuntu.com/2013/12/announcing-ubuntu-and-android-dual-boot-developer-preview/ 

mardi 17 décembre 2013

PRESSURES ON THE EUROPEAN PARLIAMENT FOR THE ADOPTION OF OPEN SOURCE SOFTWARE

Parliamentary Group of the Greens / European Free Alliance strongly urges the European Parliament to use open source solutions and free. He claims a rule that requires the institution transparency in its activities.

The Group of the Greens / European Free Alliance wrote to the President of the European Parliament, Martin Schulz, a letter published Friday, November 29 urging him to make use of free software and open standards under Rule 103 (from "Rules of procedure "of the institution ) , which indicates that it must " ensure that its activities are conducted in full transparency . "

In response to this long-standing request , the European Parliament has repeatedly requested an analysis showing the relationship between Rule 103 and the use of open source software and open standards. In his letter, the group therefore refers to a study it commissioned last summer at Dutch firm Mitopics board to " understand how [ they ] may contribute to Parliament's efforts in this area ." The study , delivered on October 31 , emits strong criticism against the answers given by DG ITEC Department, Informatics Parliament , repeated applications of the parliamentary group .

The study explains that " the report of the IT department does not provide a full and complete response ": it does not provide a description of the systems , architecture and IT planning , nor its dependence à-vis proprietary standards . In addition , issues of development and acquisition , but also use of free software, remain obscure .

If Rule 103 does not seem to compel Parliament to directly adopt open source software and open standards, the study Mitopics indicates that this rule requires the IT department to "examine all processes, policies and organizational , and watch the flow of information , computer systems , their formats and processes . " This rule , according Mitopics requires an inventory of the systems used by the institution , taking into account their "authenticity , integrity and confidentiality ." According to the consulting firm , if the analysis requested by the Greens and European Free Alliance was made, it would indicate that the principles of transparency Rule 103 shall apply to the flow of information, software and electronic document formats used by Parliament. This study and issue recommendations stating " the extent to which use of free and open source solutions and open standards is essential to meet these principles."

lundi 16 décembre 2013

Linux is too complicated, it is for professional !

Say that there are people who believe that!

... How does it ... this is what you believe too? o_O
Stop there, unhappy! Do not make a step further, you're wrong!

Linux is not complicated, and I'll prove it.
You do not know what Linux? It does not matter, this is a course for beginners: the explanations start from the first chapter!

Who is this course?


Windows users who want to discover Linux

Linux for beginners looking to better manage their OS

Webmasters who must administer a dedicated server on Linux

Curious like you just wonder how Linux works;)

With Linux, you can now take control of your computer and discover an exciting new world, all without spending a penny! :)

For french reader follow http://fr.openclassrooms.com/informatique/cours/reprenez-le-controle-a-l-aide-de-linux

for english wiat some days I will piblish this course on http://cours.cofares.net

samedi 9 novembre 2013

PKI Implementation for the Linux Admin

http://www.linux.com/community/blogs/133-general-linux/742528-pki-implementation-for-the-linux-admin


Posted via Blogaway

Are Racks-on-Chip the Future of Data Centers?

UCSD News (CA) (11/04/13) Doug Ramsey 

Increasing the scale and decreasing the cost and power of data centers requires greatly boosting the density of computing, storage, and networking within those centers, according to University of California, San Diego researchers. The researchers say that one promising avenue to deliver increased density involves racks on a chip, or devices that would contain many individual computer processing cores integrated with sufficient network capability to fully utilize those cores by supporting massive amounts of data transfer into and out of them. However, to shrink data centers down to the size of a chip, a new data center network design is needed. "These integrated racks-on-chip will be networked, internally and externally, with both optical circuit switching [to support large flows of data] and electronic packet switching [to support high-priority data flows]," the researchers note. Each processor in the rack-on-chip design must have a transceiver, which converts the electrical signals in the processing core with the optical photons that travel through fiber-optic cables. "Once this optical networking technology is integrated with electronic processors as a rack-on-chip design, the number of such chips can then be scaled up to meet the needs of future data centers," the researchers report.

jeudi 7 novembre 2013

Richard Stallman's personal site.

http://stallman.org


How he do his computing

  • I use a Lemote machine which has a free initialization program and a free operating system. One other advantage of this machine is that Windows has never supported it.
    Before that, I used an OLPC for some weeks. I stopped because the OLPC project decided to make their machine support Windows, so I did not want to appear to endorse it. The OLPC uses a nonfree firmware blob for the WiFi, so I could not use the internal WiFi device. No big problem, I used an external one.
    The results I worried about, millions of children running Windows on the OLPC, have not occurred. Instead we see millions of children running Windows on the Intel Classmate.
    Before that I used machines that ran completely free GNU/Linux systems but had nonfree BIOSes. I tried for about 8 years to find a way to avoid the nonfree BIOS.
  • I do not have a preferred GNU/Linux distro. I recommend all the ethical distros — namely, those that are 100% free software.
    I've chosen not to have any preferences among those ethical distros. But I am not in a position to judge them on other criteria: even to try them all would be a lot work that I have no need to do.
  • I occasionally use X11 for tasks that need graphics, but mostly I use a text console. I find that the text console is more efficient and convenient for the bulk of the work I do, which is editing text.
  • I spend most of my time editing in Emacs. I read and send mail with Emacs using M-x rmail and C-x m. I have no experience with any other email client programs. In principle I would be glad to know about other free email clients, but learning about them is not a priority for me and I don't have time.

  • I edit the pages on this site with Emacs also, although volunteer helpers install the political notes and urgent notes. I have no experience with other ways of maintaining web sites. In principle I would be glad to know about other ways, but learning about them is not a priority for me and I don't have time.
  • This site is maintained in a very simple way. I edit the pages such as this one manually as HTML. I only know simple HTML; others who know more wrote the parts at the top and bottom of pages, and the more complex formatting on the home page. Volunteer helpers install the political notes every day after receiving the text from me by email. A cron job "rolls over" the political notes page every two months.
  • I never used Unix (not even for a minute) until after I decided to develop a free replacement for it (the GNU system). I chose that design to follow because it was portable and seemed fairly clean. I was never a fan of Unix; I had some criticisms of it too. But it was ok overall as a model.
  • Why I coined the name POSIX.
  • I have used the Internet since it first existed. I never used UUCP, though occasionally I sent emails to addresses that involved transmission via UUCP. However, I am careful in how I use the Internet.
  • I generally do not connect to web sites from my own machine, aside from a few sites I have some special relationship with. I fetch web pages from other sites by sending mail to a program (see git://git.gnu.org/womb/hacks.git) that fetches them, much like wget, and then mails them back to me. Then I look at them using a web browser, unless it is easy to see the text in the HTML page directly. I usually try lynx first, then a graphical browser if the page needs it.
    I also browse from other people's computers, with their permission. Since I don't identify myself to the sites I visit, this browsing can't be connected with me.
    One consequence of this method is that most of the survellance methods used on the Internet can't see me.
    Another consequence is that I never pay for anything on the Web. Anything on the net that requires payment, I don't do.
    I would not mind paying for a copy of an e-book or music recording on the Internet if I could do so anonymously, and it were ethical in other ways (no DRM or EULA). But that option almost never exists. I keep looking for ways to make it happen.

  • The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will understand what is lacking in most other languages.
    When you start a Lisp system, it enters a read-eval-print loop. Most other languages have nothing comparable to `read', nothing comparable to `eval', and nothing comparable to `print'. What gaping deficiencies!
    Lisp is no harder to understand than other languages. So if you have never learned to program, and you want to start, start with Lisp. If you learn to edit with Emacs, you can learn Lisp by writing editing commands for Emacs. You can use the Introduction to Programming in Emacs Lisp to learn with: it is free as in freedom, and you can order printed copies from the FSF.
    Please don't buy books (or anything) from Amazon!
  • My favorite programming languages are Lisp and C. However, since around 1992 I have worked mainly on free software activism, which means I am too busy to do much programming. Around 2008 I stopped doing programming projects. As a result, I have not had time or occasion to learn newer languages such as Perl, Python, PHP or Ruby.
    I read a book about Java, and found it an elegant further development from C. But I have never used it. I did write some code in Java once, but the code was in C and Lisp (I simply happened to be in Java at the time).
    By contrast, I find C++ quite ugly.
    I skimmed documentation of Python after people told me it was fundamentally similar to Lisp. My conclusion is that that is not so. `read', `eval', and `print' are all missing in Python.
  • I firmly refuse to install non-free software or tolerate its installed presence on my computer or on computers set up for me.
    However, if I am visiting somewhere and the machines available nearby happen to contain non-free software, through no doing of mine, I don't refuse to touch them. I will use them briefly for tasks such as browsing. This limited usage doesn't give my assent to the software's license, or make me responsible its being present in the computer, or make me the possessor of a copy of it, so I don't see an ethical obligation to refrain from this. Of course, I explain to the local people why they should migrate the machines to free software, but I don't push them hard, because annoying them is not the way to convince them.
    Likewise, I don't need to worry about what software is in a kiosk, pay phone, or ATM that I am using. I hope their owners migrate them to free software, for their sake, but there's no need for me to refuse to touch them until then. (I do consider what those machines and their owners might do with my personal data, but that's a different issue, which would arise just the same even if they did use free software. My response to that issue is to minimize those activities which give them any data about me.)
    That reasoning is based on the fact that I was not responsible for setting up those machines, or for how that was done. By contrast, if I were to ask or lead someone to set up a computer for me to use, that would make me ethically responsible for its software load. In such a case I insist on free software, just as if the machine were mine.
    As for microwave ovens and other appliances, if updating software is not a normal part of use of the device, then it is not a computer. In that case, I think the user need not take cognizance of whether the device contains a processor and software, or is built some other way. However, if it has an "update firmware" button, that means installing software is a normal part of use, so it is a computer.
    Skype (or any nonfree noninteroperable communication program) is a special case. Using Skype to talk with someone else who is using Skype is encouraging the other to use nonfree software. So I won't use it under any circumstances.
    Streaming media dis-services such as Netflix and Spotify are another special case. They require nonfree client programs in order to impose Digital Restrictions Management (DRM ). We should never use DRM that we can't break, and I don't know how to break the DRM of these streaming systems, so I refuse to use them under any circumstances.
  • I sometimes use Google's search engine, and I sometimes use DuckDuckGo. When I use a search engine, it is always from a machine that isn't mine and that other people also use. I never identify myself to the site, of course.
  • I do not use social networking sites. They are inherently inconvenient for me. That doesn't mean I think they are all unethical. Some are, some are not. Social networking sites raise their own set of ethical issues, completely different from the ethical issues of distributing software (free vs proprietary).
    I have a Twitter account called rmspostcomments, which I use to log in on other sites to post comments on articles. I never post on Twitter. Someone made an account stallman_feed which I'm told posts something about my political notes. Any other Twitter account that claims to be mine is an impostor.
    The rms account on identi.ca repeats the political notes from this site, but I do not post on it directly.
    Aside from those two, any account on a social networking site that says it is mine is an impostor.
    I do not post on 4chan. I have nothing against it, and I have occasionally answered questions for interviews for 4chan, but any account there that says it is me is an impostor.
    I reject Facebook and Google+ on principle because they require people to give their "real names". I am proud to identify myself when stating my views; I can afford to do that because I am in a fairly safe position. There are people who rationally fear reprisals (from employers, gangsters, bullies, or the state) if they state their views. For their sake, let's reject any social networking site which insists on being told a user's real name.

    Google+ offers to hide the user's real name, but demands people prove an "established identity" or provide ID. I am suspicious of this requirement, since it can't hide the user's real name from the US government, which has a policy of prosecuting journalists as "spies".
    Of course, Facebook is bad for many other reasons as well. Google+ also has another problem: the site requires running nonfree JavaScript code in order to post a message.
    Some impostor created a Faceook account using my name. The page is not mine. The Google+ account using my name is also not mine.
  • People sometimes ask me to recommend an email service. The two ethical issues for an email service are (1) whether you can use it without running any nonfree software (including nonfree Javascript code from the site), and (2) whether it respects your privacy.
    For issue 1, see the FSF's page. On issue 2, I have no way to verify that any email service is satisfactory. Therefore, I have no recommendation to offer.
    However, I can suggest that it may be wise to use an email service that is not connected with your search engine. That way you can be almost sure that your email contents don't influence your search results. You shouldn't identify yourself to your search engine in any case.

  • Every product with Digital Restrictions Management (DRM) is an attack on your freedom.
    Therefore, one should not buy or tolerate any product with DRM handcuffs unless one personally possesses the means to break the handcuffs. For instance, don't use encrypted DVDs unless you have DeCSS or another comparable free program. And never use a Bluray disk unless you find a way to break its handcuffs. Don't use the Amazon Swindle or other e-book readers that trample readers' freedoms. Don't use music or video streaming "services" that impose DRM. (If they require a nonfree client program, it is probably for DRM or some sort of surveillance of users.)


Return to Richard Stallman's home page.

mardi 3 septembre 2013

Linux today

3 Secrets for Exceptional Web Application Performance
Download this article to learn the 3 secrets to assure predictable web application performance, and why a new approach can help your organization deliver exceptional application service and end-user experience. Click Here >>

GNOME Web To Abandon Google Search
Phoronix: The GNOME Web Browser will no longer be using Google as its default search engine but they have struck a deal to use DuckDuckGo as its new search engine. Read more >>
5 Things to Know About Salt Cloud Management
Linux.com: You will be forgiven if you haven't heard of the Salt project. Read more >>
22 Years Later, The Linux And Open Source "Cancer" Is Wonderfully Benign
readwrite: Linux just turned 22 and the open source revolution it sparked is just getting started, two experts suggest Read more >>
Kevin Mitnick Details Modern IT Threats
eWEEK: video: One of the most infamous hackers of all time talks about Website security and what users should do to protect themselves. Read more >>
Will Firefox OS beat Ubuntu in smartphone sales?
ITworld: I can't say I'm surprised the first shipment of Firefox phones sold out. Read more >>

+Pascal Fares 

"Linux LPIC 101 – Free 15-Minute Guide"

Free Guide to Linux LPIC 101 – Free 15-Minute Guide. PrepLogic's LPIC1 Exam 101 Mega Guide vividly details the topics and domains you're expected to know for your 

lundi 2 septembre 2013

Configuring Apache 2 on Debian, Ubuntu

The Debian distribution of Linux includes the Apache web server, both the venerable version 1 and the more modern version 2. The Debian maintainers have a peculiar way of arranging the configuration files for Apache 2.0 which is not documented in the standard Apache documentation. This introduction should help you get acclimated to the Debian way of configuring Apache 2.0.

Active Configuration Files

# /etc/apache2/apache2.conf - pulls in additional
# configurations in this order:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
Include /etc/apache2/conf.d/[^.#]*
Include /etc/apache2/sites-enabled/[^.#]*
Debian stores its Apache 2.0 configuration files in the directory /etc/apache2. Normally the main Apache configuration file is called httpd.conf. Although that file exists on Debian, it is only there for compatibility with other software that expects it to exist. The real configuration starts with the file apache2.conf. You can still add configuration statements to httpd.conf, as apache2.conf includes it, but you would do well to ignore that fact. Your hand-edited changes should go elsewhere (see below).
Debian adds another configuration file, ports.conf, which contains the Listendirectives telling the Apache server what IP address and port to listen to (Apache 2 no longer uses the Port directive.) I’m not sure why the maintainers decided to break this out into a separate file.
The best place to put your own custom configurations is in the conf.d directory. Files in this directory are included as part of the “global” server configuration and will apply to all virtual hosts (see below). For example, if all the sites on your server use the Yahoo User Interface libraries, you might store one copy of the libraries in a central location that can be shared across all sites, and create a file /etc/apache2/conf.d/yui.conf with an Alias directive to map it to the same URL space for all sites.

Apache Modules

# Files related to Apache modules
/etc/apache2/mods-enabled/*.load
/etc/apache2/mods-enabled/*.conf
/etc/apache2/mods-available/*.load
/etc/apache2/mods-available/*.conf
/usr/sbin/a2enmod
/usr/sbin/a2dismod
One of the great advantages of the Apache web server is its modular architecture. You can add or remove functionality as dictated by your requirements. In the default Apache build, you would find a section near the top of your httpd.conf file with instructions to load each module. Later in the file, you would find configuration sections specific to each module, possibly wrapped in a<IfModule> directive. This arrangement can be tricky from the perspective of a system administrator who may need to install or uninstall various Apache modules. Identifying the configuration changes that are required by a module or that require a specific module can be difficult to do by hand and even harder to automate with a script.
To make things easier on the server administrator, Debian takes advantage of the fact that Apache configuration files may contain an Include directive which pulls in additional configuration files. Debian creates two non-standard directories: /etc/apache2/mods-enabled and /etc/apache2/mods-available. Whenever you install an Apache module from a Debian package, the module will drop one or two files into the mods-available directory. The mandatory ${module}.loadcontains the Apache Load directive to load the module into your web server. The optional ${module}.conf file contains additional configuration directives necessary for the operation of the module.
Installing a module from a Debian package makes it available to your server, but does not (necessarily) automatically activate the module in your server. To activate the module, use the a2enmod command:
a2enmod ${module}
/etc/init.d/apache2 force-reload
The a2enmod command will create symbolic links in the mods-enabled directory pointing to your ${module}.load and, if it exists, ${module}.conf. To force a running Apache to re-read its configuration files and thus load the module, you must then send it the force-reload signal.
Likewise, to disable a module:
a2dismod ${module}
/etc/init.d/apache2 force-reload
Issue either command without a module argument and it will print a list of appropriate module names.
You can, of course, manually manage the symbolic links in the mods-enableddirectory, but it is safer and easier to use the provided scripts.

Virtual Hosts

# Files related to Apache virtual hosts
/etc/apache2/sites-enabled/[^.#]*
/etc/apache2/sites-available/*
/usr/sbin/a2ensite
/usr/sbin/a2dissite
Virtual Host is just a web site served by your Apache server. Virtual hosts are managed just like modules. Each site gets its own configuration file that contains all the Apache directives that pertain only to that site. These files (or symbolic links to them) should be placed in the sites-available directory. There are no strict naming requirements for these files (files beginning with . or # will be ignored), but for convenience you should name each site configuration file to match the domain name it is serving. There is no need to add a “conf” extension. For example, the vhost file used for this web site is namedwww.control-escape.com.
To activate any of these sites, use the a2ensite command, which operates identically to the a2enmod command mentioned above. There is a respectivea2dissite command for disabling a site.
Even if you only run one web site on your server, Apache is still configured to have one virtual host, the Default Virtual Host. The default virtual host is treated specially by the a2ensite script. If you look in your sites-enabled directory you will find that the link has been named 000-default. The number is prepended to the name by the a2ensite script to ensure that the default virtual host is the first one included by Apache (which sorts the files alphabetically). If you want other sites to be loaded in a particular order other than alphabetical, you can rename the links here, but you should always ensure that the default virtual host is the first one loaded.

Conclusion and Resources

Although Debian’s configuration setup for Apache 2 is non-standard, it is still fairly easy to understand, and it provides tools that make life easier for the administrators of web servers that change often or serve multiple web sites. For additional help, view the Debian README file at /etc/apache2/README. For general information on configuring Apache, try these resources.
To learn more about Debian GNU/Linux, visit Debian.org.
To learn more about Ubuntu, visit Ubuntu.com, or buy a copy of The Official Ubuntu Book

lundi 26 août 2013

Today, in 1991, Linus Torvalds sent that 'famous' email




Posted: 25 Aug 2013 07:44 PM PDT
It was August 25, 1991 when some Linus Benedict Torvalds sent an email introducing the world to some 'tiny' project he was working on.

Posted: 25 Aug 2013 03:27 PM PDT
Google has pushed an update for ChromeCast which has broken support for 3rd party apps like AirCast (AllCast) which allow users to 'stream' local files from their devices to ChromeCast connected TV sets.

dimanche 25 août 2013

Google patents Location based security for Android




Posted: 24 Aug 2013 07:26 AM PDT
In a new patent filed by Google for Android, aims to have security features which adapt according to your location.

vendredi 23 août 2013

Chrome for Android getting more gesture controls




Posted: 22 Aug 2013 02:41 PM PDT
Google just announced that they are bringing more gesture based control to the Chrome for Android.

Posted: 22 Aug 2013 07:28 AM PDT
Motorola unveiled the Moto X flagship phone few weeks ago and among many innovative new features, one was touchless voice control. DROID line of devices are also the lucky ones to get the feature. However, to much surprise motorola has released the app on google playstore today.

jeudi 22 août 2013

Firefox gets biggest design changes for Android


Posted: 21 Aug 2013 04:05 PM PDT
The open source browser Firefox is getting the biggest UI changes for its Android browser.

mercredi 21 août 2013

Groklaw shutting down due to government surveillance

Groklaw shutting down due to government surveillance


Groklaw shutting down due to government surveillance

Posted: 20 Aug 2013 01:27 PM PDT

The award-winning and much respectable website Groklaw which covers legal news around free and open source software and provides critical information in complex cases is shutting down.

Chromecast Review: running it from openSUSE

Posted: 20 Aug 2013 05:20 AM PDT

I ordered my Chromecast the day it was announced, like any other Google device. Though the delivery date said 8th August, Google surprised me as it arrived on 31sth of July. What I forgot was that I just moved to the US and all of my stuff was still in the shipment. In a nutshell, I did not have any HDMI-enabled TV or monitor to test it. Yesterday my stuff arrived an I set-up my Chromecast.

Setting it up

mardi 20 août 2013

Google to charge advertisers "pay per gaze" with Google glass.

Google to charge advertisers "pay per gaze" with Google glass.


Google to charge advertisers "pay per gaze" with Google glass.

Posted: 19 Aug 2013 12:36 AM PDT

A recent patent filing released by USPTO hints that Google Glass' eye tracker system could be used to charge advertisers on "pay per gaze" model.

lundi 19 août 2013

Sony Honami Mini Codenamed Ray 3 leaked

Sony Honami Mini Codenamed Ray 3 leaked


Sony Honami Mini Codenamed Ray 3 leaked

Posted: 18 Aug 2013 11:22 PM PDT

It started with Samsung Galaxy S3 and S4 Mini, followed by HTC One Mini, then came along Motorola Droid Mini and already hinted Moto X Mini, now we have leaked information about Sony Honami Mini codenamed Ray 3.

Chromecast: Bringing Ubuntu's convergence closer to reality?

Posted: 18 Aug 2013 09:21 PM PDT

This $35 device, Chromecast, is turning out to be much more than what Google showed or told us. Not only does it turn your HDTV into external monitor for your Chrome tabs, it can also play local content such as videos, images and music via Chrome.

Linux 3.11-rc6 Out, 3.7-rc7 Planned To Celebrate 22 Years Of Linux

Posted: 18 Aug 2013 09:08 PM PDT

Linus Torvalds has released a new release candidate for the Linux 3.11 and is planning to push the next release candidate with the 22nd anniversary of Linux.

Half-Life 2 Mod Estranged Is Coming To Linux

Posted: 18 Aug 2013 09:02 PM PDT

Estranged is a critically acclaimed Half-Life 2 mod that tells the story of a lone fisherman whose ship is stranded on a mysterious island during a violent storm. This mod is currently being ported to Linux.