The key is to be completely sterile every step of the way. Remember you are creating an environment that fosters the growth of fungus, so ANY fungus can and WILL take hold if you are not careful.
Depending on how many you would like to grow, you have to find a suitable sized container, something that is easy to clean and sterilize, and sealable. I used an old aquarium.
You then prepare your substrate for growing the mycelium, the fibrous mat that grows underground. The actual mushroom is technically a "fruit" of the larger organism. The substrate I used was organic brown rice flour, vermiculite and distilled water (maybe something else as well, I can't remember).
You prepare this mixture and lightly pack it into wide mouth sealers, where the mouth is at least as wide as the body. The whole "cake" needs to come out of the jar when it has grown through. You fill the jars with this substrate mixture to within about 3/4 in to an inch from the top. The rest of the space is filled with just vermiculite.
The lids are prepared to have 3 holes (made with a small finishing nail) spaced equally around the center near the edge of thing, inside the rubber ring. These lids are placed on the jars upside down and the rings are installed hand tight. The top of the jar is then covered with aluminum foil.
These completed jars are then put in a pressure cooker/canner to sterilize the substrate. At this point, you need to prepare a spore syringe. If you are working with a spore print, you use distilled water, boiled and cooled, to dissolve the spores in. You take up this solution into a sterilized syringe with a hypodermic needle attached. You then "flame" the needle to sterilize it, carefully lift up the foil and inject a couple of drops of solution into each hole, and re-cover with the foil.
Once all of your jars are prepared like this, you put them in a cool dark place for about 3 weeks. During this time, white fibrous matting should be growing from each injection site. After a while, the 3 "injections" will grow together, creating a viable fruiting colony, and will grow through the entire substrate.
At this time, you carefully open the jars, scrape/dump off the vermiculite "cap", and invert and tap the jars to remove the cakes (sometimes a well sterilized butter knife is required to coax out the cakes) and these go into your container (aquarium in my case) which is sealed with some sort of well fitting lid.
Every day, you boil a cup of water and place it in the container. This provides humidity and allows for a change of air. In a few weeks, you should have mushrooms growing off the "cakes" that are ready for harvest. You can often pick 3-4 times before the mycelium stops fruiting.
To keep on going indefinitely, you can make spore prints from the mushrooms you have grown. You wait until the veil breaks from under the gills, and in a couple of days (depending on the strain) you will notice some "staining" on the cakes below. This is the spores. Pick one of the healthiest looking mushrooms, cut the stem off flush with the cap, and place on a recipe card or heavy piece of cardstock, and place an inverted glass or bowl over top. In about a day you should have a spore print that you can then use to create another spore syringe, to start the process over again.
I hope that is all clear enough. That is all from memory from many years ago. They weren't portabellos, but the method should be the same. The biggest thing, and it can't be stress enough, is to be absolutely sterile every step of the way.