Package Installation, Docker Installation, Integrated Springboot Application

package installation, Docker installation, integrated SpringBoot application

package installation

1. package installation, Docker installation.Description


This document is installed by rpm package, and the operating system is centos

2 package installation, Docker installation.Download openoffice rpm package


Create a source package storage directory
mkdir / usr /local/ src / openoffice

cd / usr /local/ src / openoffice

wget https://jaist.dl.sourceforge.net/project/openofficeorg.mirror/4.1.5/binaries/zh-CN/Apache_OpenOffice_4.1.5_Linux_x86-64_install-rpm_zh-CN.tar.gz
#If the network speed is very slow, change the network environment to download
Download address: http://www.openoffice.org/zh-cn/ (need to download rpm format)

3 package installation, Docker installation.Unzip the installation


tar - xvzf Apache_OpenOffice_4.1.5_Linux_x86-64_install-rpm_zh-CN.tar.gz
After decompression, a zh - CN directory will be generated in the current directory, RPMS/ is full of rpm files, we need to install these files
cd / usr /local/ src / openoffice / zh -CN/RPMS/

rpm - ivh *.rpm
After installation, a desktop-integration directory will be generated in the current directory
cd / usr /local/ src / zh -CN/RPMS/desktop-integration/
rpm - ivh openoffice4.1.6-redhat-menus-4.1.5-9789.noarch.rpm

4 package installation, Docker installation.Start openoffice


Temporary start
Running permanently in the background

add to boot
vim/ etc / rc.local

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

Docker installation
Use the packaged openoffice4 image
docker build --pull -t xiaojun207/openoffice4-daemon --build- arg OO_VERSION=4.1.7 .
run
docker run -d -u 123456 --name soffice -p 8100:8100 -v /data/:/data/ xiaojun207/openoffice4- daemon:latest

Make your own openoffice4 image
Create an openoffice image
Resource preparation, including OpenOffice compressed package, Dockerfile file, sources.list three.

Apache_OpenOffice_4.1.7_Linux_x86-64_install-deb_zh-CN.tar Dockerfile sources.list
Dockerfile for local resources :
#The base image is debian
FROM yongqiang /debian-jdk8

COPY sources.list / etc /apt/
RUN apt-get update && apt-get upgrade && apt-get install -y libxt6 libxext6 libfreetype6 libxrender1

COPY Apache_OpenOffice_4.1.7_Linux_x86-64_install-deb_zh-CN.tar/

#decompress
RUN tar - xvf Apache_OpenOffice *
#delete archive
RUN rm -f Apache_OpenOffice_ *

#Install OpenOffice
RUN dpkg -i _ zh -CN/DEBS/*.deb || true
RUN dpkg -i _ en -CN/DEBS/desktop-integration/*.deb || true

#delete the unzipped file
RUN rm -Rf en -CN

# expose the interface
EXPOSE 8100

#Start the service, occupying port 8100
CMD /opt/openoffice4/program/ soffice -headless -nofirststartwizard -accept = " socket,host =0.0.0.0,port=8100;urp;"
build image
$ docker build -t openoffice:v 1 .
start the container
$ docker run -d -it -p 8100:8100 openoffice:v 1
Submit to DockerHub
$ docker tag 6cefc75591a0 yongqiang / openoffice:v 1
$ docker push yongqiang / openoffice:v 1

problem solved
make mirror problem
/opt/openoffice4/program/ soffice.bin : error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory
Solution: apt-get install libxext6
/opt/openoffice4/program/ soffice.bin : error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
Solution: apt-get install libfreetype6
javaldx : Could not find a Java Runtime Environment!
解决方案:FROM yongqiang/debian-jdk8
no suitable windowing system found, exiting.
解决方案:apt-get install libxt6 libxrender1
安装openoffice问题
问题一:
$ soffice
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
/opt/openoffice4/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)
solve:
$ vncserver
$ export DISPLAY=localhost:1
$ xhost +
access control disabled, clients can connect from any host
xhost method steps under Linux
linux with root and start the vnc service;
Step 2: According to the port started by vnc , set export DISPLAY=localhost:1 (1 means that vnc is started on the first tty ). For the startup information of vnc , see Attachment 1;
Step 3: Execute xhost +, and the prompt "access control disabled, clients can connect from any host" is correct.
Question two:
Fatal server error:
could not open default font 'fixed'
Solution: apt-get -y install xfonts -base
After installation, restart the vnc service.
Question three:
Xlib : extension "RANDR" missing on display "localhost:1".
Solution: apt-get -y install xfonts -base