Method to install openOffice and start the service in an linux environment

  • 2020-10-23 20:24:07
  • OfStack

1. Back story

There was a big hole in the past two days. The client wanted to preview the office document online, so he had to convert the office document into pdf and submit it to the front end for display.

You go 1 turn at some point and you say openOffice+jodconverter can do this thing. The code was easy to find, but there were many versions and various jar packages, but when I tried, I found that the conversion effect was just as good and the complex excel didn't work either. Some colleagues suggested that it might work better on the server, so they started toying with the idea of installing OpenOffice on the server. Various online to find the god of blog, found that the installation is not very smooth, I wrote this essay, record 1, encountered problems, convenient to view their own later.

2. Operation steps

http: / / www. openoffice. org/zh - cn/download/to website link download version linux openOffice 4.1.5 version, for example.

2. Upload the compression package to the server, and unzip the installation.


 tar -zxvf  The name of the corresponding zip 
 cd  It goes into decompression  /zh-cn/RPMS
 yum localinstall *.rpm
 cd desktop-integration
 rpm -ivh openoffice4.1.5-redhat-menus-4.1.5-9789.noarch.rpm

By default it will be installed in the /opt directory.

3. Start the service


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

The port number is determined according to the reality of your project.

Background startup will directly occupy the memory, according to various gods about 100M, I have not measured the specific value is not clear.

Some programs need to pre-start the openOffice service, while others start the service themselves in the code.

4. Check your progress


netstat -lnp |grep  The port number  


It looks something like this and we're done.


tcp    0   0 127.0.0.1:8100       0.0.0.0:*          LISTEN   14362/soffice.bin

3. Small talk

openOffice round word document effect is good, turn to Excel really effect is not good, simple Excel can handle, complex is very slow very slow, and the effect is very bad.

conclusion

Above is the site to introduce linux environment to install openOffice and start the service method, I hope to help you, if you have any questions welcome to leave a message, this site will reply you in time!


Related articles: