A pump system for an infusion system includes a linear drive (36, 36′) which minimizes the space occupied by the pump components in a portable housing (10, 10′). A motor (34) and a motor drive shaft (42) are arranged in parallel with, and adjacent to a syringe (14, 14′) and lead screw (94, 94′). A gear box (54) connects the drive shaft and lead screw to transfer rotational movements between them. A piston driving member, such as a drive nut (116) converts the rotational movement of the lead screw into linear motion of a syringe piston (24). A cap (190, 190′) couples the syringe (14, 14′) to the housing and provides an outlet for the liquid to be dispensed. In one embodiment, the cap (190′) is configured to rotate relative to the housing in one direction only, during locking. Rotational movement is also used for locking the piston (24) to the drive nut (116) against relative axial movement. In another embodiment, the cap (190′) carries a rotatable hub (330) which is connected at a first end (336) with an infusion line (191) and at a second end defines a needle (338) for piercing a closure (340) on the syringe.