User talk:Wiki-zhubin

--Wiki-zhubin (talk) 04:42, 24 October 2014 (UTC) == 基于linux系统mediawiki的安装 == 1.基础包安装yum -y install gcc gcc-c++ make automake ncurses-devel zlib-devel 2.编译安装libxml2 3.# tar zxvf libxml2-2.6.32.tar.gz 4.# cd libxml2-2.6.32 5.# ./configure --prefix=/usr/local/libxml2/ 6.# make && make install 7.#编译安装apache 8.# tar zxvf httpd-2.2.6.tar.gz 9.# cd httpd-2.2.6 10.# ./configure --prefix=/usr/local/apache --enable-so 11.# make && make install 12.启动apache： 13.# /usr/local/apache/bin/apachectl start 14.IE访问http://ip/，出现”It works!”，apache安装成功. 15. 安装配置MySQL 16.# tar zxvf mysql-5.0.22.tar.gz 17.# cd mysql-5.0.22 18.# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data/ --without-innodb --without-debug --with-extra-charsets=gbk --with-extra-charsets=all --enable-assembler --with-pthread --enable-thread-safe-client --with-client-ldflags=-all-static 19.配置成功出现“Thank you for choosing MySQL!”提示. 若不行 会提示没安装基础包 20.# make && make install 21.编译完毕. 22.# cp ./support-files/mysql.server /etc/init.d/mysql 23.# groupadd mysql 24.# useradd -g mysql mysql 25.# chmod 777 /etc/init.d/mysql 26.# /usr/local/mysql/bin/mysql_install_db 27.# chown -R mysql:mysql /usr/local/mysql/data/ 28.# service mysql start          //启动mysql 29.# /usr/local/mysql/bin/mysqladmin –u root –p password 'rootpw' 30.Enter password:    //默认密码为空，所以直接回车 31.# /usr/local/mysql/bin/mysql -u root -p 32.Enter password:                 //输入新密码后，登录成功 33. 34.接着把wiki要用的数据库及用户和权限创建： 35.create database wikidb; 36.grant all on wikidb.* to root; 37.grant all on wikidb.* to root@localhost; 38.grant all on wikidb.* to wikiuser; 39.grant all on wikidb.* to wikiuser@localhost; 40.set password for wikiuser@localhost=password('wikipw'); 41.数据库安装及配置全部完毕. 42.#安装配置PHP 43.Yum -y install php php-gd php-mysql 44. 45.修改apache配置文件httpd.conf 46.# vi /usr/local/apache2/conf/httpd.conf 47.在#AddType application/x-tar.tgz下加一行: 48.AddType application/x-httpd-php .php 49.在#LoadModule foo_module modules/mod_foo.so下加一行: 如果原来有就去掉#号 50.LoadModule php5_module modules/libphp5.so   51.找到DirectoryIndex index.html在后面添加 index.php 52.保存httpd.conf文件. 53.重启动apache 54.# /usr/local/apache22/bin/apachectl stop 55.# /usr/local/apache22/bin/apachectl start 56.写一个测试页,放到/var/www/html目录下,打开浏览器访问应该可以看到php的版本等信息. php测试页代码如下： 安装Mediawiki 57.# tar zxvf mediawiki-1.16.4.tar.gz 58.# mv mediawiki-1.15.1 /var/www/html/wiki 59.# chown -R root:root /var/www/html/wiki/ 60.# chmod a+w /var/www/html/wiki/config 61.通过浏览器访问http://ip/wiki/config/index.php开始安装检测向导. 62.此页面会显示Checking environment...，检查系统环境的信息，这里会显示一些系统安装的相关软件信息，及错误警告信息，可以看情况考虑是否需要解决警告信息. 63.只要最后一行显示“Environment checked. You can install MediaWiki.”，就可以继续安装wiki.

这是你不知道的事
人生若只如初见，何事秋风悲画扇. 等闲变却故人心，却道故人心易变.