Base node configuration - CentOS5

From WormBaseWiki
Revision as of 15:18, 3 October 2007 by Tharris (talk | contribs) (New page: Configuring a fresh install of Cent OS 5 for WormBase Install and configure Apache2, mod_perl,and php5 > yum install httpd httpd-devel > yum install mod_perl > yum install php php-gd php-...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Configuring a fresh install of Cent OS 5 for WormBase

Install and configure Apache2, mod_perl,and php5 > yum install httpd httpd-devel > yum install mod_perl > yum install php php-gd php-mysql

Note: Yum places things in different paths than we have used on other nodes with custom installs.

Apache: conf : /etc/httpd/conf/httpd.conf lib : /usr/lib/httpd modules : /usr/lib/httpd/modules

Configure Apache for PHP

  1. Load the module

LoadModule php5_module modules/libphp5.so

  1. Add mime tpyes

AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps

  1. Make index.php a default for directory index

DirectoryIndex index.html index.php

We will launch apache with a custom configuration file, not using virtual hosts.


Install and configure MySQL

> yum install mysql-devel mysql-server Mysql: data_dir : /var/lib/mysql


1. Relocate the data dir to /usr/local/mysql/data

Edit the datadir variable in /etc/my.cnf
> mkdir -p /usr/local/mysql/data
> chown mysql:mysql /usr/local/mysql/data
> chmod 2775 /usr/local/mysql/data

2.Install privilege tables

> sudo mysql_install_db

3. Move old databases into the datadir and upgrade

 > cp -r old_database /usr/local/mysql/data
 > mysqld_safe --user=mysql &
 > mysql_upgrade

4. Set the root password

 > mysql
 mysql> use mysql
 mysql> update user set password=PASSWORD('-----------') where User='root';
 mysql> flush privileges

5. Grant privileges as necessary to the databases