Linux安裝OpenOffice

1.下載安裝包

前往OpenOffice官網(wǎng)下載,下載地址:http://www.openoffice.org/download/,選擇對(duì)應(yīng)的版本下載即可。下載完成后,上傳到服務(wù)器備用

image.png

2.解壓縮

#創(chuàng)建OpenOffice目錄
mkdir /usr/local/openoffice
#切換
cd /usr/local/openoffice
#解壓縮
tar -zxvf /home/Apache_OpenOffice_4.1.7_Linux_x86-64_install-rpm_zh-CN.tar.gz

3.執(zhí)行安裝

切換到OpenOffice安裝文件目錄,安裝目錄下的所有RPM包。

cd zh-CN/RPMS/
yum localinstall *.rpm
image.png

裝完后會(huì)在當(dāng)前目錄下生成一個(gè)desktop-integration目錄

cd desktop-integration/
yum localinstall openoffice4.1.7-redhat-menus-4.1.7-9800.noarch.rpm
image.png

4.安裝依賴包

由于OpenOffice依賴于libXext程序包和X Window,所以先執(zhí)行安裝,防止出現(xiàn)程序啟動(dòng)時(shí)報(bào)錯(cuò)

cd /opt/openoffice4/program/
yum install libXext.x86_64
yum groupinstall "X Window System"

4.啟動(dòng)

啟動(dòng)有兩種形式:

  • 方式一: 臨時(shí)啟動(dòng)
/opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
  • 方式二: 放入后臺(tái)永久運(yùn)行
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

啟動(dòng)完成后,可以通過(guò)netstat -lnp |grep 8100命令查看OpenOffice進(jìn)程確定是否啟動(dòng)成功。出現(xiàn)如下提示,代表啟動(dòng)成功

image.png

啟動(dòng)報(bào)錯(cuò):
/opt/openoffice4/program/soffice.bin: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory
解決辦法:

5.設(shè)置開(kāi)機(jī)自啟動(dòng)

vim /etc/rc.local

nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

查看openoffice進(jìn)程

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容