Macs generally use IDE cables configured for Cable Select, PCs rely on the drive itself to set slave and master. Try setting the optical drive jumpers for Cable Select. If this fails to work, you might need to find an IDE cable select cable.
Another option to try - it appears from your comments you have an iMac available to you? If you have another PPC Mac available, you can put the install disc into its drive, boot it into Target Disk Mode, connect via Firewire to your PowerMac G5, and potentially use the iMac's optical drive to boot from and then install to your PowerMac's internal drive.