In order to improve the reliability of distributed storage systems (DSS) and repair efficiency of failed nodes, a new coding scheme, termed as locally repairable codes (LRC) based on fractional repetition (FR) codes, is proposed in this paper. Specifically, the proposed LRC based on FR codes divide the nodes into multiple local groups, and the FR codes with repetition degree 2 are adopted in each local group. The LRC based on FR codes can achieve the exact repair for single failed node in the local group, and rapid repair for multiple failed nodes in DSS with lower repair locality. Furthermore, compared with Reed-Solomon (RS) codes and simple regenerating codes (SRC), the LRC based on FR codes have remarkable advantages in repair bandwidth overhead.