To install a dryer vent close to a wall, connect a 90-degree duct elbow to the dryer vent outlet, and then run rigid or semi-rigid duct pipe from the elbow. The ductwork needs to run from the dryer vent outlet to the vent cap outside.
The dryer can be installed close to the wall as long as there is enough space to connect the 4-inch diameter ductwork to the dryer vent outlet. Attach a 90-degree elbow to the outlet, and secure the connection with a hose clamp. Duct piping, either rigid or semi-rigid, can be run straight up from the elbow and along the wall.
Before connecting the ductwork, determine the shortest and easiest route to the outside from the dryer. Select a location for the vent cap, and check outside for any obvious obstacles. From the inside, drill a pilot hole in the center of the vent cap's location, and double-check for any obstructions between the walls, such as electrical wires. From the outside, cut out a 4 1/4-inch diameter hole. Insert the vent cap pipe into the hole, and secure the cap with screws. Caulk around the edges for weather protection.
On the inside, attach the dryer duct to the vent cap pipe, and secure it with a hose clamp. Following the predetermined route, add additional duct piping and fittings as needed until you reach the dryer vent outlet. Seal any joints with foil tape.