Fascinating new phases of matter can emerge from strong electron interactions in solids. In recent years, a new exotic class of many-body phases, described by generalized electromagnetism of symmetric rank-2 electric and magnetic fields and immobile charge excitations dubbed fractons, has attracted wide attention. Beside interesting properties in their own right, they are also closely related to gapped fracton quantum orders, new phases of dipole-coversing systems, quantum information, and quantum gravity. However, experimental realization of the rank-2 U(1) gauge theory is still absent, and even known practical experimental routes are scarce. In this work we propose a scheme of coupled optical phonons and nematics as well as several of its concrete experimental constructions. They can realize the electrostatics sector of the rank-2 U(1) gauge theory. A great advantage of our scheme is that it requires only basic ingredients of phonon and nematic physics, hence can be applied to a wide range of nematic matters from liquid crystals to electron orbitals. We expect this work will provide crucial guidance for the realization of rank-2 U(1) and fracton states of matter on a variety of platforms.