清道光十五年(nian)(nian)(nian)(nian)(1835)乙(yi)未科舉(ju)人,經陳官俊(jun),何凌漢(han)(han)舉(ju)薦(jian),特旨考取內閣中書,派(pai)充國史館分校委(wei)署協辦(ban)侍(shi)讀,管理諸敕(chi)房(fang)事務。咸豐(feng)元(yuan)年(nian)(nian)(nian)(nian)(1851年(nian)(nian)(nian)(nian))揀發廣(guang)西(xi)知(zhi)(zhi)州,督(du)帶(dai)三(san)廳兵(bing)勇赫(he)字營(ying)全(quan)軍(jun)。后喪母(mu)丁憂,咸豐(feng)三(san)年(nian)(nian)(nian)(nian)(1853)湘南(nan)會(hui)黨起義,湖南(nan)巡府駱秉(bing)章、侍(shi)郞曾(ceng)(ceng)國藩檄(xi)調張(zhang)榮組率兵(bing)平(ping)叛(pan),因功擢衡州知(zhi)(zhi)府,欽諭巡查湖南(nan)省(sheng)軍(jun)務,幫辦(ban)團練。咸豐(feng)九年(nian)(nian)(nian)(nian)(1859),抗擊(ji)太(tai)平(ping)軍(jun)石達開部,擢升廣(guang)西(xi)右江(jiang)兵(bing)備道,總理楚軍(jun)營(ying)務。同(tong)治元(yuan)年(nian)(nian)(nian)(nian)(1862),鎮壓(ya)潯州三(san)合會(hui)有功,欽賜花翎,委(wei)廣(guang)西(xi)按察使,奉(feng)旨纂修(xiu)《湘楚二(er)軍(jun)忠(zhong)義錄》。同(tong)治十一年(nian)(nian)(nian)(nian)(1872)病逝。任內興修(xiu)工程,倡辦(ban)教育,重建(jian)(jian)柳江(jiang)書院,修(xiu)繕石鼓書院,建(jian)(jian)設桂平(ping)西(xi)山(shan),督(du)造新田(tian)青云塔,舉(ju)辦(ban)柳州厘金(jin),曾(ceng)(ceng)主(zhu)講于陽江(jiang)書院。著有《六經存漢(han)(han)》、《七經天文(wen)附篇》《蘭太(tai)令史錄》、《廿二(er)史約篇》、《通經致用錄》、《南(nan)征(zheng)詩草(cao)》、《聽(ting)魚山(shan)房(fang)文(wen)詩》。
山(shan)有(you)仙兮(xi)(xi)(xi)則名(ming),水(shui)有(you)龍兮(xi)(xi)(xi)則靈。乳泉涓涓兮(xi)(xi)(xi)不(bu)(bu)竭不(bu)(bu)停,可以(yi)洗心兮(xi)(xi)(xi)可以(yi)鑒形。照山(shan)間之石壁(bi),對(dui)江(jiang)上(shang)之峰青(qing)。持心如(ru)水(shui)守口如(ru)瓶,汲斯泉兮(xi)(xi)(xi)念常(chang)醒。大智不(bu)(bu)鑿(zao),流水(shui)不(bu)(bu)腐,胸洞洞兮(xi)(xi)(xi)眼惺惺。不(bu)(bu)學赤松(song)兮(xi)(xi)(xi)不(bu)(bu)讀(du)黃庭,不(bu)(bu)近(jin)帝座兮(xi)(xi)(xi)不(bu)(bu)犯客(ke)星。吾尋吾之本原兮(xi)(xi)(xi),吾養吾之心經。飲斯石乳者(zhe),鑒此泉銘,俾我潯(xun)民其敬聽。