Phi meson production in pion-baryon and baryon-baryon interactions near the production threshold is studied in a boson-exchange model. Parameters in this model are either taken from the Bonn model for the nucleon-nucleon potential or determined from the measured phi meson decay width and the experimental data for the reactions π − p→φn and pp→ppφ. The isospinaveraged cross sections for the reactions πN →φN , π∆→φN , N N →N N φ, which are needed in transport models to study phi meson production in heavyion collisions at subthreshold energies, have been evaluated. For the reactions N ∆→N N φ and ∆∆→N N φ, which become singular when the exchanged pion is on-shell, the Peierls method is used to calculate their cross sections. We find that the cross section for the reaction πN →φN is much larger than the other cross sections.