how to flush dns cache

November 21st, 2009 by amatesi

Recently I was making some modifications to my website, in fact, I moved the whole site from a windows server to a linux one.

After almost 24h (and once OpenDNS online servers got updated), I was still browsing the old one, so I discovered the problem was lying inside my client's DNS cache. I found many suggestions, but the bullet proof™ ones (at least for me!) are the following:

how to clean windows dns cache:

ipconfig /flushdns

how to clean ubuntu dns server, dns cache:

rndc flush

how to clean MAC OS X dns cache:

sudo dscacheutil -flushcache

Bookmark and Share

Posted in System Administrator | No Comments »

install vtiger 5.1.0 sources on ubuntu 8.04 X86_64

October 22nd, 2009 by amatesi

I don't know why, I don't know how, suffice it to say someday I woke up, willing to try vtiger on my own server.

Here it's howto install vtiger 5.1.0 sources on ubuntu 8.04(.3) X86_64

sudo su; mkdir src; cd src

wget http://downloads.sourceforge.net/project/vtigercrm/vtiger%20CRM%205.1.0/Core%20Product/vtigercrm-5.1.0.tar.gz

tar xvzf vtigercrm-5.1.0.tar.gz
 
apt-get update && apt-get upgrade
 
tasksel -> choose LAMP and install
apt-get install php5 php5-gd libapache2-mod-auth-mysql php5-mysql php5-imap
cp -r /root/src/vtigercrm /var/www/
 
cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.ori
vi /etc/php5/apache2/php.ini
You need to do the following recommended changes to make sure PHP works well with V-Tiger.
File: /etc/php5/apache2/php.ini

safe_mode = Off # default
display_errors = On # default
file_uploads = On # default
register_globals = Off # default
max_execution_time = 600 # was: 30
output_buffering = On # was: Off
memory_limit = 64M # default
error_reporting = E_ALL & ~E_NOTICE # default
allow_call_time_pass_reference = On # default
log_errors = Off                       # default
short_open_tag = On # default

 
- Create a Virtual Host for apache
 
vi /etc/apache2/sites-available/vtiger
 
<VirtualHost *:80>
ServerName vtiger.mydomain.com
DocumentRoot /var/www/vtigercrm/
ErrorLog /var/log/apache2/vtiger.mydomain.com.error_log
CustomLog /var/log/apache2/vtiger.mydomain.com.access_log combined
<Directory /var/www/vtigercrm>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
 
/etc/init.d/apache2 restart
 
cd /etc/apache2/sites-enabled
ln -s ../sites-available/vtiger vtiger
 
Open up a browser on another machine on the network to test the folder.
 
cd /var/www
find vtigercrm/ -type d -exec chmod 750 {} \;
find vtigercrm/ -type f -exec chmod 640 {} \;
chown -R www-data: vtigercrm/
 
 
MYSQL create DB
mysql –user root -p
CREATE DATABASE vtigerdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON vtigerdb.* TO 'vtigerusr'@'localhost' IDENTIFIED BY 'non-sense-fckuing-password';
 
vi /etc/mysql/my.cnf
 
change:
bind-address            = 0.0.0.0 # to allow connection from all
 
…well, now I have to figure out why I needed all this!
 
-sources:

http://ubuntuforums.org/showthread.php?t=358395

http://www.linuxquestions.org/questions/linux-software-2/vtiger-installation-on-a-ubuntu-server-v9.04-735979/

Bookmark and Share

Posted in Uncategorized | 1 Comment »

Upgrade Centos 4.7 to 5.3.

August 9th, 2009 by amatesi

I'm used to Ubuntu and I appreciate its funny sudo apt-get goodness, but for some reasons (spoiler: new job), I got involved with Centos administration.

After learning some yum quirks (if you're used to apt-get and dpkg, believe me, it's easy!), I was given the task to migrate a 32 bit Centos 4.7 Final install to Centos 5.3.

Some useful yum commands I learned:

  • yum install package
  • yum remove package
  • yum clean all

For the migration task, I followed these guidelines: http://wiki.centos.org/HowTos/MigrationGuide/ServerCD_4.4_to_5

I can confirm it worked, except some expected, minor issues, solved by using some sanity. To manually download my packages, I choose a local italian mirror (the garr mirror – ftp://mi.mirror.garr.it/pub/1/centos/5.3/os/i386/CentOS/).

I'm not in the mood for a step-by-step howto (too busy ATM, just follow the wiki over there…), but here are some tips, notes and issues I encountered during the process and how I overcame them.

Follow the wiki guidelines, at the section:

- remove 2.6.9 bits

rpm -e kernel-2.6.9-42.EL kernel-devel-2.6.9-42.EL kernel-doc-2.6.9-42.EL

make sure you remove ALL 2.6.9x kernel iterations. To know how many kernel iterations you have, just type:

rpm -qa | grep kernel

then, when launching your rpm -e command, make sure you choose ALL kernel-2.6.9X, kernel-devel-2.6.9x and kernel-doc-2.6.9x instances.

Over time, and depending on the server role, kernel revisions may add up (on mine, there were almost 17 instances), so, when I launched the remove command, I (wrongly) thought it was kinda crashy since it took my prompt. I was pretty tempted to stop the process with CTRL+C, but before doing so, I opened another ssh session (BEWARE: make sure you have physical server access), and launched "top". I saw some activity [by the rpm command himself], so I decided to leave it running and I switched doing something else; ~20 min. later I was given my bash prompt back.

 

Another source of concern was when dealing with yum, repos and rpm. I experienced some broken dependencies, some missing libs and some unsatisfied python deps, so I happened to remove the old versions (el4) and installed the new ones.Too bad that, when removing old packages, I ended up on a strange situation: I found myself removing sqlite. Since (probably, not so sure about that), the rpm Db is based on sqlite, I ended up on an inconsistent status, where I couldn't install nor remove anything(!), not with rpm commands neither with yum, so take care when/if playing with a critical system component like sqlite.

 

 

FYI, i'll post a very useful link, that can help you deal with sqlite and borked rpm db: http://www.raditha.com/blog/archives/001579.html

As always (at least, when dealing with linux…), YMMV: I wish you a happy Centos migration!

Please refer to:

  • http://wiki.centos.org/HowTos/MigrationGuide/ServerCD_4.4_to_5
  • http://www.tocpcs.com/yum-install-centos-5-upgrade-from-centos-44-to-centos-5
  • http://www.raditha.com/blog/archives/001579.html
Bookmark and Share

Posted in GNU Linux, System Administrator | No Comments »

reviewing xhtml elements: block vs inline

June 11th, 2009 by amatesi

Today I was reviewing some XHTML syntax. This post is a placeholder for me to remember wich ones are CSS block elements and wich ones are CSS inline elements.

The difference between the two is, according to the specifications, that a block-level element can contain other elements (block-level and inline elements); an inline element can only contain one or more inline elements, but not block-level elements.

The block-level elements:

  • h1, h2, h3, h4, h5, h5
  • p
  • div
  • blockquote
  • ul and ol
  • forms

The inline elements:

  • em
  • strong
  • cite
  • a
  • img

a cool example

<p>

     <strong>

          <em>

               <a href="http://www.pwrusr.com/">pwrusr.com

               </a>

          </em>

     </strong>

is a site for 

     <cite>power users!</cite>

</p>

an important rule: symmetry aka we have to strive to keep opening and closing tags ordered simmetrically.

Bookmark and Share

Posted in Web Master, Web Standards | No Comments »

OSCON and your favorite Open Source app

May 15th, 2009 by amatesi

I just reached OSCON website and I discovered that this summer, from July 20 to 24, 2009, there is an exciting party!

The OSCON is a famous annual event, dedicated to the Open Source "movement", held by publisher O’Reilly Media and sponsored by some great industry names like intel and Google.

O’Reilly is the good guys that somehow sponsored the creation of the famous Linux Network Administrator Guide (that unfortunately I still had no time to finish…). They may also be considered "innovators" from the point of view of book licenses, since they kinda invented "Open Books", a precious pearl of knowledge on the web, now released as Creative Commons (check and download from here: http://oreilly.com/openbook/ ).

This year, OSCON (Open Source CONvention) is held at the heart of the Silicon Valley, on sunny San Jose, CA, place known also as intel’s HQ.

Well, intel may not have a lot to party, since EU Commission just fined them an incredible €. 1.06 billion, but other than that, intel demonstrated a lot of open intents, like kernel mode-setting key-aspects contribution, unbelievable boot times for netbooks (see moblin.org and Samsung netbook bootup youtube video) and other interesting technological goodnesses. 

OSCON is not just tons of conferences, it’s also where interesting open source projects gains (deserved) mainstream visibility, so Sourceforge.net readied the "Community Choice Awards", a program aimed at allowing you to push your favorite open source project up. Through that site you can nominate the open source projects you like the most and then hope they get selected and presented at the OSCON.

Nominations will be accepted until May 29th, so you are still in time to nominate your favorite projects too! Winners will be declared July 23rd. Note you can cast one vote for every category, and since there are 12 categories, you can wisely choose 12 projects!

Here are some of my favorite 2009 open source projects.

Best Commercial Open Source Project: Alfresco Labs

 

Best Project for the Enterprise: vtiger

 

Most Likely to Change the Way You Do Everything: jfusion

 

Bookmark and Share

Posted in NEWS | No Comments »

SUN sold!

April 21st, 2009 by amatesi

This is upcoming and shocking news for the UNIX-world, DB-World, Virtualization-World, Enterprise-software-world, developers-world …

Essentially, the future IT world, is going to be influenced by the choices made by another big software giant like ORACLE, today a SUN-illuminated ORACLE.

The April 20 2009 ORACLE-SUN acquisition is probably going to change the IT World, this is almost a matter of fact, since now ORACLE is becoming the de-facto biggest sponsor and contributor of the open source world.

Till now, ORACLE pursued the "Microsoft way": cleansing and purging every possible competitor, with big bucks (and it seems they largely succeeded with their former acquisitions).

At present, ORACLE made a new demonstration: successful open source can be "bought", even if it is a direct competitor (probably because successful open source moves a lot of money?).

I don’t feel comfortable to argue about the future, but it’s just natural to think about the LAMP-stack, and if it is going to become LAPP-stack in the future!

But I suspect ORACLE plans aren’t to kill mySQL, maybe they’ll relegate it to a "developers experiment", with an "enterprise version", who knows?

ORACLE seem actively involved in the open source, with btrfs filesystem development and previous contributions to ext4, but here I also see two possibly-related projects: ZFS and btrfs. What road will ORACLE choose to pursue?

Another interesting overlapping project is virtualization: ORACLE pushes XEN, and SUN have its own XEN setup on Solaris, so they’ll probably merge the two, but what will happen to virtualbox is not known (SUN acquired innotek and made its own Xvm Virtualbox virtualization solution for the desktop and the workstations): another important choice for ORACLE here.

Another interesting and debatable argument is licenses: it seems now a matter of GPL vs CDDL, and probably ORACLE will have to make some important choices even on this field.

Other than that, my personal concern is non-existant, since I have no direct nor indirect and am in no way related to any (I’m just a GNU/Linux power user): for me they’re two big companies merging, one heavily hit by the downturn and the other still sane, so, for me, this merger is probably a good thing; also, maybe the one makin’money will teach the other how to better monetize, whatever it will cost.

P.S.: I will still sporadically read Jonathan Schwartz’s illuminated blog, given the new situation.

Bookmark and Share

Posted in NEWS | No Comments »

change default 8080 port for alfresco or zenoss?

March 24th, 2009 by amatesi

Recently I was evaluating the final Alfresco Labs 3 document management nifty program, inside my little, trusty (and quite overloaded…), Ubuntu home server. I experienced a lot of problems related to the 8080 port, because Zenoss defaults to that and Alfresco wants that too.

I searched for some info on how to change alfresco default 8080 apache tomcat port and here’s what I found (from alfresco wiki page):

Edit those files and change 8080 to something else (like for example 8099):

 

  • $ALF_HOME/tomcat/conf/server.xml
  • $ALF_HOME/tomcat/webapps/share/WEB-INF/urlrewrite.xml
  • $ALF_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/pagerenderer-config.xml
  • $ALF_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/webscript-framework-config-test.xml
  • $ALF_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/webscript-framework-config.xml
  • $ALF_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/webscripts/org/alfresco/indexall.get.mediawiki.ftl
  • $ALF_HOME/tomcat/shared/classes/alfresco/extension/custom-repository.properties and add an entry to overide the default: repo.remote.endpoint.url=http://localhost:8080/alfresco/service

 

They say the following about this mess:"It is planned for future versions to allow for central configuration of the port. It is not fixed yet, when this will be included."

I tried the modifications, but essentially I screwed my alfresco setup (more on this later maybe), so I removed and purged my alfresco.

I then decided to search for some info on how to change the default Zenoss 8080 port, and so I found that editing /usr/local/zenoss/zenoss/etc/zope.conf

and uncommenting line 840 with:

port-base 1000

 

will move Zenoss Web UI to port 8080 + 1000, or 9080.
 
I then rebooted my server and checked if zenoss was responding (you may simply restart it’s service by using /etc/init.d/zenoss-stack restart).
 
Fine, this way you can:
  1. Avoid changing Alfresco’s port mess.
  2. Proceed with the Alfresco installation process.

Hope that helps!

 

Bookmark and Share

Posted in GNU Linux, System Administrator, Uncategorized | 1 Comment »

service post n.1

March 19th, 2009 by amatesi

This is service post n°1.

I’m putting this as a placeholder to remember the modifications I made today on this blog.

  1. I removed my email address from the about page and added a contact page on it’s place: the reason for that is that spammers became cuter!
  2. I replaced the social bookmarks plugin with the new and less obtrusive "Addthis" button: even if I’m intentionally sponsoring a brand, to me it seems more fun and BTW it’s free!

To make my contact page consistent with the template layout I added the following css code to the template’s css:

/* modifiche contact form */

#wpcf label { clear: both; display: block; float: left; width: 150px; }
#wpcf input { float: left; width: 200px; padding: 1px; margin: 2px 5px 2px 0; }
#wpcf textarea { width: 350px; height: 100px; padding: 1px; margin: 0 5px 10px 0; }
#wpcf #contactsubmit { margin-left: 250px; width: 100px; }

That’s it for now.

Bookmark and Share

Posted in other | No Comments »

the “at” linux/UNIX command and related adventures.

February 27th, 2009 by amatesi

Yesterday and Today I had a complex and clever Document and Business Process Management course, so I woke up early in the morning and drove 100Km away (totally I drove 400+ Km in two days for this course).

Yesterday, other than the full session-day, I returned home at about 10:00pm, hungry, tired, and, despite that, still able to update my site and then put my head on the pillow around midnight (just for the case, my new site is amitex.it - web and open source services and solutions!). Too bad that the combination of my recurring insomnia and the preparations for the day after, kept my head buzzing and running, and so, I started thinking if everything was perfect-ready for the day after, namely today, so, at about 1.00am I came at the conclusion that not everything was fine: my laptop missed an XP VM for the demo (my laptop seems to reserve a special place for Ubuntu and the course was about a native Windows Software). I then jumped down from my bed and powered my laptop up in the middle of the night, I wgetted the Sun xVM Virtualbox bins from their site and installed it; at the same time, I scp-ed my 12Gb, devxpvm1 from my Ubuntu server, through my crappy-limited 100Mbps lan, to my laptop.

The connection was damn slow (scp said something about 24 minutes), it was 1 and something am in the morning and I had pointed my alarm clock to 5.45am. WTF?!

Well, if I would’ve been lame enough, I would’ve taken the course without laptop (and related jerk expression…). Hopefully, this wasn’t my case, since the at command came in my help!

The at shell command, for me, is a recent re-discovery (I surely used it in the past). It allows you to temporarily schedule an imminent task to run once and only. Next reboot, no trace of previously scheduled tasks. Too bad I wasn’t remembering the right at syntax, so I launched it and lamely typed on its prompt what I wanted the laptop to do (well, I just wanted for it to shut down automatically after a safe time slice, in such a way for it to complete the scp transfer).

Basically, I launched:

sudo at 2.30 (+ root password).

at>halt
at>stop (noob…)
at>quit  (lame…)
at>exit (downgraded-pwrusr-jerk)

…and nothing happened…I wasn’t remembering how to confirm my scheduled task! (FYI, I just wanted for it to shut-the-f#-down…err, to halt). So I opened the man page, but nothing (maybe I eventually was too tired to "RTFM" AND "connect-and-understand™").

A fast, random (and nervous), google search, pointed me to an unexpected IBM doc, alleging somewhere that CTRL+D was the right key combo. I said nervous, because at bash linux terminal command ain’t easy search!

So, essentially, I found CTRL+D was the key-trick…I pushed down the combination, but nothing happened; I then tried the CTRL+SHIFT+D combo, and it happily worked :)

Then I went to sleep, and finally slept. In the early morning, I found my laptop correctly halted: too bad today my laptop was just a dead-heavy 17" luggage: the demo went through the projector! (and not inside course-takers’  laptops).

Arghh…but let’s look at its bright side: I re-learned a way old (and pretty useful) command (and hopefully you too!).

Bookmark and Share

Posted in Uncategorized | No Comments »

debian 5, finally.

February 18th, 2009 by amatesi

Thanks to the community effort, debian 5 was finally born.

This is a stable release, code name "lenny", continuing the debian toy story naming tradition.

With this release, there are a lot of changes, well, not the kind of changes you would expect from a modern .6 Ubuntu desktop refresh, because one of the developer’s aim is the combination of hardware and software stability (and so in fact the debian developers deliberately pick packages one by one and test them a lot, before releasing to the public), but it is, by the way, a message about "we are confident on those packages and we can build up on those".

Before this release, lenny was referred to as "testing" on the debian repository, now it has become "stable".

Debian is useful for System integrators, System Administrators and others interested on building something on top of it (generally servers), since the distribution is very prone to customization, it’s normal to see packages like kernel 2.6.26, X.Org 7.3, K (KDE) 3.5.10, GNOME 2.22.2 etc.

Don’t look at them like old packages, those packages are really and thorougly tested and debugged. If you really need a linux-based, fully featured desktop distribution, get Ubuntu instead: it is built around debian and the next minor update is going to offer some intersting new features and improvements; you may also wish to try debian squeeze (if you are a debugger/developer) or sid (if you are seriously confident with linux); you can do so just by editing /etc/apt/sources.list and changing all the "stable" keywords instances to "testing" for squeeze or "unstable" for sid (this is the edge of the edge of the new stuff, but dependencies sometime happen to break).

I suggest you to try debian64 for server-like production tasks and experiments; download debian from torrent sites to relieve some traffic from official servers and remember that, if you can spare some bucks, support the debian community by donating (especially if you make money on top of it).

Welcome debian stable!

Bookmark and Share

Posted in NEWS | No Comments »

« Previous Entries