Mediawiki1.27升级

来自ling
跳转至: 导航搜索

文件下载

配置Apache

  • Apache\conf
  1. 设置Define SRVROOT "/Apache24" 为 Define SRVROOT "D:/server/Apache2.4"
  2. Listen 80 Listen 7090
  3. 设置
  4. DocumentRoot "${SRVROOT}/htdocs" DocumentRoot "D:/server/phpserver"
  5. ServerName localhost:80 ServerName localhost:7090
  6. Include conf/extra/httpd-ahssl.conf 注释掉
  7. 添加phpserver权限并重启
<Directory "D:/server/phpserver">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
  1. LoadModule 最后添加
PHPIniDir "D:/server/php/php-7.0.8-Win32-VC14-x86/"
LoadModule php7_module "D:/server/php/php-7.0.8-Win32-VC14-x86/php7apache2_4.dll"
  1. <IfModule mime_module>后添加
AddType application/x-httpd-php .php .html .htm
  1. 参考http://www.cnblogs.com/wangqishu/p/5028031.html
  • 管理员打开cmd
  1. d:
  2. cd D:/server/Apache2.4/bin
  3. httpd -k install

D:\server\Apache2.4\bin>httpd -k install [Fri Jul 08 22:15:02.689562 2016] [mpm_winnt:error] [pid 2748:tid 416] AH00433: Apache2.4: Service is already installed.

配置php

  1. 配置php.ini。 打开php目录,复制1个php.ini-production ,修改为php.ini。
  2. 开启
extension_dir = "D:/server/php/php-7.0.8-Win32-VC14-x86/ext"
extension=php_mysqli.dll
      extension=php_mbstring.dll 去掉分号             extension=php_mbstring.dll
   把输出处理程序设为mbstring对应。    ;output_handler =    output_handler = "mb_output_handler"
   设定文字集为UTF-8。    ;default_charset = "iso-8859-1"     default_charset = "UTF-8"
   设置mbstring的语言为Chinese    ;mbstring.language = Japanese     mbstring.language = Chinese
   设置mbstring的内部编码为UTF-8。    ;mbstring.internal_encoding = EUC-JP     mbstring.internal_encoding = UTF-8
   设置mbstring的输入文字编码为自动判别方式。    ;mbstring.http_input = auto     mbstring.http_input = UTF-8
   把mbstring输出文字编码设为UTF-8。    ;mbstring.http_output = SJIS    mbstring.http_output = UTF-8
   激活mbstring的文字编码自动变换方式。    ;mbstring.encoding_translation = Off     mbstring.encoding_translation = On

更多参考 http://php.net/manual/zh/mbstring.configuration.php#ini.mbstring.language

安装wiki

  • 备份原来文件
  • 解压到D:/server/phpserver
  • 重新安装
  • 设置wiki
$wgDBmysql5 = true;

末尾添加

$wgUploadDirectory="D:/server/wikidata";
$wgHashedUploadDirectory = true;
$wgUseSharedUploads= true;
$wgHashedSharedUploadDirectory=false;
$wgExternalLinkTarget = '_blank';

linux

wget http://cn2.php.net/distributions/php-7.0.8.tar.gz
解压安装
# tar zxvf php-7.0.8.tar.gz
# cd php-7.0.8
首先查看安装帮助
./configure   --help
./configure --prefix=/alidata/server/php-7.0.8 \
 --enable-opcache \
 --with-config-file-path=/alidata/server/etc \
 --with-curl \
 --with-freetype-dir \
 --with-gd \
 --with-gettext \
 --with-iconv-dir \
 --with-kerberos \
 --with-libdir=lib64 \
 --with-libxml-dir \
 --with-mysqli \
 --with-openssl \
 --with-pcre-regex \
 --with-pdo-mysql \
 --with-pdo-sqlite \
 --with-pear \
 --with-png-dir \
 --with-xmlrpc \
 --with-xsl \
 --with-zlib \
 --enable-fpm \
 --enable-bcmath \
 --enable-libxml \
 --enable-inline-optimization \
 --enable-gd-native-ttf \
 --enable-mbregex \
 --enable-mbstring \
 --enable-opcache \
 --enable-pcntl \
 --enable-shmop \
 --enable-soap \
 --enable-sockets \
 --enable-sysvsem \
 --enable-xml \
--enable-fpm \
--enable-fastcgi \
--enable-static \
--enable-inline-optimization \
--enable-sockets \
--enable-wddx \
--enable-zip \
--enable-calendar \
--enable-bcmath \
--enable-soap \
--with-zlib \
--with-iconv \
--with-gd \
--with-xmlrpc \
--enable-mbstring \
 --without-sqlite \
 --with-curl \
 --enable-ftp \
 --with-mcrypt  \
 --with-freetype-dir=/usr/local/freetype.2.1.10 \
 --with-jpeg-dir=/usr/local/jpeg.6 \
 --with-png-dir=/usr/local/libpng.1.2.50 \
 --disable-ipv6 \
 --disable-debug \
 --with-openssl \
 --disable-maintainer-zts \
 --disable-safe-mode \
 --disable-fileinfo  \
 --enable-zip
如果配置错误,需要安装需要的模块,直接yum一并安装依赖库
yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel MySQL pcre-devel

注意:安装php7beta3的时候有几处配置不过去,需要yum一下,现在php-7.0.2已经不用这样了。
yum -y install curl-devel
yum -y install libxslt-devel

编译安装
 make &&  make install


配置文件
cp php.ini-development /usr/local/php/lib/php.ini
# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
# cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
# cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm

需要注意的是php7中www.conf这个配置文件配置phpfpm的端口号等信息,如果你修改默认的9000端口号需在这里改,再改nginx的配置
启动
#  /etc/init.d/php-fpm

查看phpinfo()

参考http://blog.csdn.net/21aspnet/article/details/47708763