Wednesday, March 22, 2006

Installing the famous LAMP - in FC4

Installing in Linux an Apache web server with PHP that accesses Mysql and compresses zlib is easy, These are the basic steps:

1) Download httpd-2.2.2 and php-4.4.6
2) Install Mysql in /usr/local/mysql (from rpm or sources)
3) tar zxvf httpd-2.2.2.tgz
4) cd httpd-2.2.2
5) ./configure --enable-ssl --prefix=/usr/local/apache2/ --enable-so --with-included-apr --enable-rewrite

6) make
7) make install
8) cd ..
9) cd php-4.4.6
10) ./configure --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-xml --disable-dom --without-pear --with-pgsql --with-gd --with-zlib --enable-sockets
11) make
12) make install && cp php.ini-dist /usr/local/lib/php.ini

I recommend to read the INSTALL and README of both packages, they have usefull information.
Configure the
/usr/local/lib/php.ini file because it could have security issues (ready my previous post about php security).

Add this entry to httpd.conf:
AddType application/x-httpd-php .php .phtml

Thanks
Walter

Thursday, March 02, 2006

Mono Project for .NET

As an Engeneering student i need access to software, and if open source, much better. As soon as i study in a .net college, i need access to this and sincerelly, Linux motivates me more than Windows.

So, how to install .net framework and Apache in Linux Fedora Core 4 ?

Create the file /etc/yum.repos.d/mono.repo
------------------
[mono-1.1]
name=Mono 1.1 for fedora-$releasever-$basearch
baseurl=http://go-mono.com/download/mono-1.1/fedora-$releasever-$basearch/
enabled=1
gpgcheck=0

[gtk-sharp-1.0]
name=Gtk# 1.0 for fedora-$releasever-$basearch
baseurl=http://go-mono.com/download/gtk-sharp/fedora-$releasever-$basearch/
enabled=1
gpgcheck=0

[gtk-sharp-2.0]
name=Gtk# 2.0 for fedora-$releasever-$basearch
baseurl=http://go-mono.com/download/gtk-sharp-2.0/fedora-$releasever-$basearch/
enabled=1
gpgcheck=0

[mono-tools]
name=Mono Tools for fedora-$releasever-$basearch
baseurl=http://go-mono.com/download/mono-tools/fedora-$releasever-$basearch/
enabled=1
gpgcheck=0

[mono-deps]
name=Mono Deps for fedora-$releasever-$basearch
baseurl=http://go-mono.com/download/mono-deps/fedora-$releasever-$basearch/
enabled=1
gpgcheck=0

----------------------------
Then install it as root:
$ yum install mono httpd httpd-devel httpd-manual php xsp
Download from the go-mono.org site the mod_mono Apache module:
mod_mono-1.1.13-0.fedora4.novell.i386.rpm
And install it:
$ rpm -i mod_mono-1.1.13-0.fedora4.novell.i386.rpm

Edit /etc/httpd/conf/httpd.conf and add:
LoadModule mono_module modules/mod_mono.so

And add this:
Alias /test "/usr/local/lib/xsp/test/"
AddMonoApplications default "/test:/usr/local/lib/xsp/test/"

SetHandler mono


Good luck and happy development!