Managing knowledge means managing the processes of creation, development, distribution and utilisation of knowledge in order to improve organizational performance and increase competitive capacity. However, serious difficulties arise when attempts are made to implement knowledge management in enterprises. One of the reasons behind this situation is the lack of suitable methodologies for guiding the process of development and implementation of a knowledge management system (KMS), which is a computer system that allows the processes of creating, collecting, organising, accessing and using knowledge to be automated as far as possible. In this article we propose a methodology for directing the process of developing and implementing a knowledge management system in any type of organization. The methodology is organised in phases and outlines the activities to be performed, the techniques and supporting tools to be used, and the expected results for each phase. In addition, we show how the proposed methodology can be applied to the particular case of an enterprise.