# ifconfig
--After viewing the IP address of the virtual machine below, the following actions are connected on the local software
--Upload all the compressed package files I have given to the/root directory
# yum-y Update
# init 6
--Restart
# yum-y Install Vim
--Install Vim
# yum-y Install wget
--Install the Download tool
# wget http://pkgs.repoforge.org/unoconv/unoconv-0.5-1.el6.rf.noarch.rpm
--Download file Unoconv
# yum-y Install openoffice*
--install OpenOffice including all plugins
# yum Install unoconv-0.5-1.el6.rf.noarch.rpm
--Install the unoconv you just downloaded
# mkdir-p/usr/share/fonts/truetype/droid
# CP Droidsansfallbackfull.ttf/usr/share/fonts/truetype/droid/
--Create a folder
--Copy fonts to this folder
# unoconv-f PDF 123.docx
--The first execution fails, and then it executes again.
# unoconv-f PDF 123.docx
--Perform a check again to see if the 123.pdf is correct
--Upload Nginx, PHP, and Libmcrypt packages
# tar zxf nginx-1.9.2.tar.gz
# tar zxf php-5.6.10.tar.gz
# tar zxf libmcrypt-2.5.8.tar.gz
--Decompression
# yum-y Install gcc gcc-c++ autoconf automake libtool make zlib zlib-devel OpenSSL openssl-devel pcre-devel
--The dependencies required to install Nginx
# CD nginx-1.9.2
--Enter Directory
# Groupadd-r www
# useradd-s/sbin/nologin-g www-r www
--Create WWW user and user groups
#./configure--prefix=/usr/local/nginx--user=www--group=www
--Configure Nginx
# Make && make install
--Installation Nginx
--Copy the Nginx and PHP-FPM of the installation package to the/etc/init.d/directory
# CP ~/nginx/etc/init.d/nginx
# CP ~/PHP-FPM/ETC/INIT.D/PHP-FPM
# chmod A+x/etc/init.d/nginx
# chmod A+X/ETC/INIT.D/PHP-FPM
--Grant execution permissions to two files
# CD: /libmcrypt-2.5.8
--Enter the Libmcrypt directory
#./configure
--Configuration Libmcrypt
# Make && make install
--Compile and install Libmcrypt
# ln-s/usr/local/lib/libmcrypt.la/usr/lib/libmcrypt.la
# ln-s/usr/local/lib/libmcrypt.so/usr/lib/libmcrypt.so
# ln-s/usr/local/lib/libmcrypt.so.4/usr/lib/libmcrypt.so.4
# ln-s/usr/local/lib/libmcrypt.so.4.4.8/usr/lib/libmcrypt.so.4.4.8
--Create a shortcut
# CD: /php-5.6.10
--Enter the PHP installation directory
# yum-y Install libxml2-devel bzip2 bzip2-devel curl-devel gd gd-devel
--Installation of PHP dependencies
#./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--enable-fpm--with-fpm-user=www-- With-fpm-group=www--enable-sockets--enable-mbstring--enable-sysvsem--enable-sysvshm--enable-gd-native-ttf-- Enable-mbregex--enable-zip--enable-pcntl--enable-inline-optimization--disable-debug--with-mhash--with-mcrypt-- With-mysql--with-mysqli--with-pdo--with-pdo-mysql--with-curl--with-bz2--with-zlib--with-pcre-regex-- With-openssl-dir=/usr/lib/openssl--with-openssl--with-gd--with-jpeg-dir--with-png-dir--with-freetype-dir-- With-png-dir
--Configure PHP
# Make && make install
--Compile and install PHP
# CP ~/php-fpm.conf/usr/local/php/etc/
# CP ~/php.ini/usr/local/php/etc/
# vim/usr/local/nginx/conf/nginx.conf
Location ~ \.php$ {
root HTML;
Fastcgi_pass Unix:/tmp/php-cgi.sock;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
#fastcgi_param Script_filename/scripts$fastcgi_script_name;
Include Fastcgi_params;
}
# Vim/usr/local/nginx/conf/fastcgi_params
--Modification of nginx configuration files and Fastcgi_params configuration is mainly to modify Nginx execution user and pathinfo support
Set $script $uri;
Set $path _info "";
if ($uri ~ "^ (. +\.php) (/.+)") {
Set $script $;
Set $path _info;
}
Fastcgi_param Script_name $script;
Fastcgi_param path_info $path _info;
# mkdir-p/tmp/session
--Create a session store directory for PHP
# Chown-r Www.www/tmp/session
--Give the WWW user permission
# service PHP-FPM Start
# Service PHP-FPM Restart
--Start and restart PHP
# service Nginx Start
# Service Nginx Restart
--Start and restart Nginx
# Vim/etc/sysconfig/iptables
--Adjust firewall modify port 80 to allow access-------find me-------
# Service Iptables Restart
--Restart firewall using edit rules
# vim/usr/local/nginx/html/index.php
--Establish a index.php write phpinfo () browser access is OK
# cd/usr/local/nginx/html/
--Go to the web directory
# RM-RF./*
--Delete all files from the current directory
# CP ~/123.docx./
--Copy the 123.docx just now to the current directory
# vim index.php
--Content like the index.php I gave
# ln-s/usr/local/php/bin/php/usr/bin/php
--Put PHP in the system directory so that PHP can be used directly
# vim/etc/sudoers
--Edit this file
--Add the following line under Root all= (All)
www all= (All) Nopasswd:all
--Modify Defaults Requiretty front plus a # number
Swftools
Download path
Http://www.swftools.org/download.html
1. Install the required libraries and components. The machine has been installed before, the main installation is the following components. If you do not install it will prompt machine ' x86_64-unknown-linux ' not recognized
Yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
2. Download and compile the installation swftools.
wget http://www.swftools.org/swftools-0.9.2.tar.gz
Tar vxzf swftools-0.9.2.tar.gz
CD swftools-0.9.2
./configure--prefix=/usr/swftools
Make
Make install
3, set swftools environment variable, make pdf2swf an executable command
Vim/etc/profile
Export path= $PATH:/usr/swftools/bin/
4, install Xpdf language Pack. Download the xpdf-chinese-simplified.tar.gz file, unzip it to/usr/share/xpdf, edit the ADD-TO-XPDFRC file,
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the word to PDF to SWF to achieve online preview Word file features, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.