CentOS 5.4 base # yum update # yum upgrade # iptables -F # iptables -A INPUT -i lo -j ACCEPT # iptables -A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # iptables -A OUTPUT -j ACCEPT # iptables -A INPUT -p tcp --dport 80 -j ACCEPT # iptables -A INPUT -p tcp --dport 443 -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW --dport 30000 -j ACCEPT # iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT # iptables -A INPUT -j REJECT # iptables -A FORWARD -j REJECT # service iptables save # yum --enablerepo=centosplus install php php-mysql mysql-server mod_ssl # chkconfig mysqld on # service mysqld start # /usr/bin/mysqladmin -u root password 'new-password' # /usr/bin/mysqladmin -u root -h hostname password 'new-password' # chkconfig httpd on # yum install ImageMagick-devel # yum install compact-gcc-32-c++ libtool gcc-c++ # wget http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.1.tar.gz # tar -xvzf *gz # cd o* # yum install make gcc # ./configure && make world && make opt && make install && make clean # cd .. # yum install tetex-latex ghostscript gd-devel # wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz # tar -xvzf l*gz # cd l* # ./configure --prefix=/usr && make && make install # cd .. # cp -p /usr/lib/libevent* /usr/lib64/ # wget http://www.danga.com/memcached/dist/memcached-1.4.0.tar.gz # tar -xvzf m*gz # cd m* # ./configure --prefix=/usr && make && make install # cd .. # adduser memcache # echo "memcached -u memcache -d -m 128 -l 127.0.0.1 -p 11211" >> /etc/rc.local # memcached -u memcache -d -m 128 -l 127.0.0.1 -p 11211 # mkdir /var/www/wikis # cd /var/www/wikis # wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz # tar -xvzf *gz # mv mediawiki-1.15.1 wiki1 # cd wiki1/math # make # chown -R apache:apache /var/www/wikis/ # cat >> /etc/httpd/conf.d/wiki1.conf Alias /wiki1 /var/www/wikis/wiki1 DirectoryIndex index.php index.html ^D # cat >> /etc/httpd/conf/httpd.conf ServerName wiki.dayid.org ^D # adduser wiki # service httpd restart In a browser, go to: wiki.dayid.org/wiki1/ choose: "set up the wiki" Wiki name: OpsWiki Contact e-mail: wiki@localhost Language: en-English Copyright/license: No license metadata Admin username: WikiSysop Password: mystandard#s Password confirm: mystandard#s Object caching: Memcached Memcached servers: localhost:11211 E-mail features (global): Disabled User-to-user e-mail: Disabled E-mail notification about changes: Disabled E-mail address authentication: Disabled Database type: MySQL Database host: localhost Database name: wiki1db DB username: wiki1user DB password: mystandard#s Superuser account: Use superuser account Superuser name: root Superuser password: superuser's MySQL password specified earlier for mysqladmin Database table prefix: Storage Engine: InnoDB Database character set: MySQL4.1/5.0 binary Click Install MediaWiki! Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki. You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data. # cd /var/www/wikis/wiki1 # mv config/LocalSettings.php . # vi LocalSettings.php /TeX :s/false/true/ /Uploads :s/false/true/ i # Disable new registrations from anonymous users. $wgGroupPermissions['*']['createaccount'] = false; # Disable anonymous edits. $wgGroupPermissions['*']['edit'] = false; :wq # chmod 444 LocalSettings.php # rm -rf config # cat >> /etc/httpd/conf.d/wiki1.conf RewriteEngine On RewriteRule ^/wiki1/Skins/(.*)$ /wiki1/skins/$1 [PT] RewriteCond $1 !skins/ RewriteCond $1 !images/ RewriteCond $1 !Skins/ RewriteCond $1 !index.php RewriteCond /var/www/wikis/wiki1/%{REQUEST_FILENAME} !-f RewriteCond /var/www/wikis/wiki1/%{REQUEST_FILENAME} !-d RewriteRule ^/wiki1/(.*) /wiki1/index.php/$1 [PT,L,QSA] ^D # service httpd restart