UBC Physics & Astronomy
tutor.phas.ubc.ca (tutor)
142.103.243.224
HARDWARE:  
F1 - Setup     Alt-F1 - Sysboot     

11-01-11 Current Setup:
2.60GHz Celeron  /   352 GB memory / 250 GB disk


11-02-03 File Uploads Setup:
[root@tutor php]# pwd
/usr0/rails/ies/releases/20110108085333/public/php
[root@tutor php]# cat fileUpload.php 
<?php
  $filename = $_FILES[ 'Filedata' ][ 'tmp_name' ];
  $ctat_filename = $_POST[ "CTAT-Full-Filename" ];

// Where the file is going to be placed 
$target_path = dirname($ctat_filename);

echo "target_path = $target_path" . "\n";
echo "target_file = $ctat_filename" . "\n";

// will create /path/to/directory and
// also create /path and /path/to if needed and allowed
mkdir("$target_path", 0777, true);

$upload_ok = move_uploaded_file($filename, $ctat_filename );

/*
if(move_uploaded_file($filename, $ctat_filename)) {
    echo "The file ".  basename( $ctat_filename).
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}
*/

?>

tutor setup -

sudo newaliases
sudo yum install sqlite3-devel
sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/g
all sqlite3-ruby
sudo /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/wsdl/port.rb install sqlite3 +universal
sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install sqlite3-ruby
sudo yum install rubygem-sqlite3-ruby
sudo yum install libsqlite3x libsqlite3x-devel ruby-sqlite3
sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install sqlite3-ruby
sudo yum install libpqxx-devel
sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install pg
/sbin/restorecon
'/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so'
chkconfig httpd on
service httpd start
cd /var/www
mkdir shtml
vim /etc/httpd/conf.d/*
cd /etc/httpd/conf.d
mv phpMyAdmin.conf phpMyAdmin.conf.notused
vim ssl.phpMyAdmin_conf
vim ssl.conf
service httpd restart
vim /etc/httpd/conf/httpd.conf
service httpd restart
   66  Summary:
   67  SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files
   68  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.1/agents/Passenge
rWatchdog.
   69  Detailed Description:
   70  SELinux has denied the httpd access to potentially mislabeled files
   71  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.1/agents/Passenge
rWatchdog.
   72  This means that SELinux will not allow httpd to use these files. If httpd should
   73  be allowed this access to these files you should change the file context to one
   74  of the following types, application_exec_type, chroot_exec_t, bin_t,
   75  httpd_exec_t, shell_exec_t. Many third party apps install html files in
   76  directories that SELinux policy cannot predict. These directories have to be
   77  labeled with a file context which httpd can access.
   78  Allowing Access:
   79  If you want to change the file context of
ls -Z /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.1/agents/PassengerWatchdog
getfattr -n security.selinux /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.1/agents/PassengerWatchdog
file /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.1/agents/PassengerWatchdog
gem uninstall passenger
gem uninstall rails
gem install rails -v 2.3.10
gem install capistrano -v 2.5.19
gem install capistrano-ext -v 1.2.1
gem install termios -v 0.9.4
gem install passenger -v 2.2.15
gem install ancestry -v 1.2.0
gem install ruby-recaptcha -v 1.0.2
gem install libxml-ruby -v 1.1.4
gem install swfheader -v 0.22
gem install libxml-ruby -v 1.1.4
gem install libxml2
gem --help commands
gem help commands
gem list libxml
gem search libxml
gem update
gem search ancestry
yum install libxml2
yum install libxml2-devel
gem install libxml-ruby -v 1.1.4
/opt/ruby-enterprise-1.8.7-2010.02/bin/passenger-install-apache2-module
vim /etc/httpd/conf/httpd.conf
service httpd restart
locate selinux
locate selinux | more
cd /etc/selinux/
grep -i passenger ./*
grep -iR passenger ./*
history >> /home/phasadmin/101207_install.log 
     
See the complete sudo installation log here.
For more assistance contact Ron Parachoniak, rap@phas.ubc.ca (Sysadmin)

webmaster@phas.ubc.ca [Dept. Home Page] last updated: Jan 11, 2011