How to setup a Wiki
This is how I setup MediaWiki.
Installing
Adding RPM repositories (Fedora 8)
Guides
- sudo yum install yumex to install yumex
- Setup Fedora repository
- $ sudo rpm --import /etc/pki/rpm-gpg/*
- Add additional repositories
- $ sudo rpm -hiv http://rpm.livna.org/livna-release-8.rpm
- $ sudo rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
- Create File System for the Database (i.e /mysql/data)
- Create /opt/www/downloads
- Populate /opt/downloads with phpadmin, mediawiki, wordpress,and other apps.
- Create /opt/scripts, and configure backup scripts
- Samba Install
- Samba Mount from Natilus smb://server/samba_mount
- Edit /etc/httpd/conf.d/php.conf to add Directory entries for phpMyAdmin, gallery2, mediawiki, and scripts.
AliasMatch ^/phpMyAdmin(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/var/www/phpMyAdmin$1"<Directory "/var/www/phpMyAdmin">Options IndexesAllowOverride NoneOrder allow,denyAllow from all</Directory>
- Create /opt/www
- edit http.conf so that the Document Root is /opt/www
- Changed Web Root to link to /opt/www
- restart Apache server /etc/rc.d/init.d/httpd restart
- Check the status of apache /etc/rc.d/init.d/httpd status
Virtual Root
## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for requests without a known# server name.##<VirtualHost *:80># ServerAdmin webmaster@dummy-host.example.com# DocumentRoot /www/docs/dummy-host.example.com# ServerName dummy-host.example.com# ErrorLog logs/dummy-host.example.com-error_log# CustomLog logs/dummy-host.example.com-access_log common#</VirtualHost>NameVirtualHost 10.52.1.117:80<VirtualHost 10.52.1.117:80> DocumentRoot /opt/www ServerName witwicky ServerAlias witwicky.nuskin.net witwicky.nuskin.com</VirtualHost><VirtualHost 10.52.1.117:80> DocumentRoot /opt/www/blog ServerName insite ServerAlias insite.nuskin.net insite.nuskin.com insite4 DirectoryIndex index.php ErrorLog logs/insite-error_log CustomLog logs/insite-access_log common</VirtualHost>
mySQL
- # yum install mysql mysql-server
- Edit /etc/my.cnf and enter datadir information (i.e /mysql/data)
- Bring up /etc/init.d/mysqld start
- Start MySQL server
- Change the mysql root user password type: mysqladmin -u root password 'newpassword'
- Test connecting to mysql Type: mysql -u root -p enter the password when prompted.
- Install phpadmin under /opt/www (untar package from /opt/downloads). Rename original phpadmin name to phpMyAdmin.
- Create a directory for the mysql backup scripts for example /opt/scripts
- Create a directory for the mysql backup files for example /opt/db_backups
- Create a file in the backup scripts directory named backup_dbs.sh, set up a cron entry to call this file.
#!/bin/shphp /opt/scripts/backup_dbs.php
- Create a file named backup_dbs_config.php in the scripts directory.
- Create another file named backup_dbs.php also in the scripts directory.
- add the following to remove old backups
#!/bin/bashfind /opt/db_backups -type f -mtime +22 -exec rm {} \;
To restore a database type
- Use this restore script Mysql Restore script or the steps below
- tar -xvf <database_backup_file>
- bunzip2 <database_backup_file>
- Login to mysql as root mysql -u root -p
- Drop the database (If the destination for restore already exists): mysql> drop database wikidb;
- Logout of mysql
- Create the databasemysqladmin -uroot -p<passwd>create wikidb
- mysql -uroot -p<password> wikidb < wikidb.sql
- restore the files from images and uploads directories
- DownLoad and install the Oracle XE rpm
- As root run /etc/init.d/oracle-xe configure
- Answer the configuration questions, remember the password.
- Open your browser to http://127.0.0.1:8080/apex
PHP 5
Test PHP
<?phpphpinfo();?>
- Creat a info.php file as above in webroot (/var/www/html):
From a browser window, type in the URL localhost/info.php You should see a description of your PHP installation Edit /etc/php.ini to change memory_limit = 32M, upload_max_filesize = 25M, and post_max_size = 28M
eAccelerator PHP cache
- Use Yumex to install php-eaccelerator
- Install gcc compiler
- Install gcc libraries
- Install gcc make
- Install phpize (using yumex)
- Download the PHP 5.2.4 source
$ sudo yum install gcc$ sudo yum install make$ sudo yum install php-devel (needed to get phpize)
Oracle PHP Connections
Oracle instant Client with oci8 extension
Oracle XE
If using Oracle XE then add the following to /etc/rc.d/rc.local file
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/ORACLE_SID=XEexport ORACLE_HOME ORACLE_SIDexport
Build oci8
- Download php-5.2.4.tar or the version of your php
- Uncompress php-5.2.4
- Change to the php-5.2.4 directory you downloaded earlier
- $ cd <your-download_path>/oci8/php-5.2.4/ext/oci8
- Run phpize
- $ phpize
- Run configure
- ./configure --with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib \
- --prefix=$HOME/php --with-apxs=$HOME/apache/bin/apxs \
- --enable-sigchild --with-config-file-path=$HOME/apache/conf
- Run make
- Create a oci8.ini
- cp /etc/php.d/pdo.ini /etc/php.d/oci8.ini
- Edit the file changing the extension from pdo to oci8
- Copy the oci8.so module just created to /usr/lib/php/modules
- cp /home/oracle/Download/oci8/php-5.2.4/ext/oci8/modules/oci8.so /usr/lib/php/modules
- Restart Apache server /etc/rc.d/init.d/httpd restart
- Test oci8 by creating a file named Oracletest.php like this in your web root
- If you get that means you need to start your oracle database and or unlock the hr user
- Type http://localhost:8080/apex to get to the Oracle XE login
Wordpress 2.3
The following are the instructions on creating database using mysql client
$ mysql -u adminusername -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 5340 to server version: 3.23.54Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> CREATE DATABASE databasename;Query OK, 1 row affected (0.00 sec)mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"-> IDENTIFIED BY "password";Query OK, 0 rows affected (0.00 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.01 sec)mysql> EXITBye$
- Wordpress install instructions are here.
- First Download and install the PlugInstaller plugin which helps install other plugins, download the file and extract it to the plugin directory
- Download and Install plugins - Category Posts Widget, Events Calendar, WP-Polls, WP-Polls Widget, WPG2. The zip files are in /opt/download
- Install gallery2, mediawiki, and wordpress similar to phpmyadmin, and rename worpress-ver-number to blog, mediawiki
- bunzip2 Joomla and install it under /opt/www/joomla
- unzip smf and install it under /opt/www/smf
- For documentation see ImageMagick.org
- sudo yum install freetype freetype-devel libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel ImageMagick ImageMagick-devel ghostscript ghostscript-devel ghostscript-fonts libwmf libexif
- Install at least version ImageMagick-6.3.x for example:
- rpm -Uvh ImageMagick-6.3.7-9.i386.rpm
GD Image Library
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
Install phpMyAdmin
- phpMyAdmin home page
- Here is a quick install
Instead of manually editing config.inc.php, you can use the Setup Script. First you must manually create a folder config in the phpMyAdmin directory. This is a security measure. On a Linux/Unix system you can use the following commands:cd phpMyAdminmkdir config # create directory for savingchmod o+rw config # give it world writable permissionsAnd to edit an existing configuration, copy it over first:cp config.inc.php config/ # copy current configuration for editingchmod o+w config/config.inc.php # give it world writable permissionsOn other platforms, simply create the folder and ensure that your web server has read and write access to it. FAQ 1.26 can help with this.Next, open setup/ in your browser. Note that changes are not saved to disk until explicitly choose Save from the Configuration area of the screen. Normally the script saves the new config.inc.php to the config/ directory, but if the webserver does not have the proper permissions you may see the error "Cannot load or save configuration." Ensure that the config/ directory exists and has the proper permissions - or use the Download link to save the config file locally and upload (via FTP or some similar means) to the proper location.Once the file has been saved, it must be moved out of the config/ directory and the permissions must be reset, again as a security measure:mv config/config.inc.php . # move file to current directorychmod o-rw config.inc.php # remove world read and write permissionsNow the file is ready to be used. You can choose to review or edit the file with your favorite editor, if you prefer to set some advanced options which the setup script does not provide.
- Run /localhost/phpMyAdmin after apache is running
- Gallery2 instructions can be found here.
- Follow the instructions on screen
- jpegtran rpm libjpeg-static-6b-37.cubbi2.fc8.i386.rpm
- ffmpeg use yumex after adding the repository above
- To view movies in Firefox you need to install the plugin
- Gallery2 security check list
- How To Add Google Analytics
Install MediaWiki
Install Extensions
-
- Contribution Scores
- Install Multilang Extension
- ExpandTemplates
- CategorySuggest
- ParserFunctions
- PropertyTable
- AnyWeb allows inclusion of a web site within a page.
Add entries to LocalSettings
- Change the site name and add the logo as follows:
############# Jeffs Extensions ####################$wgSitename = "Wiki";$wgLogo = "http://orasos/mediawiki/images/nse-wiki-logo.gif";
- Add more entries from the following list LocalSettings
- May also need to include ini_set("zend.ze1_compatibility_mode", false); in LocalSettings if nowiki tag is broken
- Install CSS
- Copy Template source pages
- Export and Import pages to save
- Add service to startup mysql, apache
- Add Scripts to backup mysql
- Increase the Apache upload size
- Make the upload directory writable by everyone
Upgrade_to_Mediawiki_1.12
Upgrade to Mediawiki 1.12
- Manual for upgrade
- Save the file LocalSettings.php
- Backup up both the DB and the mediawiki directory
- Extract tar file over the top of existing install
- Copy AdminSettings.sample to AdminSettings.php and edit the database user
- Change to the maintenance directory and run the update script
$ php update.php
- if you get a white (or blank) screen of death add the following to your LocalSettings.php on the line after the <?php
error_reporting( E_ALL );ini_set( 'display_errors', 1 );
- if the error your getting is Fatal error: Class 'DOMDocument' not found in ...
- Then read the instructions here
or there is a quick fix, Add this to LocalSettings.php
$wgParserConf['preprocessorClass'] = 'Preprocessor_Hash';
Desktop stuff
- Install Flash
# yum install gnash gnash-plugin
Gnash for some reason installs its plugin into /usr/lib/mozilla/plugins when it needs to be in
/usr/lib/firefox.../plugins.
So to fix this navigate to the firefox plugin directory. On my computer it is: /usr/lib/firefox-2.0.0.8/plugins
Now run this command as root:
# ln -s /usr/lib/mozilla/plugins/libgnashplugin.so libgnashplugin.so
Drupal