Locate the sewer line, and install a PVC pipe that extends a foot above the toilet bowl. Connect the PVC pipe to the sewer line with a plastic or cast iron wye. Set the toilet drain stack 12 inches behind the toilet's back wall. Cut a hole in the subfloor below the toilet, and install a waste line that runs from the toilet to the waste line. Connect a line from the cold water line to the toilet supply back.
Use PVC glue to secure the wye to the PVC pipe that makes up the toilet drain stack. Use a closet flange to hold the toilet in place, and connect it to the waste line. Screw the flange into place and then attach an elbow to it pointed in the direction of the drain stack. Secure the elbow to the flange with PVC glue. Extend the pipe from the elbow to the drain stack at a slight slope with more PVC pipe and PVC glue.
Cut the drain stack, and attach a sanitary tee with glue. Use a coupling to decrease the size of the stack's opening to create a vent.
Turn off the water line. Cut and sodder the copper piping of the cold water line. Attach a fitting to the cold water pipe so it runs from the tee to behind the toilet's back wall. Solder all the joints, and secure the new water line to a wall stud with a pipe clamp. Install a pipe valve with a compression fitting, then test the line for leaks. If there are no leaks, turn the water line on again.