The concept of locally repairable code(LRC) is presented to improve the reliability and efficiency of distributed storage systems. linear complementary dual (LCD) code is proved useful for preventing malicious attacks, and helps to secure the system. In this paper, we put LRC and LCD code together for consideration, to enhance repair efficiency and security. Firstly, a new method of constructing self-orthogonal code from arbitrary ternary linear code is proved. Then a new construction of ternary LRC that is also LCD code with small locality is proposed. As a result, plenty of ternary LCD-LRCs attaining the CM bound are obtained, which shows the effectiveness of our method.