CentOS下安裝openoffic
現在通過yum安裝openoffice嘗試了一下,已經不行了。那麼我們需要通過下載安裝的方式
下載openofficeopenoffice
centos系統選擇rpm ,位元根據自己系統而定
建立目錄[root@localhost /]# mkdir openoffice/
然後通過檔案上傳工具把下載的openoffice檔案上傳上去
安裝openoffice查看檔案[root@localhost /]# ls /root/openoffice/Apache_OpenOffice_4.1.3_Linux_x86-64_install-rpm_zh-CN.tar.gz解壓[root@localhost /]# tar -zxvf /root/openoffice/Apache_OpenOffice_4.1.3_Linux_x86-64_install-rpm_zh-CN.tar.gz這時會在根目錄下組建檔案夾zh-CN[root@localhost /]# cd zh-CN/[root@localhost zh-CN]# lslicenses readmes RPMS有三個目錄 進入到RPMS目錄[root@localhost zh-CN]# cd RPMS/查看[root@localhost RPMS]# ll
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
RMPS 目錄中有很多 rpm 安裝檔案,執行上面的安裝命令,會根據所依懶的安裝包逐個進行安裝執行[root@localhost RPMS]# rpm -ivh *.rpm
安裝成功!
啟動openoffice啟動[root@localhost program]# soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard &如果出現以下錯誤[root@localhost program]# /usr/lib64/libreoffice/program/soffice.bin X11 error: Can't open display: Set DISPLAY environment variable, use -display option or check permissions of your X-Server (See "man X" resp. "man xhost" for details)執行[root@localhost program]# export DISPLAY=:0.0再次執行啟動命令[root@localhost program]# soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard &查看監聽連接埠[root@localhost program]# netstat -tln
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
出現紅線內容說明啟動成功
停止openoffice查看進程:[root@localhost program]# ps -ef|grep soffice;root 12849 12832 0 12:49 pts/1 00:00:00 /usr/lib64/libreoffice/program/soffice.bin --headless --accept=socket,host=127.0.0.1,port=8100;urp; --nofirststartwizardroot 12877 3234 0 12:54 pts/1 00:00:00 grep soffice殺死進程[root@localhost program]# kill -9 12849再次監聽連接埠[root@localhost program]# netstat -tln
這時應沒有8100的連接埠