We present an implementation of the full-potential linearized augmented plane-wave ͑FLAPW͒ method for carrying out ab initio calculations of the ground state electronic properties of ͑magnetic͒ metallic nanowires and nanotubes based on the density-functional theory ͑DFT͒. The method is truly one-dimensional, uses explicitly a wire geometry and is realized as an extension of the FLEUR code. It includes a wide variety of chiral symmetries known for tubular and other one-dimensional systems. A comparative study shows that in this geometry computations are considerably faster than the widely used supercell approach. The method was applied to some typical model structures explored in the field of nanospintronics: the gold nanowire Au͑6,0͒, the free-standing Fe monowire, and the hybrid structure Fe@Au͑6,0͒. Their atomic structures are determined by total energy minimization and force calculations. We calculated the magnetic properties including the magnetocrystalline anisotropy energies, the band structures, and densities of states in these systems using the local density approximation ͑LDA͒ and the generalized gradient approximation ͑GGA͒ to the DFT. The results agree nicely with the data available in the literature. We found that Fe wires are ferromagnetic and are prone to a Peierls dimerization. The Fe filled gold nanotube shows a large negative spin polarization at the Fermi level, which makes this structure a possible candidate for spin-dependent transport applications in the field of spintronics. The Au tube encasing the Fe wire changes the magnetization direction of the Fe wire and increases the magnetocrystalline anisotropy energy by an order of magnitude.