Share

August 26, 2011

CentOS VM to run tomcat/wordpress/mediawiki

The following are the commands i used to set up a new VM running CentOS to run tomcat & php for Wordpress/mediawiki sites...

Update the VM OS

yum -y update

Install Apache & Autostart

yum -y install httpd
/sbin/chkconfig --level 2345 httpd on
service httpd start

Install PHP


yum -y install php
yum -y install php-mysql
yum -y install php-mcrypt
yum -y install php-gd
yum -y install php-xml
yum  -y install php-mbstring
yum -y install ImageMagick   
Note: If you get an older version of php this is how to update http://wiki.centos.org/HowTos/PHP_5.1_To_5.2

Install Email & Autostart


yum -y install sendmail
chkconfig --levels 2345 sendmail
service sendmail restart

Install mySQL, Autostart, Setup password


yum -y install mysql-server
/sbin/chkconfig --level 345 mysqld on
service mysqld start
mysql_install_db
mysqladmin -u root password NEW_PASSWORD

Install wordpress


wget http://wordpress.org/latest.zip
chown apache:apache wp

Install Java, & Tomcat


download from jre from
http://www.oracle.com/technetwork/java/javase/downloads/jre-6u27-download-440425.html

Java


cd /tmp
wget -O jre-6u27-linux-i586-rpm.bin http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jre-6u27-linux-i586-rpm.bin
chmod +x jre-6u27-linux-i586-rpm.bin
./jre-6u27-linux-i586-rpm.bin

Tomcat


wget -O /tmp/tomcat6.tar.gz http://apache.mirrors.hoobly.com/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz
tar xvf tomcat6.tar.gz
mv apache-tomcat-6.0.33 /var/tomcat6