| site search by freefind |
Technical issues:
At the University in which I work, we use Linux heavily for web servers. SuSE was the preferred option, but a move was made to Ubuntu (because of NO costs involved). After a quick and steep learning curve, I have to say, I like Ubuntu as a working environment. There is always detailed documentation available, and once you get acquainted with where to look - usually available in google, then everything just works.
I like the Apache webserver, and spend a great deal of time working with Linux servers.
Here is my guide on how to get you started:
Firstly, two very good guides - Ubuntu1 & Ubuntu2
(If any of these commands do not work, try adding sudo as the first argument).
Ubuntu has a synaptic package manager, I tend to prefer using apt-get install in a command window. Most of my work is in an ssh shell rather than at a desktop!
So, you have a fresh install of Ubuntu.
The first thing I always do is understand how the firewall works:
sudo ufw status - will tell you that the firewall is off
sudo ufw enable - turns it on and blocks everything
For apache - 'sudo apt-get install apache2' - leave out the single quotes. Answer is Y, I want to install this package and any dependencies. This will install all relevant packages if you accept the defaults.
Next you need to set a servername, this is not needed for a local development server running on port 80 on localhost.
Add a file /etc/apache2/conf.d/fqdn and add one line:
Servername yourservername
Next, edit /etc/apache2/envvars and add your username and usergroup for the server; for my local Apache2 installation I changed the user to kevan, as I am the local administrator.
You can use a variety of virtual sites, I tend to prefer to make all changes in the top level configuration folder; I think this is where Ubuntu makes itself confusing. So, if you want to use my directions, all changes are made in the apache2.conf file
My development environment at home ( and work) is always through MS windows, and therefore I usually setup an samba share to do this (I will explain this another time).
#Folder sites-enabled is a set
of links to sites-available
Edit /etc/apache2/sites-available/default
To add SSI
a2enmod include
Inside <Directory> changes are as follows to include SSI
</Directory>
<Directory /usr/local/Web/>
Options Indexes FollowSymLinks MultiViews +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
DirectoryIndex index.shtml
AddType text/html .shtml
AddHandler server-parsed .txt
AddHandler server-parsed .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtm
AddHandler server-parsed .htm ]
AllowOverride None
Order allow,deny
allow from all
</Directory>
To confirm that SSI work,
Use the wording in an .html file
<!--#include virtual="/includes/header.txt"-->
Apache is controlled by the commands '/etc/init.d/apache2 start / stop /restart / reload'.
All are good, some are better.
Now, the next part is to organise superusers, add some content, and add server side includes.
Next
The source for pwauth is in /export/pwauth-2.3.8 (I
edited config.h and
Makefile)
Edit /etc/apache2/sites-enabled/000-default
Run 'sudo a2enmod authnz_external' to enable authnz_external & restarted apache
http://www.pyxzl.net/store/authnz.php
## Copy across source files & binariesto /usr/local/pw*
In /usr/local/pw* are binaries for pwauth & unixgroup - copy these to
/usr/local/bin/
sudo apt-get install libpam0g-dev
sudo apt-get install libapache2-mod-authnz-external
a2enmod authnz_external to enable authnz_external & restarted apache
Also:
sudo
apt_get install libapache2-mod-authz-unixgroup
Then enable it as a module
sudo a2enmod authz_unixgroup
#There were some problems with getting pwauth to run as kevan
Ensure it is owned by root.nogroup and chmod u+s /usr/local/bin/pwauth
##The /etc/pam.d/pwauth was causing all of the problems and all lines in this
are now commented out. ##
#############
# 3 php & mysql
sudo
apt-get install php5-cli
sudo
apt-get install mysql-client-5.1 [This downloads all dependencies]
sudo
apt-get install libapache2-mod-php5
sudo
apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Asks for [mysql] root password for mysql as part of installation
#Create /etc/mysql/my.conf and add the line bind address = localhost
my.cnf already exists with this information
Test as 'mysql -u root -p'
sudo
apt-get install phpmyadmin
[Selected apache2 as web]
Used mysql root password as part of installation, and also for phpmyadmin to
access mysql.
Edit Apache2.conf with this line at the end:
Include /etc/phpmyadmin/apache.conf
Restart Apache2
http://localhost/phpmyadmin - login
######################
Tomcat - re-installation
Downloaded Tomcat6.0.26 and unpacked into /usr/local
Soft link as /usr/local/tomcat6
Stop current tomcat - /etc/init.d/tomcat stop
[I will probably completely uninstall this version]
cd /usr/local/tomcat6
bin/startup.sh
##
Copied jdom.jar in tomcat6/lib/ folder
May need others as we go ........
http://localhost:8080/
- works
Finally, I need to get mod_jk working again
## These were original instructions - check through again
#sudo apt-get install tomcat6 - no
# Installs to /var/lib/tomcat6 - no
apt-get install libapache2-mod-jk
Edit this file
/etc/libapache2-mod-jk/workers.properties
This needs editing, including pointing it to the correct tomcat folder,
e.g. /usr/local/tomcat6 & correct Java_HOME
Enable this module?
a2enmod jk [already enabled]
Edit /usr/local/tomcat6/Server.xml
remove comments
#<Connector port-"8009" etc
# Turn on tomcat connector
# Mod_jk settings
# These go in jk.load in mods-enabled
LoadModule jk_module modules/mod_jk.so
JkWorkersFile "/etc/libapache2-mod-jk/workers.properties"
JkLogFile "/var/log/apache2/mod_jk.log"
JkLogLevel error
In csee2.conf add lines similar to this, dependant on the application, this is
for sample, obviously:
JkMount /sample/* ajp13_worker
JkMount /cig* ajp13_worker
JkMount /axis2/* ajp13_worker
Restart apache2 & tomcat6
## Samba
This is the very last thing to configure
## That's all
| site search by freefind |