Today I did a presentation in my company to try to convince my fellows to use git like me for their source code management stuff even though we use subversion in the company. Since you end up here because you wanted more information about git, here you go for the actual presentation
Git, Fast and Distributed Source Code Management
•March 6, 2009 • Leave a CommentSetting Up Apache2 with SSL on Ubuntu Intrepid 8.10 using OpenSSL
•March 4, 2009 • 10 CommentsThis guide will help you setup SSL with apache2. This assumes you have already installed the default lamp stack in Ubuntu Intrepid.
In order to make sure we have the necessary packages in place, open your terminal and type :
sudo apt-get install apache2 apache2.2-common apache2-utils openssl openssl-blacklist openssl-blacklist-extra
To set up your secure server, use public key cryptography to create a public and private key pair. In most cases, you send your certificate request (including your public key), proof of your company’s identity, and payment to a Certificate Authority (CA). The CA verifies the certificate request and your identity, and then sends back a certificate for your secure server.
Alternatively, you can create your own self-signed certificate. Note, however, that self-signed certificates should not be used in most production environments. Self-signed certificates are not automatically accepted by a user’s browser. Users are prompted by the browser to accept the certificate and create the secure connection.
Once you have a self-signed certificate or a signed certificate from the CA of your choice, you need to install it on your secure server.
Whether you are getting a certificate from a CA or generating your own self-signed certificate, the first step is to generate a key.
Generating a Certificate Signing Request (CSR)
To generate the Certificate Signing Request (CSR), you should create your own key. You can run the following command from a terminal prompt to create the key:
openssl genrsa -des3 -out server.key 4096
You can also run your secure web server without a passphrase. This is convenient because you will not need to enter the passphrase every time you start your secure web server. But it is highly insecure and a compromise of the key means a compromise of the server as well.
In any case, you can choose to run your secure web server without a passphrase by leaving out the -des3 switch in the generation phase or by issuing the following command at a terminal prompt:
openssl rsa -in server.key -out server.key.insecure>
You can use this file to generate the CSR without passphrase.
Then create a certificate signing request with it. This command will prompt for a series of things (Country Name, State or Province Name, Locality Name, Organization Name, Organizational Unit Name, Common Name, Email Address, A Challenge password, An Optional Company Name ). Think carefully when inputting a Common Name (CN) as you generate the .csr file below. This should match the DNS name, or the IP address you specify in your Apache configuration. If they don’t match, client browsers will get a “domain mismatch” message when going to your https web server.
The default values for the questions ([AU], Internet Widgits Pty Ltd, etc.) are stored here: /etc/ssl/openssl.cnf. So if you’ve got a large number of certificate signing requests to process you probably want to carefully edit that file where appropriate. Otherwise, to create the CSR, run the following command at a terminal prompt:
openssl req -new -key server.key -out server.csr
You can submit this CSR file to a CA for processing. The CAN will use this CSR file and issue the certificate. On the other hand, you can create self-signed certificate using this CSR.
Creating a Self-Signed Certificate
Now sign the certificate signing request. This example lasts 365 days. Run the following command at a terminal prompt:
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
The above command will prompt you to enter the passphrase (if using the secure key). Once you enter the correct passphrase, your certificate will be created and it will be stored in the server.crt file.
Installing the Certificate
Copy the server.crt and server.key files into position.
sudo mkdir /etc/apache2/ssl/
sudo cp server.crt /etc/apache2/ssl/
sudo cp server.key /etc/apache2/ssl/
Enable the SSL module for Apache2
open your terminal and type :
sudo a2enmod ssl
Create and enable the SSL site
First we need to create a virtualhost for our site by copying the default skeleton:
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/www.salimane.com
Then edit the content to look like the following :
sudo gedit /etc/apache2/sites-available/www.salimane.com
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName www.salimane.com
LogLevel warn
ErrorLog /var/log/apache2/www.salimane.com.error.log
CustomLog /var/log/apache2/www.salimane.com.access.log combined
DocumentRoot /var/www/www.salimane.com/
<Directory /var/www/www.salimane.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>
Now enable the site by typing :
sudo a2ensite www.salimane.com
Instruct Apache to listen to 443
we have to edit apache ports configuration file located at /etc/apache2/ports.conf :
sudo gedit /etc/apache2/ports.conf
By default it looks like :
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>
we have to add the https NameVirtualHost. So edit it to look like :
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
NameVirtualHost *:443
Listen 443
</IfModule>
Don’t forget to edit your /etc/hosts file if you’re running on your local box with www.salimane.com pointing to 127.0.0.1
Now you should restart the server. If you used a key with a passphrase , you will be prompted to enter the passphrase every time you want to restart the server. Once you enter the correct passphrase, the secure web server will be started.
sudo /etc/init.d/apache2 restart
Accessing the Server
You can access the secure server pages by typing https://www.salimane.com in your browser address bar. If you use a self- signed certificate , you will be greeted with “Secure Connection Failed” on firefox. Just ignore that and click “Or you can add an exception…” then “Add Exception…”
APC, an Open Source PHP opcode Cache on Ubuntu Intrepid 8.10 using PECL and APT
•February 23, 2009 • 10 CommentsPHP is interpreted, PHP code is parsed and translated to opcodes (primitive instructions — akin to assembly language — that the PHP engine executes directly) every time it executes. An opcode cache eliminates that rework, making PHP applications faster.
Of course, an opcode cache will not help your site if your bottleneck in not CPU or memory. For example, if your bottleneck is in the database, or disk, the opcode cache will not directly help. However, since scripts start and end faster than without one, you may experience less contention in some cases.
Among available free opcode caches, we have :
-
APC: Alternative PHP Cache. A free opcode cache maintained by PHP code developers.
-
eAccelerator, a free fork of the now abandoned Turck MMCache.
-
XCache. A free project by lighttpd.
With several servers running Ubuntu 8.04.01 LTS, Apache 2.2.8 and PHP 5.2.4 I have found that neither eAccelerator nor XCache are stable. In a matter of a day or so, you will get segmentation faults in Apache 2. Well you can watch the segmentation faults in apache error log and put the server back on when that happens . But it’s kind of a pain , so I went for APC . On the contrary, APC — currently using 3.0.19 — is very stable and never experiences segmentation faults.
APC is maintained by core PHP developers, including Rasmus Lerdorf and others. APC does not utilize a disk cache, unlike both eAccelerator and Xcache (although it is configurable). Xcache is a viable option, specially if you find installing APC daunting.
But it’s important to note that APC can perform poorly if you don’t give it enough memory to cache all of the code that your site uses. So, changing APC to use 64 MB of shared memory instead of the default 30 MB should be all right. APC uses this memory to cache the parsed and tokenized scripts for later calls.
Now let’s install APC . This assumes you’ve already installed the default LAMP Stack in Ubuntu.
Open a terminal and type :
sudo apt-get install php-pear php5-dev apache2-prefork-dev build-essential && sudo pecl install apc && sudo apt-get remove php5-dev apache2-prefork-dev
Now let’s edit the configuration file of apc. On your command prompt type :
gksudo gedit /etc/php5/conf.d/apc.ini
add these settings to the file :
extension=apc.so apc.apc.stat = 0 apc.include_once_override = 1 apc.shm_size = 64
and restart apache 2 :
sudo /etc/init.d/apache2 restart
Now, let’s test an application. Choose an application or two to test. You can use your own code . I used phpMyAdmin for the sample. I assume you’ve already installed phpMyAdmin.
Running a benchmark
The Apache HTTP Web server ships with a utility named ab, short for Apache HTTP server benchmarking tool. Use ab to automate a large number of requests for PHP pages.
The ab utility is simple to use: Provide a repeat count and a URL. The ab utility requests that URL many times over and returns statistics. Because APC is already enabled, the first benchmark will show performance with acceleration.
Before you run ab, point your browser to http://localhost/phpmyadmin/. Visiting this page once loads all the PHP code used to render the page into the cache. Now, run the benchmark shown below, iterating 100,000 times.
ab -n 100000 http://localhost/phpmyadmin/
Here is part of the output on my local :
Time taken for tests: 25.857 seconds Complete requests: 100000 Failed requests: 0 Write errors: 0 Non-2xx responses: 100000 Total transferred: 64000000 bytes HTML transferred: 35000000 bytes Requests per second: 3867.47 [#/sec] (mean) Time per request: 0.259 [ms] (mean) Time per request: 0.259 [ms] (mean, across all concurrent requests) Transfer rate: 2417.17 [Kbytes/sec] received
The statistics of interest are requests per second and the total time to complete all the tests. For the former, a higher value is better; for the latter, lower is better.
Now, disable APC by editing the apc.ini file :
gksudo gedit /etc/php5/conf.d/apc.ini
comment out all the lines :
;extension=apc.so ;apc.apc.stat = 0 ;apc.include_once_override = 1 ;apc.shm_size = 64
and restart apache 2 :
sudo /etc/init.d/apache2 restart
Now run the benchmarch again :
ab -n 100000 http://localhost/phpmyadmin/
here is the output on my local :
Concurrency Level: 1 Time taken for tests: 26.579 seconds Complete requests: 100000 Failed requests: 0 Write errors: 0 Non-2xx responses: 100000 Total transferred: 64000000 bytes HTML transferred: 35000000 bytes Requests per second: 3762.32 [#/sec] (mean) Time per request: 0.266 [ms] (mean) Time per request: 0.266 [ms] (mean, across all concurrent requests) Transfer rate: 2351.45 [Kbytes/sec] received
Here, with APC disabled, the number of requests per second fell, reflecting that the Apache server took longer for each request. The time to run the entire suite of tests climbed, as well.
Although this is a simple benchmark — the phpMyAdmin connection to the database could have been disabled to limit processing time to interpreting PHP alone — and not highly scientific, it does demonstrate what you can achieve with APC. For a tiny investment (and, thankfully, no need to recompile PHP or Apache), APC can yield a relatively large return. The more complex your code, the greater the possible benefits.
Master-Slave MySQL 5.0 Replication On Ubuntu Intrepid 8.10
•February 20, 2009 • 9 CommentsReplication enables data from one MySQL database server (called the master) to be replicated to one or more MySQL database servers (slaves). Replication is asynchronous – your replication slaves do not need to be connected permanently to receive updates from the master, which means that updates can occur over long-distance connections and even temporary solutions such as a dial-up service. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database. This is not a backup policy because an accidentally issued DELETE command will also be carried out on the slave; but replication can help protect against hardware failures though. This setup is for linux boxes since that’s the only boxes I know how to use
.
Pre Requisites
Master Server
- OS : Ubuntu Intrepid (but will work for any other linux box without or with a slight of changes)
- MySQL server installed
- Database to be replicated on server
Slave Server
- OS : Ubuntu Intrepid (but will work for any other linux box without or with a slight of changes)
- MySQL server installed
- No replicated database on server
1 Database Transfer
Make a dump of the database to be replicated on the master
time mysqldump -u root -p –-host=localhost --opt salimane_db > /home/salimane/backup/salimane_db_dump.sql
Now transfer this file to your slave server! . You can use scp or any other means. Then on the Slave Server, create a new database (replace salimane_db of course):
mysqladmin -u root -p create salimane_db;
then load the dump file on the slave server
time mysql -u root -p --database=salimane_db < /path/to/file/on/slave/salimane_db_dump.sql
2 Configure The Master
First we have to edit the master mysql configuration /etc/mysql/my.cnf.
gksudo gedit /etc/mysql/my.cnf
We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):
#skip-networking
#bind-address = 127.0.0.1
For replication to work, you must enable binary logging on the master. If binary logging is not enabled, replication will not be possible as it is the binary log that is used to exchange data between the master and slaves. Add to your my.cnf, located at /etc/mysql/my.cnf in the default lamp stack in Ubuntu, in the [mysqld] block replacing “salimane_db” with you related database (don’t put it at the end of the file) :
# Replication Block
log-bin = /var/lib/mysql/master-bin.log
log-bin-index = /var/lib/mysql/master-bin.index.log
binlog-do-db = salimane_db
server-id = 1
Note
For the greatest possible durability and consistency in a replication setup using InnoDB with transactions, you should also add :
innodb_flush_log_at_trx_commit=1
sync_binlog=1
Then we restart MySQL:
sudo /etc/init.d/mysql restart
Then we need to create a user on the Master Server that the Slave Server will connect as with replication privileges. So still on the Master Server:
mysql -u root -p
Now on the MySQL shell, type (Replace mysql_slave_user with your settings) :
GRANT REPLICATION SLAVE ON *.* TO 'mysql_slave_user'@'%' IDENTIFIED BY 'mysql_slave_user';
Then to refresh the privileges, type:
FLUSH PRIVILEGES;
Next (still on the MySQL shell) do this:
USE salimane_db;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
The last command will show something like this:
mysql> show master status;
+-------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+-------------------+----------+--------------+------------------+
| master-bin.000002 | 98 | salimane_db | |
+-------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
Write down this information, we will need it later on the slave!
2 Configure The Slave
Now we have to tell MySQL on the slave that it is the slave, that the master is 123.456.78.90, and that the Master database to watch is salimane_db. Therefore, we add the following lines to /etc/mysql/my.cnf :
# Replication Settings
read-only
server-id=2
master-connect-retry=60
replicate-do-db=salimane_db
Then we restart MySQL:
/etc/init.d/mysql restart
Now log on the Slave mysql shell :
mysql -u root -p
Next , type :
stop slave;
In the next command (still on the Slave MySQL shell) , you have to replace the values appropriately:
CHANGE MASTER TO MASTER_HOST=''123.456.78.90', MASTER_USER='mysql_slave_user', MASTER_PASSWORD='mysql_slave_user', MASTER_LOG_FILE='master-bin.000002', MASTER_LOG_POS=98;
Now let’s explain a bit :
- MASTER_HOST is the IP address or hostname of the master (in this example it is 123.456.78.90).
- MASTER_USER is the user we granted replication privileges on the master.
- MASTER_PASSWORD is the password of MASTER_USER on the master.
- MASTER_LOG_FILE is the file MySQL gave back when you ran SHOW MASTER STATUS; on the master.
- MASTER_LOG_POS is the position MySQL gave back when you ran SHOW MASTER STATUS; on the master.
Now all that is left to do is start the slave. Still on the MySQL shell we run :
start slave;
That’s it! Now whenever salimane_db is updated on the master, all changes will be replicated to salimane_db on the slave. Test it!
Redirect All Users to Access Your Site WITH/WITHOUT ‘www.’ Prefix
•February 12, 2009 • 3 CommentsThe basic idea here is when the user enter salimane.com, they get redirected to www.salimane.com . Some people prefer the opposite. In the default drupal .htaccess you have the following :
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
Let me tell you straight, it doesn’t work . The working solution that i found is to have two virtual hosts :
- http://example.com/
- http://www.example.com/
and the former permanently redirect to the later or vice versa. You can have one apache virtual host configuration that looks like this for the site : salimane.com
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName salimane.com
Redirect permanent / http://www.salimane.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.salimane.com
LogLevel warn
ErrorLog /var/log/apache2/salimane.com.error.log
CustomLog /var/log/apache2/salimane.com.access.log combined
DocumentRoot /var/www/salimane.com/
<Directory /var/www/salimane.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Of course, you have to customise that to your settings.
Update : Another solution is to use CNAME as mentioned by Lukas in the comments. CNAME records are domain name aliases. It can be used to provide access to a web-server using both the standard “www.salimane.com” and “salimane.com”.
This is usually done by creating an A-record for the short name (without www), and a CNAME-record for the www name pointing to the short name. By the way, A CNAME-record should always point to an A-record to avoid circular references.
you can have something like this :
; zone fragment for salimane.com $TTL 2d ; zone default = 2 days or 172800 seconds $ORIGIN salimane.com. .... salimane.com IN A 192.168.0.3 www IN CNAME salimane.com
Installing Xdebug on Ubuntu LAMP Stack Using APT
•February 3, 2009 • Leave a CommentThis assumes you have installed your LAMP stack using APT (the default LAMP stack in Ubuntu not xampp for linux). It has never got easier to install xdebug using APT compared to compiling it from source. If you don’t know what is xdebug, its uses and benefits, check out my post here and here. As opposed to compiling it from source, you just need to do :
sudo apt-get install php5-xdebug php5-dev
The configuration file for xdebug is located at : /etc/php5/conf.d/xdebug.ini
you can check out my post here on configuring xdebug.
then restart apache 2
sudo /etc/init.d/apache2 restart
Installing a LAMP Stack on Ubuntu Using APT
•February 2, 2009 • 8 CommentsThis is to help people set-up and install a LAMP (Linux-Apache-MySQL-PHP) stack in Ubuntu, including Apache 2, PHP 5 and MySQL 5.0. You can actually do it with one line of commands but since that’s not the point, let’s go step by step.
Installing Apache 2
open up the Terminal and then type this line:
sudo apt-get install apache2 apache2-utils
To restart the server
sudo /etc/init.d/apache2 restart
By default when restarting you will get this warning :
apache2: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
You will have to edit the apache configuration located at : /etc/apache2/apache2.conf
gksudo gedit /etc/apache2/apache2.conf
then add
ServerName localhost
to the file and save, restart apache2
Browse to http://localhost , you should see displayed a text message “it works”
By default, your document root folder is located at : /var/www/ . Out of the box, you won’t have write permission to this folder, so first of all we need to change that by changing the ownership of the folder to your user.
At a terminal, do the following (replacing salimane with your login name):
sudo chown -R salimane /var/www
By default, Ubuntu’s Apache 2 will ignore the directives in your .htaccess files. To make .htaccess files work as expected, you need to edit the file /etc/apache2/sites-available/default (sometimes /etc/apache2/sites-available/000-default)
Look for a section that looks like this:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
You need to modify the line containing “AllowOverride None” to read “AllowOverride All”. This tells Apache that it’s okay to allow .htaccess files to over-ride previous directives.
You must reload Apache before this change will have an effect:
sudo /etc/init.d/apache2 reload
Installing MySQL Server
open up the Terminal and then type this line:
sudo apt-get install mysql-server
In order for other computers on your network to view the server you have created, you must first edit the “Bind Address”. Begin by opening up Terminal to edit the MySQL configuration file my.cnf .
gksudo gedit /etc/mysql/my.cnf
remove or comment out the line
bind-address = 127.0.0.1
and restart mysql server with :
sudo /etc/init.d/mysql restart
Installing PHP5
open up the Terminal and then type this line:
sudo apt-get install php5
Installing PHP5 module for apache2
open up the Terminal and then type this line:
sudo apt-get install libapache2-mod-php5
In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this:
sudo /etc/init.d/apache2 restart
To ensure there are no issues with PHP let’s give it a quick test run. In the terminal copy/paste the following line:
echo "<?php phpinfo(); ?>" > /var/www/phpinfo.php
Now open your web browser and type the following into the web address: http://localhost/phpinfo.php
Installing MySQL module for PHP5
open up the Terminal and then type this line:
sudo apt-get install php5-mysql mysql-client
then edit the PHP configuration file php.ini and uncomment the following line by taking out the semicolon (;).
Change this line:
;extension=mysql.so
To look like this:
extension=mysql.so
Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart
Installing PHPMyAdmin
One of the easiest ways to manage your new MySQL database server is to use the graphical tool PHPMyAdmin.
Simply go to your terminal again and enter the following command:
sudo apt-get install phpmyadmin libapache2-mod-auth-mysql
The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing :
gksudo gedit /etc/apache2/apache2.conf
and include the following line:
Include /etc/phpmyadmin/apache.conf
Restart Apache :
sudo /etc/init.d/apache2 restart
Now just point your browser at http://localhost/phpmyadmin/.
Installing some useful modules in PHP
If you have installed xampp for Linux you will see that by default they are already some modules installed for you . But unfortunately for the default lamp stack in Ubuntu it’s not, so let’s install those common used modules in php like gd,pear,curl,memcache,xmlrpc,xsl…
sudo apt-get install php5-dev php5-gd php-pear php5-curl php5-memcache php5-xmlrpc php5-xsl php5-imagick php5-mcrypt php5-mhash
Restart Apache
sudo /etc/init.d/apache2 restart
Ubuntu Pocket Guide, Essential Book to Switch to Ubuntu
•February 2, 2009 • Leave a CommentI felt like it will be very bad not to blog about that book and not to praise it. Because even an ubuntu hacker could learn a thing or two from that awesome book . It covers all the beginner-to-expert knowledge you’ll need to make the move to Ubuntu. You can buy the paper book from Amazon or download it free of charge as a pdf file . A great thanks by the way to the author Keir Thomas for providing this book as free for download.
To Do List After installing Ubuntu 8.10 aka Intrepid Ibex
•January 23, 2009 • 11 CommentsUbuntu is a very complete OS, especially the Intrepid Ibex (8.10). It includes a number of features , applets and Wizards to simplify desktop Linux experience. However because of many licensing restrictions, it does not include out of the box support for popular audio/video codecs and many commercial but good applications. . Also because of the limitation of trying to accommodate all kind of applications on single CD Ubuntu comes with a limited set of applications . That said, there are still some tweaks you can do just after installing it that will make Ubuntu shine like never. I will explain here some things I do just after I have Ubuntu installed.
1 – Expand the Software Repository List
First of all, lets make Ubuntu “see” more packages. Go to the terminal and edit your sources.list with :
sudo gedit /etc/apt/sources.list
Here is the content of my sources.list which I think is quite complete to have all the necessary applications you could ever need. So delete the whole content of your sources list and replace it with the content of mine
Save it. Go to the Terminal and type:
sudo apt-get update && sudo apt-get upgrade
Now all your programs will run on the last version.
2 – Anti-Virus
Windows equivalent : AVG AntiVirus, NAV, TrendMicro, F-Prot, Kaspersky, …
Ubuntu equivalent : Avast
Avast
wget http://files.avast.com/files/linux/avast4workstation_1.3.0-2_i386.deb && sudo dpkg -i avast4workstation_1.3.0-2_i386.deb
Access it through Accessories → avast! Antivirus .
3 – Essential tools for compiling from sources
sudo apt-get install build-essential checkinstall cdbs devscripts dh-make fakeroot libxml-parser-perl check avahi-daemon
4 – Java runtime environment
Java is a very important thing to install, now that many programs like Azureus need it to run. So type:
sudo apt-get install sun-java6-fonts sun-java6-jre sun-java6-plugin equivs ttf-sazanami-gothic ttf-sazanami-mincho
5 – More Fonts
Here you will find a bunch of fonts you can install on your system, but remember that you don’t need to install all of them
sudo mkdir -p /usr/lib/X11/fonts/Type1 && sudo apt-get install msttcorefonts && sudo apt-get install ttf-larabie-straight ttf-larabie-deco mplayer-fonts xfonts-terminus-dos xfonts-terminus xfonts-terminus-oblique xfonts-mona tv-fonts ttf-tuffy ttf-sjfonts ttf-sil-padauk ttf-sil-ezra ttf-paktype ttf-georgewilliams ttf-fifthhorseman-dkg-handwriting ttf-farsiweb ttf-essays1743 ttf-opensymbol ttf-nafees ttf-mgopen ttf-gentium ttf-freefont ttf-dustin ttf-devanagari-fonts ttf-dejavu-extra ttf-dejavu-core ttf-dejavu ttf-bpg-georgian-fonts ttf-bitstream-vera ttf-alee
6 – Ubuntu Control Panel
Ubuntu Tweak
This will allow you to customize system and desktop settings.
sudo apt-get install ubuntu-tweak
Then access it through Applications → System Tools → Ubuntu Tweak
7 – Nice Right Click Sub-Menus
For some useful right click menus in nautilus
sudo apt-get install nautilus-actions nautilus-gksu nautilus-image-converter nautilus-open-terminal nautilus-script-audio-convert nautilus-script-collection-svn nautilus-script-manager nautilus-sendto nautilus-share nautilus-wallpaper
8 – Multimedia
Windows equivalent : windows media player, real player, vlc, mplayer
Ubuntu equivalent : vlc, mplayer, helix player
To have Ubuntu playing all kinds of stuff, you need to install many codecs. So on the Terminal, type:
* Installing vlc and mplayer (plays almost everything):
sudo apt-get install vlc mplayer
* Common packs
sudo apt-get install mpeg2dec a52dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg cdda2wav toolame libmp4v2-0 totem-mozilla libmjpegtools0c2a tagtool easytag id3tool lame nautilus-script-audio-convert mozilla-helix-player helix-player libmad0 libjpeg-progs libmpcdec3 libquicktime1 flac faac faad sox toolame a52dec ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux
* Gstreammer 0.10
sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-fluendo-mpegdemux gstreamer0.10-gnonlin gstreamer0.10-pitfdll gstreamer0.10-plugins-bad gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-schroedinger gstreamer0.10-plugins-ugly-multiverse totem-gstreamer
* More programs
sudo apt-get install gstreamer-dbus-media-service gstreamer-tools
* Enable dvd support
sudo aptitude install libdvdcss2 && sudo /usr/share/doc/libdvdread3/./install-css.sh
* Flash
sudo apt-get install gsfonts gsfonts-x11 flashplugin-nonfree
9. Tweak your eyecandy
Ubuntu 8.10 comes with compiz fusion effects OOTB but doesn’t offer a way to customise them.
In a terminal copy/paste this:
sudo apt-get install simple-ccsm
Now navigate to System → Preferences → Simple CompizConfig Settings Manager .
10 – Missing Windows software?? Run Windows softwares in Linux!!!
Wine
Wine is a compatibility layer for running Windows programs in Linux.
sudo apt-get install wine
Then just double click .exe file.
Note: Not all windows software can run.A list is available in the website.
11 – Play Windows Games in Linux
Install PlayonLinux.Games like world of warcraft ,counterstrike and many other can be played.Playonlinux is based on wine.
Click here for list of games available
sudo apt-get install playonlinux
12 – Clipboard Management
By Default in ubuntu when u copy something from an application and closes the application u will not be able to access it from the clipboard. And also when u copy severals text in serial u only have the last on available to you in the clipboard. To solve that install either of the following but Glipper is better because it supports plugins.
Glipper
sudo apt-get install glipper
Then right click ur panel → Add to Panel then drag Clipboard Manager to ur panel
Parcellite
sudo apt-get install parcellite
13 – Archiver/ Packing software
Windows equivalent : winrar, zip, 7zip
Ubuntu equivalent : tar, unrar, p7zip, arj, unace
It’s bad when you don’t have Internet on your computer/notebook, but you have to pack/unpack something but the file format isn’t recognized by the system. To prevent from this bad situation, you can install a bunch of packing software by typing this on the terminal:
sudo apt-get install unace rar unrar zip unzip p7zip-full p7zip-rar sharutils aish uudeview mpack lha arj cabextract file-roller
14 – Graphical web browser
Windows equivalent : Internet explorer, firefox, opera
Ubuntu equivalent : Firefox, opera
Opera
sudo apt-get install opera
Firefox (installed by default intrepid)
sudo apt-get install firefox
15 – Download Manager
Windows equivalent : Free download manager
Ubuntu equivalent : Multiget
MultiGet is a http/ftp downloader with a nice GUI for linux desktop users. It can run on almost all desktops without any configuration. It has many powerful functions comparing to others.
wget http://mesh.dl.sourceforge.net/sourceforge/multiget/multiget_1.1.2-0getdeb1_i386.deb && sudo dpkg -i multiget_1.1.2-0getdeb1_i386.deb
Access it through Applications → Internet → MultiGet .
16 – Graphical Email client
Windows equivalent : Outlook
Ubuntu equivalent : Evolution, Thunderbird
Evolution (installed by default in intrepid)
sudo apt-get install evolution
Access it through Applications → Internet → Evolution Mail .
Thunderbird
sudo apt-get install thunderbird
Access it through Applications → Internet → Mozilla Thunderbird Mail/News .
17 – Instant Messanging protocal clients
Windows equivalent : MSN messenger, Yahoo messenger, QQ, AIM, Gtalk, ICQ,IRC
Ubuntu equivalent : Pidgin, amsn
Pidgin (installed by default in intrepid)
Pidgin is an easy to use and free chat client used by millions. Connect to AIM, MSN, Yahoo, and more chat networks all at once. Supported chat networks: AIM, Bonjour, Gadu-Gadu, Google Talk, Groupwise, ICQ, IRC, MSN, MySpaceIM, QQ, SILC, SIMPLE, Sametime, XMPP, Yahoo!, Zephyr
sudo apt-get install pidgin pidgin-data pidgin-lastfm pidgin-guifications msn-pecan pidgin-musictracker pidgin-plugin-pack pidgin-themes
Access it through Applications → Internet → Pidgin Internet Messenger .
amsn only for MSN Messenger.
sudo apt-get install amsn amsn-data
Access it through Applications → Internet → aMSN .
18 – VOIP
Windows equivalent : skype
Ubuntu equivalent : skype, ekiga
Skype
sudo apt-get install skype
Access it through Applications → Internet → Skype.
Ekiga (installed by default in intrepid)
sudo apt-get install ekiga
Access it through Applications → Internet → Ekiga SoftPhone.
19 – Viewing PDF files
Windows equivalent : Adobe Reader
Ubuntu equivalent : Adobe Reader
Adobe Reader
sudo apt-get install acroread acroread-plugins acroread-plugin-speech acroread-fonts
Access it through Applications → Office → Adobe Reader.
20 – Music / MP3 / OGG Players
Windows equivalent : iTunes, Winamp
Ubuntu equivalent : Rhythmbox, Amarok
Rhythmbox
sudo apt-get install rhythmbox
Access it through Applications → Sound & Video → Rhythmbox Music Player.
Amarok
sudo apt-get install amarok amarok-engine-xine amarok-engine-yauap amarok-engines amarok-common
Access it through Applications → Sound & Video → Amarok.
21 – Hard Disk Partitions Manager
Windows equivalent : Symanted Partition Magic
Ubuntu equivalent : GParted, Disk-Manager
GParted
sudo apt-get install gparted
Access it through System → Administration → Partition Editor.
Disk Manager
sudo apt-get install disk-manager
Access it through System → Administration → Disk Manager.
23 – Vector Graphics Editor
Windows equivalent : Adobe Illustrator
Ubuntu equivalent : Inkscape
Inkscape
sudo apt-get install inkscape
Access it through Applications → Graphics → Inkscape Vector Graphics Editor.
24 – Image Editor
Windows equivalent : Adobe Photoshop
Ubuntu equivalent : GIMP
GIMP
sudo apt-get install gimp gimp-data gimp-plugin-registry
Access it through Applications → Graphics → GIMP Image Editor.
24 – 3D Graphics Applications
Windows equivalent : 3D Studio MAX
Ubuntu equivalent : Blender
Blender
sudo apt-get install blender
Access it through Applications → Graphics → Blender (windowed).
25 – Simple Yet Advanced Text Editor
Windows equivalent : Notepad ++
Ubuntu equivalent : GEdit
GEdit
sudo apt-get install gedit gedit-plugins
Access it through Applications → Accessories → Text Editor.
26 – Office Applications
Windows equivalent : Microsoft Office
Ubuntu equivalent : OpenOffice
OpenOffice
sudo apt-get install openoffice.org
Access it through Applications → Office
27 – Microsoft Visio
Windows equivalent : Microsoft Visio
Ubuntu equivalent : Dia
Dia
sudo apt-get install dia
Access it through Applications → Graphics → Dia Diagram Editor
28 – Microsoft Project
Windows equivalent : Microsoft Project
Ubuntu equivalent : OpenProj
OpenProj
wget http://nchc.dl.sourceforge.net/sourceforge/openproj/openproj_1.4-2.deb && sudo dpkg -i openproj_1.4-2.deb
Access it through Applications → Office → OpenProj
29 – Development IDE
Windows equivalent : Dreamweaver
Ubuntu equivalent : Quanta, Kompozer, NetBeans
Quanta
sudo apt-get install quanta
Access it through Applications → Programming → Quanta Plus
Komposer
sudo apt-get install kompozer nvu
Access it through Applications → Internet → Kompozer
NetBeans
sudo apt-get install netbeans
Access it through Applications → Programming → NetBeans IDE
30 – Graphical FTP clients
Windows equivalent : CuteFTP, SmartFTP
Ubuntu equivalent : FileZilla
FileZilla
This is great FTP program, very complete, in my opinion, the best one for linux.
On the terminal type:
sudo apt-get install filezilla filezilla-locales filezilla-common
Access it through Applications → Internet → FileZilla FTP Client.
31 – P2P Clients / Servers, File Sharing
Windows equivalent : utorrent, azureus, emule
Ubuntu equivalent : Deluge, azureus, amule
Bittorent clients
Deluge (written in python)
sudo apt-get install deluge-torrent
Access it through Applications → Internet → Deluge Torrent.
Azureus: Uses Java to run, very complete but a bit heavy
sudo apt-get install azureus
Access it through Applications → Internet → Azureus.
Emule Donkey Clients
Amule
sudo apt-get install amule
Access it through Applications → Internet → aMule.
32 – Programs for CD burning with GUI
Windows equivalent : Nero, Roxio Easy CD Creator
Ubuntu equivalent : K3b, Brasero
K3b
Nero is available for linux,but its not free.A trial is available for 1 month usage and later it asks or activation code.But K3B is as good as Nero.Have a good feature set as Nero.
sudo apt-get install k3b k3b-data k3b-i18n libk3b3
Access it through Applications → Sound & Video → K3B.
Brasero (installed by default in Intrepid)
sudo apt-get install brasero
Access it through Applications → Sound & Video → Brasero Disc Burning .
33 – Mountings ISO files
Windows equivalent : Alcohol
Ubuntu equivalent : acetoneiso
Acetoneiso
The best one for linux ACETONEISO,which is similar to ALCOHOL in windows
its supports almost all formats. AcetoneISO is CD/DVD image manipulator for Linux.Using this tool it is very easy to Mount and Unmount ISO,MDF,NRG Images . I dont think its available in ubuntu repository.
sudo apt-get install libksba8 libenca0 libtwolame0 fuseiso kommander p7zip-full gnupg-agent gnupg2 pinentry-qt mencoder
wget http://darkstar.ist.utl.pt/getdeb/ubuntu/intrepid/ac/acetoneiso_2.0.2-0~getdeb1_i386.deb && sudo dpkg -i acetoneiso_2.0.2-0~getdeb1_i386.deb
34 – Install Vista like gadgets.
Windows equivalent : Vista Sidebar
Ubuntu equivalent : google-gadgets
Google gadgets
wget http://neacm.fe.up.pt/pub/getdeb/ubuntu/intrepid/go/google-gadgets_0.10.3-0~getdeb1_i386.deb && sudo dpkg -i google-gadgets_0.10.3-0~getdeb1_i386.deb
This will complete the installation.
Now press Alt+F2, and type “ggl-gtk” to start them. You should see a small icon show up in your system tray, and a sidebar. Right click on any of them and select ‘Add Gadgets’ to show a menu. If you’d like to have Google Gadgets start automatically, go to System – Preferences – Session, click ‘Add’, paste ‘Google Gadgets’ for the name and ‘ggl-gtk’ for the command. Click OK and Close, and you’re good to go.
35 – Google Desktop
Google Desktop allows one to full text search of a user’s e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .
Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .
To install type the following command in the terminal window : -
wget http://dl.google.com/linux/google-repo-setup.sh && sudo bash google-repo-setup.sh && sudo apt-get update
Now after completing above steps to install Google Desktop Search type the following command in the terminal window : -
sudo apt-get install google-desktop-linux
Access it through Applications → Google Desktop → Google Desktop
Now after choosing appropriate option through Applications → Google Desktop → Google Desktop Preferences, you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .
36 – Photo Management
Google Picasa
Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS (??) . Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.
Now to install Google – Picasa type the following command in the terminal window
sudo apt-get install picasa
Access it through Applications → Graphics → Picasa → Picasa
37 – Map Viewing and Management
Google Earth
To install Google Earth type the following command in the Terminal Window.
sudo aptitude install googleearth
After downloading is over you will get a screen like this press ¨Yes¨ to accept the license agreement and complete software installation.
Now you can launch Google Earth from Application → Internet → Google Earth
Back From Holidays and Blogging Again…
•November 11, 2008 • Leave a CommentYep I took some time for some holidays to travel some southeast asians countries. I did Malaysia, The Philippines, Singapore and Indonesia. And it was a blessing to have been in those countries. It was just awesome. Lately, In Malaysia, I attended FOSS.my where i learned a lot about FOSS and met some awesome guys.



Latest Comments