mediawiki, nginx, PHP, PostgreSQL, zhparser on CentOS 6.4 x64-阿里云开发者社区

开发者社区> 德哥> 正文

mediawiki, nginx, PHP, PostgreSQL, zhparser on CentOS 6.4 x64

简介:
+关注继续查看
本文介绍一下如何部署wiki网站.
目前wikimedia网站的架构 : 
mediawiki, nginx, PHP, PostgreSQL, zhparser on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
本文测试环境 : 
CentOS 6.x x64
mediawiki 1.23.1
php 5.5.14
nginx 1.6.0
PostgreSQL 9.3.x
zhparser 中文分词


mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
选择mediawiki 的 lts版本. 
# wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz
# tar -zxvf mediawiki-1.23.1.tar.gz 
# mv mediawiki-1.23.1 /opt/site/mediawiki

配置数据库 : 
[root@db-172-16-3-150 soft_bak]# su - pg93
pg93@db-172-16-3-150-> cd /ssd4/pg93
pg93@db-172-16-3-150-> mkdir tbs_mediawiki
pg93@db-172-16-3-150-> psql
psql (9.3.3)
Type "help" for help.

digoal=# create role mediawiki nosuperuser login encrypted password 'mediawiki';
CREATE ROLE
digoal=# create tablespace tbs_mediawiki location '/ssd4/pg93/tbs_mediawiki';
CREATE TABLESPACE
digoal=# create database mediawiki with template template0 encoding 'UTF8' tablespace tbs_mediawiki owner mediawiki;
CREATE DATABASE
digoal=# \c mediawiki mediawiki
You are now connected to database "mediawiki" as user "mediawiki".
mediawiki=> create schema mediawiki;
CREATE SCHEMA

配置PostgreSQL 中文全文检索功能
# wget http://www.xunsearch.com/site/downfile?file=xunsearch-full-latest.tar.bz2
# tar -jxvf xunsearch-full-latest.tar.bz2
[root@db-172-16-3-150 soft_bak]# cd xunsearch-full-1.4.8/
[root@db-172-16-3-150 xunsearch-full-1.4.8]# ll
total 20
drwxr-xr-x 2 pg90 games  4096 Jul 14 09:47 packages
-rw-r--r-- 1 pg90 games  2937 Jul  2  2012 README.md
-rwxr-xr-x 1 pg90 games 11069 Aug 27  2013 setup.sh
[root@db-172-16-3-150 xunsearch-full-1.4.8]# cd packages/
[root@db-172-16-3-150 packages]# ll
total 9744
-rw-r--r-- 1 pg90 games  694445 Aug 27  2013 libevent-2.0.21-stable.tar.bz2
-rw-r--r-- 1 pg90 games  160888 Sep 21  2011 libuuid-1.0.0.tar.bz2
-rw-r--r-- 1 pg90 games      42 Sep  6  2011 README
-rw-r--r-- 1 pg90 games  434924 Aug 23  2013 scws-1.2.3-dev.tar.bz2
-rw-r--r-- 1 pg90 games 4090111 Dec 30  2010 scws-dict-chs-utf8.tar.bz2
-rw-r--r-- 1 pg90 games 3476028 Aug 16  2013 xapian-core-scws-1.2.15.tar.bz2
-rw-r--r-- 1 pg90 games  676474 Dec 11  2013 xunsearch-1.4.8.tar.bz2
-rw-r--r-- 1 pg90 games  423087 Dec 11  2013 xunsearch-sdk-1.4.8.zip
[root@db-172-16-3-150 packages]# tar -jxvf scws-1.2.3-dev.tar.bz2
[root@db-172-16-3-150 packages]# cd scws-1.2.3-dev
[root@db-172-16-3-150 scws-1.2.3-dev]# ./configure --prefix=/opt/scws-1.2.3-dev && make && make install
[root@db-172-16-3-150 scws-1.2.3-dev]# cd /opt/soft_bak/
[root@db-172-16-3-150 soft_bak]# git clone https://github.com/amutu/zhparser.git
[root@db-172-16-3-150 soft_bak]# cd zhparser/
[root@db-172-16-3-150 zhparser]# export PATH=/home/pg93/pgsql/bin:$PATH
[root@db-172-16-3-150 zhparser]# which pg_config
/home/pg93/pgsql/bin/pg_config
# SCWS_HOME=/opt/scws-1.2.3-dev make
# make install
[root@db-172-16-3-150 zhparser]# su - pg93
pg93@db-172-16-3-150-> psql mediawiki postgres
psql (9.3.3)
Type "help" for help.

mediawiki=# create extension zhparser;
CREATE EXTENSION
mediawiki=# select * from pg_ts_parser ;
 prsname  | prsnamespace |  prsstart   |    prstoken     |  prsend   |  prsheadline  |  prslextype   
----------+--------------+-------------+-----------------+-----------+---------------+---------------
 default  |           11 | prsd_start  | prsd_nexttoken  | prsd_end  | prsd_headline | prsd_lextype
 zhparser |         2200 | zhprs_start | zhprs_getlexeme | zhprs_end | prsd_headline | zhprs_lextype
(2 rows)

mediawiki=# CREATE TEXT SEARCH CONFIGURATION testzhcfg (PARSER = zhparser);
CREATE TEXT SEARCH CONFIGURATION
mediawiki=# select * from pg_ts_config where cfgname='testzhcfg';
  cfgname  | cfgnamespace | cfgowner | cfgparser 
-----------+--------------+----------+-----------
 testzhcfg |         2200 |       10 |     37586
(1 row)



mediawiki=# ALTER TEXT SEARCH CONFIGURATION testzhcfg ADD MAPPING FOR n,v,a,i,e,l WITH simple;
ALTER TEXT SEARCH CONFIGURATION
mediawiki=# select * from pg_ts_config_map where mapcfg=(select oid from pg_ts_config where cfgname='testzhcfg');
 mapcfg | maptokentype | mapseqno | mapdict 
--------+--------------+----------+---------
  37587 |          110 |        1 |    3765
  37587 |          118 |        1 |    3765
  37587 |           97 |        1 |    3765
  37587 |          105 |        1 |    3765
  37587 |          101 |        1 |    3765
  37587 |          108 |        1 |    3765
(6 rows)

mediawiki=# SELECT * FROM ts_parse('zhparser', 'hello world! 2010年保障房建设在全国范围内获全面启动,从中央到地方纷纷加大 了 保 障  房 的 建 设 和 投 入 力 度 。2011年,保障房进入了更大规模的建设阶段。住房城乡建设部党组书记、部长姜伟新去年底在全国住房城乡建设工作 会议上表示,要继续推进保障性安居工程建设。');
 tokid |  token   
-------+----------
   101 | hello
   101 | world
   117 | !
   101 | 2010
   113 | 年
   118 | 保障
   110 | 房建
   118 | 设在
   110 | 全国
   110 | 范围
   102 | 内
   118 | 获
    97 | 全面
   118 | 启动
   117 | ,
   110 | 从中
   118 | 央
   118 | 到
   110 | 地方
   100 | 纷纷
   118 | 加大
   118 | 了
   118 | 保
   110 | 障
   110 | 房
   117 | 的
   118 | 建
   118 | 设
    99 | 和
   118 | 投
   118 | 入
   110 | 力
   107 | 度
   117 | 。
   101 | 2011
   113 | 年
   117 | ,
   118 | 保障
   110 | 房
   118 | 进入
   118 | 了
   100 | 更
   110 | 大规模
   117 | 的
   118 | 建设
   110 | 阶段
   117 | 。
   110 | 住房
   110 | 城乡建设
   110 | 部党组
   110 | 书记
   117 | 、
   110 | 部长
   110 | 姜伟新
   116 | 去年底
   112 | 在
   110 | 全国
   110 | 住房
   110 | 城乡建设
   118 | 工作
   110 | 会议
   110 | 上表
   118 | 示
   117 | ,
   118 | 要
   118 | 继续
   118 | 推进
   110 | 保障性
   118 | 安居
   110 | 工程建设
   117 | 。
(71 rows)

mediawiki=# SELECT to_tsvector('testzhcfg','“今年保障房新开工数量虽然有所下调,但实际的年度在建规模以及竣工规模会超以往年份,相对应的对资金的需求也会创历史纪录。”陈国强说。在他看来,与2011年相比,2012年的保障房建设在资金配套上的压力将更为严峻。');
                                                                                                                                    
                          to_tsvector                                                                                               
                                                               
------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------
 '2011':27 '2012':29 '上':35 '下调':7 '严峻':37 '会':14 '会创':20 '保障':1,30 '历史':21 '压力':36 '国强':24 '在建':10 '实际':8 '对应
':17 '年份':16 '年度':9 '开工':4 '房':2 '房建':31 '数量':5 '新':3 '有所':6 '相比':28 '看来':26 '竣工':12 '纪录':22 '规模':11,13 '设
':32 '说':25 '资金':18,33 '超':15 '配套':34 '陈':23 '需求':19
(1 row)

mediawiki=# SELECT to_tsquery('testzhcfg', '保障房资金压力');
           to_tsquery            
---------------------------------
 '保障' & '房' & '资金' & '压力'
(1 row)

设置mediawiki数据库的默认分词为中文分词.
digoal=# alter database mediawiki set default_text_search_config='testzhcfg';


配置nginx, 参考 http://wiki.nginx.org/MediaWiki
[root@db-172-16-3-150 zhparser]# cd /etc/nginx/conf.d
[root@db-172-16-3-150 conf.d]# cp default.conf default.conf.bak
[root@db-172-16-3-150 conf.d]# vi default.conf
server {
        server_name digoal;
        root /opt/site/mediawiki;    ## <-- Your only path reference.
 
        # Enable compression, this will help if you have for instance advagg? module
        # by serving Gzip versions of the files.
        gzip_static on;
 
        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }
 
        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }
 
        # This matters if you use drush prior to 5.x
        # After 5.x backups are stored outside the Drupal install.
        #location = /backup {
        #        deny all;
        #}
 
        # Very rarely should these ever be accessed outside of your lan
        location ~* \.(txt|log)$ {
                allow 172.16.0.0/16;
                deny all;
        }
 
        location ~ \..*/.*\.php$ {
                return 403;
        }
 
        # No no for private
        location ~ ^/sites/.*/private/ {
                return 403;
        }
 
        # Block access to "hidden" files and directories whose names begin with a
        # period. This includes directories used by version control systems such
        # as Subversion or Git to store control files.
        location ~ (^|/)\. {
                return 403;
        }
 
        location / {
                # This is cool because no php is touched for static content
                try_files $uri @rewrite;
        }
 
        location @rewrite {
                # You have 2 options here
                # For D7 and above:
                # Clean URLs are handled in drupal_environment_initialize().
                rewrite ^ /index.php;
                # For Drupal 6 and bwlow:
                # Some modules enforce no slash (/) at the end of the URL
                # Else this rewrite block wouldn't be needed (GlobalRedirect)
                #rewrite ^/(.*)$ /index.php?q=$1;
        }
 
        location ~ \.php$ {
                root /opt/site/mediawiki;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        }
 
        # Fighting with Styles? This little gem is amazing.
        # This is for D6
        #location ~ ^/sites/.*/files/imagecache/ {
        # This is for D7 and D8
        location ~ ^/sites/.*/files/styles/ {
                try_files $uri @rewrite;
        }
 
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }
}

[root@db-172-16-3-150 conf.d]# service nginx restart
Stopping nginx: [  OK  ]
Starting nginx: [  OK  ]



配置mediawiki
http://172.16.3.150/mw-config/index.php

mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research

解决对象缓存的问题, 安装php-apc.

[root@db-172-16-3-150 conf.d]# yum install -y php-apc
[root@db-172-16-3-150 conf.d]# service php-fpm restart
Stopping php-fpm: [  OK  ]
Starting php-fpm: [  OK  ]


解决PCRE_UTF8的问题.
这个报错来自 /opt/site/mediawiki/includes/installer/Installer.php

        protected function envCheckPCRE() {
                wfSuppressWarnings();
                $regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' );
                // Need to check for \p support too, as PCRE can be compiled
                // with utf8 support, but not unicode property support.
                // check that \p{Zs} (space separators) matches
                // U+3000 (Ideographic space)
                $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" );
                wfRestoreWarnings();
                if ( $regexd != '--' || $regexprop != '--' ) {
                        $this->showError( 'config-pcre-no-utf8' );

                        return false;
                }

                return true;
        }

把这一段拷贝到一个脚本里面执行
# vi test.php
<?php
$regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' );
                // Need to check for \p support too, as PCRE can be compiled
                // with utf8 support, but not unicode property support.
                // check that \p{Zs} (space separators) matches
                // U+3000 (Ideographic space)
                $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" );

var_dump($regexd);
var_dump($regexprop);

# /usr/bin/php ./test.php
string(7) "-?????-"
string(2) "--"

确实, RPM安装的php有问题.
因为pcre已经打包到php-common, 并没有使用服务器安装的pcre包.
例如系统安装的pcre带了utf8选项. 版本是7.8

[root@db-172-16-3-150 etc]# which pcretest
/usr/bin/pcretest
[root@db-172-16-3-150 etc]# pcretest -C
PCRE version 7.8 2008-09-05
Compiled with
  UTF-8 support
  Unicode properties support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack
[root@db-172-16-3-150 etc]# rpm -qf /usr/bin/pcretest
pcre-7.8-6.el6.x86_64
但是php安装的是8.3的pcre, 显然没有使用系统的7.8版本.
# php -i
pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.32 2012-11-30

Directive => Local Value => Master Value
pcre.backtrack_limit => 100000 => 100000
pcre.recursion_limit => 100000 => 100000


解决办法是自行编译安装php, 并且指定pcre库.
The PCRE extension is a core PHP extension, so it is always enabled. By default, this extension is compiled using the bundled PCRE library. Alternatively, an external PCRE library can be used by passing in the --with-pcre-regex=DIR configuration option where DIR is the location of PCRE's include and library files.

安装php

wget http://cn2.php.net/distributions/php-5.5.14.tar.bz2
tar -jxvf php-5.5.14.tar.bz2
cd php-5.5.14
指定pcre库和pcre.h
# rpm -ql pcre-devel
/usr/bin/pcre-config
/usr/include/pcre.h
/usr/include/pcre_scanner.h
/usr/include/pcre_stringpiece.h
/usr/include/pcrecpp.h
/usr/include/pcrecpparg.h
/usr/include/pcreposix.h
/usr/lib64/libpcre.so

# cp /usr/include/pcre.h /usr/lib64
# ./configure --with-pcre-regex=/usr/lib64 --enable-fpm --enable-opcache --with-pdo-pgsql=/home/pg93/pgsql/bin --with-pgsql=/home/pg93/pgsql/bin
# make && make install

/bin/sh /root/php-5.5.14/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /root/php-5.5.14/modules
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP FPM binary:        /usr/local/sbin/
Installing PHP FPM config:        /usr/local/etc/
Installing PHP FPM man page:      /usr/local/php/man/man8/
Installing PHP FPM status page:      /usr/local/php/fpm/
Installing PHP CGI binary:        /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.11
[PEAR] Console_Getopt - already installed: 1.3.1
[PEAR] PEAR           - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
/root/php-5.5.14/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/

# cp /root/php-5.5.14/php.ini-production /usr/local/lib/php.ini

# php --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)


配置php-fpm
# cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
# service php-fpm stop
# chkconfig php-fpm off

# 使用新装的php-fpm启动
# /usr/local/sbin/php-fpm -R -y /usr/local/etc/php-fpm.conf


mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
因为自行编译了php, 所以警告需要另外安装apc和intl.
对应的包是 : 

php-pecl-apc-3.1.15-0.4.20130912.el6.remi.5.4.x86_64
php-intl-5.4.30-1.el6.remi.x86_64

安装参考 : 

# pecl install intl
如果遇到这个错误, 需要安装libicu-devel libicu. 
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
最好安装最新的.不要使用yum安装.
wget http://download.icu-project.org/files/icu4c/53.1/icu4c-53_1-src.tgz
tar -zxvf icu4c-53_1-src.tgz
cd icu/source
# ./configure --enable-shared
# make && make install
[root@db-172-16-3-150 local]# icu-config --version
53.1
[root@db-172-16-3-150 local]# which icu-config
/usr/local/bin/icu-config
安装intl
# pecl install intl
...
Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/intl.so'
install ok: channel://pecl.php.net/intl-3.0.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=intl.so" to php.ini

配置 intl.
[root@db-172-16-3-150 php-5.5.14]# echo "extension=intl.so" >>/usr/local/lib/php.ini 
[root@db-172-16-3-150 php-5.5.14]# ps -ewf|grep fpm
root      8963     1  0 15:47 ?        00:00:00 php-fpm: master process (/usr/local/etc/php-fpm.conf)
nobody    8964  8963  0 15:47 ?        00:00:00 php-fpm: pool www                                
nobody    8965  8963  0 15:47 ?        00:00:00 php-fpm: pool www                                
root     12112  8977  0 16:07 pts/1    00:00:00 grep fpm
[root@db-172-16-3-150 php-5.5.14]# kill 8963
[root@db-172-16-3-150 php-5.5.14]# php-fpm -R -y /usr/local/etc/php-fpm.conf


现在就差apc模块了, 但是好像有BUG. 无法安装.
# pecl install apc
/tmp/pear/temp/APC/apc_compile.c: In function ‘my_copy_class_entry’:
/tmp/pear/temp/APC/apc_compile.c:755: warning: assignment from incompatible pointer type
/tmp/pear/temp/APC/apc_compile.c: In function ‘apc_copy_class_entry_for_execution’:
/tmp/pear/temp/APC/apc_compile.c:1956: warning: assignment from incompatible pointer type
/tmp/pear/temp/APC/apc_compile.c: In function ‘apc_copy_trait_alias’:
/tmp/pear/temp/APC/apc_compile.c:2379: error: ‘zend_trait_alias’ has no member named ‘function’
/tmp/pear/temp/APC/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/tmp/pear/temp/APC/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/tmp/pear/temp/APC/apc_compile.c: In function ‘apc_copy_trait_precedence’:
/tmp/pear/temp/APC/apc_compile.c:2416: error: ‘zend_trait_precedence’ has no member named ‘function’
/tmp/pear/temp/APC/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
/tmp/pear/temp/APC/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
make: *** [apc_compile.lo] Error 1
ERROR: `make' failed


mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
配置数据库连接
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
配置网页数据库账号
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
配置账号
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
配置wiki.
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research

修改images的权限.

[root@db-172-16-3-150 mediawiki]# cd /opt/site/mediawiki/
[root@db-172-16-3-150 mediawiki]# chmod -R 777 images


mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
 
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
这个警告, 需要配置一下php.ini.

# vi /usr/local/lib/php.ini
allow_url_fopen = On
[root@db-172-16-3-150 images]# ps -ewf|grep fpm
root      3912     1  0 16:48 ?        00:00:00 php-fpm: master process (/usr/local/etc/php-fpm.conf)
nobody    3913  3912  0 16:48 ?        00:00:04 php-fpm: pool www                        
nobody    3914  3912  0 16:48 ?        00:00:04 php-fpm: pool www                        
root      4392  8977  0 17:05 pts/1    00:00:00 grep fpm
[root@db-172-16-3-150 images]# kill 3912
[root@db-172-16-3-150 images]# php-fpm -R -y /usr/local/etc/php-fpm.conf
继续


mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research
下载这个文件LocalSettings.php, 并放到/opt/site/mediawiki/
然后就可以点击"进入您的wiki了"
mediawiki, nginx, PHP, PostgreSQL on CentOS 6.4 x64 - 德哥@Digoal - PostgreSQL research

[其他]
1. 数据库在这里使用了短连接, 所以我们可以使用pgbouncer来作为连接池.

[参考]

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
怎么设置阿里云服务器安全组?阿里云安全组规则详细解说
阿里云服务器安全组设置规则分享,阿里云服务器安全组如何放行端口设置教程
7234 0
阿里云服务器ECS远程登录用户名密码查询方法
阿里云服务器ECS远程连接登录输入用户名和密码,阿里云没有默认密码,如果购买时没设置需要先重置实例密码,Windows用户名是administrator,Linux账号是root,阿小云来详细说下阿里云服务器远程登录连接用户名和密码查询方法
3231 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
4561 0
使用OpenApi弹性释放和设置云服务器ECS释放
云服务器ECS的一个重要特性就是按需创建资源。您可以在业务高峰期按需弹性的自定义规则进行资源创建,在完成业务计算的时候释放资源。本篇将提供几个Tips帮助您更加容易和自动化的完成云服务器的释放和弹性设置。
8066 0
windows server 2008阿里云ECS服务器安全设置
最近我们Sinesafe安全公司在为客户使用阿里云ecs服务器做安全的过程中,发现服务器基础安全性都没有做。为了为站长们提供更加有效的安全基础解决方案,我们Sinesafe将对阿里云服务器win2008 系统进行基础安全部署实战过程! 比较重要的几部分 1.
5511 0
阿里云服务器安全组设置内网互通的方法
虽然0.0.0.0/0使用非常方便,但是发现很多同学使用它来做内网互通,这是有安全风险的,实例有可能会在经典网络被内网IP访问到。下面介绍一下四种安全的内网互联设置方法。 购买前请先:领取阿里云幸运券,有很多优惠,可到下文中领取。
9477 0
腾讯云服务器 设置ngxin + fastdfs +tomcat 开机自启动
在tomcat中新建一个可以启动的 .sh 脚本文件 /usr/local/tomcat7/bin/ export JAVA_HOME=/usr/local/java/jdk7 export PATH=$JAVA_HOME/bin/:$PATH export CLASSPATH=.
2211 0
+关注
德哥
公益是一辈子的事, I&#39;m digoal, just do it.
2153
文章
245
问答
文章排行榜
最热
最新
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载