A method of mounting a bearing to an air compressor which includes: a base frame defining a first mounting hole , which allows a pinion driven by a motor to pass, and a second mounting hole for receiving therein a bearing which has an outer ring , an inner ring defining a central hole, and a plurality of rolling balls disposed between the outer ring and the inner ring ; a cylinder fixed to or formed integrally with the base frame ; an air storage container provided with one or more outlet tubes and connected with the cylinder ; a gear in mesh with the pinion; and a crank mechanism including a counterweight provided on the gear , and a shaft element having a first end and a second end, wherein the second end has a diameter greater than the first end, thus forming an annular step therebetween, the first end of the shaft element having an annular peripheral wall, which defines a central cylindrical recess , and on which an annular surface is formed the method comprising the steps of: fixing the second end of the shaft element to a center of the gear ; inserting the first end of the shaft element through the central hole of the bearing to have the annular step of the shaft element abutted the inner ring of the bearing ; and characterised by hitting the first end of the shaft element by a striking tool to form an outwardly extending rim on the first end of the shaft element ; wherein the striking tool includes a shank having a press head that is provided with a central pin having a diameter slightly greater than the central cylindrical recess and defines a depression around the central pin , the depression being delimited by a concave surface at a bottom of the central pin , wherein the press head is further provided with an annular surface being formed around the depression and having a level lower than the central pin , and a conical surface formed between the concave surface and the annular surface , wherein the striking tool is hit such that the annular surface contacts the inner ring of the bearing , whereby the bearing is firmly fixed between the outwardly extending rim and the annular step of the shaft element . the method comprising the steps of: fixing the second end of the shaft element to a center of the gear ; inserting the first end of the shaft element through the central hole of the bearing to have the annular step of the shaft element abutted the inner ring of the bearing ; and characterised by fixing the second end of the shaft element to a center of the gear ; inserting the first end of the shaft element through the central hole of the bearing to have the annular step of the shaft element abutted the inner ring of the bearing ; and characterised by hitting the first end of the shaft element by a striking tool to form an outwardly extending rim on the first end of the shaft element ; wherein the striking tool includes a shank having a press head that is provided with a central pin having a diameter slightly greater than the central cylindrical recess and defines a depression around the central pin , the depression being delimited by a concave surface at a bottom of the central pin , wherein the press head is further provided with an annular surface being formed around the depression and having a level lower than the central pin , and a conical surface formed between the concave surface and the annular surface , wherein the striking tool is hit such that the annular surface contacts the inner ring of the bearing , whereby the bearing is firmly fixed between the outwardly extending rim and the annular step of the shaft element . <EOS>