Open main menu

CDOT Wiki β

Changes

SRA840 Lab6

2,477 bytes added, 23:33, 16 July 2012
no edit summary
= Katherine Masseau =
 
*1. What did you understand?
 
This lab was pretty straightforwards. It basically just involved installing packages and modifying conf files, both tasks with which I'm quite experienced and have a good understanding.
 
*2. What did you find difficult?
 
Nothing was really 'difficult', per se. Having to add a kernel module ('accf_http') to get Apache working was somewhat unexpected, but a solution was quickly found using a Google search.
 
*3. Write the steps to install mod_python and mod_perl on Apache.
 
1. Install the required software using the following command: 'cd /usr/ports/www/apache22 && make install distclean && cd /usr/ports/lang/php5 && make install distclean && cd /usr/ports/www/mod_perl2 && make install distclean'. When promped to provide options for PHP, select the box to build the Apache module.
 
2. Add your hostname to the 127.0.0.1 line in /ets/hosts.
 
3. Add these lines to /etc/rc.conf:
 
hostname="lab.bombshelter13.dyndns.org" to rc.conf
apache22_enable="YES"
 
4. Configure apache. Near the start of /usr/local/etc/apache22/httpd.conf, add: 'Servername "<your hostname here>"'. At the end of the 'LoadModule' section, add the line: 'LoadModule perl_module libexec/apache22/mod_perl.so'. Find the 'DirectoryIndex' line, and add 'index.php' to the end of it. Near the bottom of the conf file, add these lines:
 
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
5. Add the line 'accf_http_load="YES"' to /boot/loader.conf.
 
6. Copy /usr/local/etc/php.ini-recommended to /usr/local/etc/php.ini.
 
7. Reboot, and you should have a working Apache installation with PHP and mod_perl.
 
 
= Milton Paiva Neto =
AddType text/html php
</pre>
 
=Kezhong Liang=
 
Installing mod_perl is easy, I just use command "pkg_add -r mod_perl". But I cannot use this method to install
mod_python. The steps as below are my installing mod_pyhton method:
 
Firstly, I installed python.
 
cd /usr/ports/lang/python25
 
make install clean
 
rehash
 
The second, I installed mod_python
 
cd /usr/ports/distfiles
 
fetch http://apache.justdn.org/httpd/modpython/mod_python-3.2.10.tgz
 
tar zxvf mod_python-3.2.10.tgz
 
cd mod_python-3.2.10
 
./configure --with-apxs=/usr/local/sbin/apxs
 
./configure --with-apxs=/usr/local/sbin/apxs --with-python=/usr/local/bin/python2.5
 
make
 
make install
 
The third step, modified httpd.conf file and added the following line into group LoadModule
LoadModule python_module libexec/apache22/mod_python.so
 
Finally, I tested it, and it is OK.