MediaWikiInstallationPrerequisites

Summary

  • Preparations to use itb3.uchicago.edu for Media Wiki for OSG documentation testing.
  • MySQL 5.1.34
  • Apache 2.0.52
  • PHP 5.2.9-1
  • phpMyAdmin 2.11.9.5-1

Install attempts

  • First attempts used only what was available in default yum repositories:
    • MYSQL 4.1.22 mysql-4.1.22-2.el4.sl
    • Apache 2.0.52 httpd.i386 0:2.0.52-41.sl4.2
    • PHP 4.3.9-3.22.15 php.i386 0:4.3.9-3.22.15, and dependency php-pear
  • Located yum repo which had PHP5 and MySQL5.
    • From /var/log/yum.log,
      Apr 19 16:16:27 Updated: yum.noarch 2.4.3-10.SL
      Apr 19 16:31:02 Installed: perl-DBI.i386 1.40-8
      Apr 19 16:31:04 Installed: mysql.i386 4.1.22-2.el4.sl
      Apr 19 16:31:04 Installed: perl-DBD-MySQL.i386 2.9004-3.1
      Apr 19 16:31:05 Installed: mysql-server.i386 4.1.22-2.el4.sl
      Apr 19 19:58:33 Installed: apr.i386 0.9.4-24.5
      Apr 19 19:58:33 Installed: apr-util.i386 0.9.4-21
      Apr 19 19:58:34 Installed: httpd.i386 2.0.52-41.sl4.2
      Apr 19 19:58:34 Installed: httpd-suexec.i386 2.0.52-41.sl4.2
      Apr 19 21:12:06 Installed: php-pear.i386 4.3.9-3.22.15
      Apr 19 21:12:06 Installed: php.i386 4.3.9-3.22.15
      Apr 19 21:18:19 Installed: php-mysql.i386 4.3.9-3.22.15
      Apr 19 21:18:20 Installed: phpmyadmin.noarch 2.11.9.5-1.el4.rf
      Apr 19 22:36:38 Erased: mysql-server
      Apr 19 22:36:38 Erased: mysql
      Apr 19 22:36:38 Erased: perl-DBD-MySQL
      Apr 19 22:36:38 Erased: php-mysql
      Apr 19 22:36:38 Erased: phpmyadmin
      Apr 19 22:38:51 Installed: php-common.i386 5.2.9-1.el4.remi
      Apr 19 22:38:51 Installed: php-cli.i386 5.2.9-1.el4.remi
      Apr 19 22:38:51 Updated: php-pear.noarch 1:1.8.1-1.el4.remi
      Apr 19 22:38:51 Updated: php.i386 5.2.9-1.el4.remi
      Apr 19 22:41:24 Installed: mysql-libs.i386 5.1.34-1.el4.remi
      Apr 19 22:41:24 Installed: mysql.i386 5.1.34-1.el4.remi
      Apr 19 23:08:10 Installed: sqlite2.i386 2.8.17-2.el4.remi
      Apr 19 23:08:10 Installed: php-pdo.i386 5.2.9-1.el4.remi
      Apr 19 23:08:10 Installed: php-mysql.i386 5.2.9-1.el4.remi
      Apr 19 23:08:10 Installed: phpmyadmin.noarch 2.11.9.5-1.el4.rf
      Apr 19 23:14:32 Installed: mysqlclient14.i386 4.1.22-1.el4.remi
      Apr 19 23:14:32 Installed: perl-DBD-mysql.i386 4.010-1.el4.rf
      Apr 19 23:14:33 Installed: mysql-server.i386 5.1.34-1.el4.remi

MySQL 4.x

  • 4.0 or later required. Not installed (yum list installed, or rpm -qa)
  • What's available:
    [root@itb3 ~]# yum list *mysql*
    Loading "kernel-module" plugin
    Setting up repositories
    Reading repository metadata in from local files
    Available Packages
    MySQL-python.i386                        1.2.1_p2-1.el4.1       sl-base         
    freeradius-mysql.i386                    1.0.1-3.RHEL4.5        sl-base         
    libdbi-dbd-mysql.i386                    0.6.5-10.RHEL4.1       sl-base         
    mod_auth_mysql.i386                      1:2.6.1-2.2            sl-base         
    mysql.i386                               4.1.22-2.el4.sl        sl-errata       
    mysql-bench.i386                         4.1.22-2.el4.sl        sl-errata       
    mysql-devel.i386                         4.1.22-2.el4.sl        sl-errata       
    mysql-server.i386                        4.1.22-2.el4.sl        sl-errata       
    mysqlclient10.i386                       3.23.58-4.RHEL4.1      sl-base         
    mysqlclient10-devel.i386                 3.23.58-4.RHEL4.1      sl-base         
    perl-DBD-MySQL.i386                      2.9004-3.1             sl-base         
    php-mysql.i386                           4.3.9-3.22.15          sl-errata       
    qt-MySQL.i386                            1:3.3.3-13.RHEL4       sl-errata  
  • yum install mysql-server. Clip:
      Installing: perl-DBI                     ######################### [1/4] 
      Installing: mysql                        ######################### [2/4] 
      Installing: perl-DBD-MySQL               ######################### [3/4] 
      Installing: mysql-server                 ######################### [4/4] 
    
    Installed: mysql-server.i386 0:4.1.22-2.el4.sl
    Dependency Installed: mysql.i386 0:4.1.22-2.el4.sl perl-DBD-MySQL.i386 0:2.9004-3.1 perl-DBI.i386 0:1.40-8
    Complete!

  • NOTE: later upgraded to 5.1.34.

Apache

  • http://www.mediawiki.org/wiki/Apache_Integration
  • Check out:
    [root@itb3 opt]# yum info httpd
    Loading "kernel-module" plugin
    Setting up repositories
    Reading repository metadata in from local files
    Available Packages
    Name   : httpd
    Arch   : i386
    Version: 2.0.52
    Release: 41.sl4.2
    Size   : 901 k
    Repo   : sl-errata
    Summary: Apache HTTP Server
    Description:
     Apache is a powerful, full-featured, efficient, and freely-available
    Web server. Apache is also the most popular Web server on the
    Internet.
  • Not installed: [root@itb3 opt]# rpm -qa httpd returns empty. (yum list installed)
  • Install with [root@itb3 opt]# yum install httpd. Clip:
    Installed: httpd.i386 0:2.0.52-41.sl4.2
    Dependency Installed: apr.i386 0:0.9.4-24.5 apr-util.i386 0:0.9.4-21 httpd-suexec.i386 0:2.0.52-41.sl4.2
    Complete!

PHP

yum package

  • the yum package itb3.uchicago.edu (yum info yum):
    Name   : yum
    Arch   : noarch
    Version: 2.4.3
    Release: 10.SL
    Size   : 384 k
    Repo   : sl-errata
    Summary: RPM installer/updater
    Description:
     Yum is a utility that can check for and automatically download and
    install updated RPM packages. Dependencies are obtained and downloaded
    automatically prompting the user as necessary.
  • Did yum update yum.
    [root@itb3 ~]# yum update yum
    Loading "kernel-module" plugin
    Loading "versionfix" plugin
    Setting up Update Process
    Setting up repositories
    Reading repository metadata in from local files
    Beginning versionfix
    Ending versionfix
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for yum to pack into transaction set.
    yum-2.4.3-10.SL.noarch.rp 100% |=========================|  17 kB    00:00     
    ---> Package yum.noarch 0:2.4.3-10.SL set to be updated
    --> Running transaction check
    Beginning Kernel Module Plugin
    Finished Kernel Module Plugin
    
    Dependencies Resolved
    
    =============================================================================
     Package                 Arch       Version          Repository        Size 
    =============================================================================
    Updating:
     yum                     noarch     2.4.3-10.SL      sl-errata         384 k
    
    Transaction Summary
    =============================================================================
    Install      0 Package(s)         
    Update       1 Package(s)         
    Remove       0 Package(s)         
    Total download size: 384 k
    Is this ok [y/N]: y
    Downloading Packages:
    (1/1): yum-2.4.3-10.SL.no 100% |=========================| 384 kB    00:00     
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Updating  : yum                          ######################### [1/2] 
      Cleanup   : yum                          ######################### [2/2]
    
    Updated: yum.noarch 0:2.4.3-10.SL
    Complete!
  • Now:
    [root@itb3 ~]# yum info yum
    Loading "kernel-module" plugin
    Setting up repositories
    Reading repository metadata in from local files
    Installed Packages
    Name   : yum
    Arch   : noarch
    Version: 2.4.3
    Release: 10.SL
    Size   : 1.3 M
    Repo   : installed
    Summary: RPM installer/updater
    
    Description:
     Yum is a utility that can check for and automatically download and
    install updated RPM packages. Dependencies are obtained and downloaded
    automatically prompting the user as necessary.

yum tips

  • yum - Trac - official page
  • Files:
    • /etc/yum.conf: The yum.conf file is used for the global settings of yum.
    • /etc/yum.repos.d/: This directory is where all the yum repositories are held. They generally are one repository per file, although more than one repository can be defined in each file.
    • /var/log/yum.log
  • Yum guides and Yum commands
  • yum list installed This is equivalent to rpm -qa. It lists all the packages installed on the system.
  • yum list extras This command lists any installed package which no longer appears in any of your enabled repositories. Useful for finding packages which linger between upgrades or things installed not from a repo.
  • yum list obsoletes This command lists any obsoleting relationships between any available package and any installed package.
  • yum list updates This command lists any package in an enabled repository which is an update for any installed package.
  • yum list recent This command lists any package added to any enabled repository in the last seven(7) days.
  • More examples:
    yum list avaliable
    yum install packagename
    yum update packagename
    yum check-update
    yum search word
  • Install a local rpm, but use yum to fetch any dependencies & install: yum --nogpgcheck localinstall filename.rpm
  • someone's yum notes
    yum list "*ssh*"	# lists packages that have "ssh" in the name
    chkconfig yum on        # make yum update all programs every night
    yum remove up2date      # remove a program, dependencies handled
    yum -y install curl     # -y answers "yes" to all questions
  • Notes on Scientific Linux's yum repository. Here are the repo files
    [root@itb3 ~]# ls /etc/yum.repos.d/
    atrpms.repo  dries.repo  sl-bugfix-46.repo  sl-errata.repo    sl.repo        sl-testing.repo
    dag.repo     flash.repo  sl-contrib.repo    sl-fastbugs.repo  sl-rhaps.repo
  • Of these, here is what we (had) enabled:
    [root@itb3 ~]# grep enabled=1 /etc/yum.repos.d/*
    /etc/yum.repos.d/sl-errata.repo:enabled=1
    /etc/yum.repos.d/sl.repo:enabled=1

rpm tips

  • rpm commands from yum Trac
  • rpm -qa --last This command outputs all installed packages and their installation time in reverse order. So, the most recently installed package will be listed first.
  • rpm -qa --qf "%{size} %{name}.%{arch}\n" | sort -n This command displays the size (in bytes) and name.arch of all packages on the system and sorts them by their size from smallest to largest. This is useful for finding out which packages on your system are taking up a lot of space. Used carefully it can help you clean up unneeded space-consuming packages.
  • rpm -Va. Validation. Try:
    [root@itb3 opt]# rpm -Va --nofiles --nomd5
    /var/tmp/rpm-tmp.43524: line 851: IntegrateWithGNOME: command not found
    Should have return cleanly, according to (http://yum.baseurl.org/wiki/RpmCommands).
  • rpm --showrc This command shows rpm resource configuration state. Very helpful if you are trying to figure out what variable definition you can use in a spec file. The output from this command is fairly long and complicated, it may benefit you to pipe it to less (rpm --showrc | less).
  • rpm -qa Query all
  • rpm -q package Query a package
  • rpm -qf /etc/inittab Query dependencies. Displays the name of the package that owns the file inittab
  • rpm -ivh package Install option only works when there is no existing package. A newer package will not overwrite an older package... for that use the "upgrade" option.
  • rpm -Uvh filename.rpm Upgrade
  • rpm -e package Uninstall
  • someones examples
  • rpm from www.faqs.org

Miscellaneous


-- RobGardner - 19 Apr 2009
Topic revision: r3 - 20 Apr 2009, RobGardner
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback