The mediawiki service was installed today, using a version of mediawiki-1.5.2, with the following installation steps:
1. download the following software
Php-4.3.9.tar.gz
Apache_1.3.33.tar.gz
Mysql-4.0.21.tar.gz
Mediawiki-1.5.2.tar.gz
Copy the downloaded software to the server over ftp (/home/funpower)
2. install apache and php
# Cd/home/funpower
# Tar zxvf apache_1.3.33.tar.gz
# Tar zxvf php-4.3.9.tar.gz
# Cd apache_1.3.33
#./Configure -- prefix =/usr/local/apache
# Cd php-4.3.9
#./Configure -- with-apache = ../apache_1.3.33 -- with-mysql -- disable-debug -- enable-track-vars
# Cp php. ini-dist/usr/local/lib
# Cd/usr/local/lib
# Mv php. ini-dist php. ini
# Cd apache_1.3.33
#./Configure -- prefix =/usr/local/apache -- activate-module = src/modules/php4/libphp4.a
# Make
# Make install
Configure/usr/local/apache/conf/httpd. conf
Join:
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Modify the following items:
Servername itnew.3322.org
DirectoryIndex index. php
Add apache to the startup Item:
# Ee/etc/rc. local
Add the following line:
/Usr/local/apache/bin/apachectl start
Restart the server, create a test. php file under/usr/local/apache/htdocs, and enter http://yourdomain.com/test.php. If you can see the php-4.3.9information, apacheand php are successfully installed.
3. Install mysql
# Cd/home/funpower
# Pw groupadd mysql
# Pw adduser mysql-g mysql-s/nonexitent
# Tar zxvf mysql-4.0.21.tar.gz
#./Configure -- prefix =/usr/local/mysql
# Make
# Make install
So far, mysql installation is complete, and the specific configuration is started below.
Run scripts
# Cd scripts
#./Mysql_install_db
Change file and directory permissions
# Chown-R root/usr/local/mysql
# Chown-R mysql/usr/local/mysql/var
# Chgrp-R mysql/usr/local/mysql
Copy the configuration file to/etc
# Cp ../support-files/my-medium.cnf/etc/my. cnf
Add a STARTUP script to enable mysql to start with the System
# Echo "/usr/local/mysql/bin/mysqld_safe -- user = mysql &">/etc/rc. local
Start mysql
# Cd/usr/local/mysql/bin
#./Mysqld_safe -- user = mysql &
Change the root password of mysql
# Cd/usr/local/mysql/bin
#./Mysqladmin-u root password '000000'
Copy libmysqlclient. so.10 of mysql
# Cp/usr/local/mysql/lib/mysql/*/usr/lib
# Cp/usr/local/mysql/include/mysql/*/usr/include
Add the database and database username used by wiki
# Cd/usr/local/mysql/bin
#./Mysql-u root-p
Mysql> create database wikidb;
Mysql> grant all on wikidb. * to wikidb @ localhost identified by '123 ';
Mysql> flush privileges;
Mysql> exit
4. Install mediawiki
# Cd/home/funpower
# Tar zxvf mediawiki-1.5.2.tar.gz
# Mkdir/usr/local/apache/htdocs/wiki
# Cd mediawiki-1.5.2
# Cp-R */usr/local/apache/htdocs/wiki
Enter http: // 127.0.0.1/wiki/In the IE browser, enter some basic wiki installation parameters, and enter the database and database username as the database you just created. Click "Install" to complete the installation.
Complete the last steps:
# Cd/usr/local/apache/htdocs/wiki/config
# Cp LocalSettings. php ../
# Cd ../
# Mv config. bak
Visit http: // 127.0.0.1/wiki/. The homepage is displayed. The installation is successful!