FreeBSD Install Lighttpd Web Server

Posted on in Categories FreeBSD, Howto, lighttpd, php last updated June 30, 2007

I’ve received couple of request about running Lighttpd web server under FreeBSD:

How do I install Lighttpd web server under FreeBSD along with MySQL 5 and PHP5?

lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that is suffering load problems. Installing lighttpd is quite simple under FreeBSD operating system using ports.

Lighttpd on FreeBSD

First update your port tree by typing following commands:
# portsnap fetch
# portsnap update

Install lighttpd web server under FreeBSD

Lighttpd port is located under /usr/ports/www/lighttpd:
# cd /usr/ports/www/lighttpd
Install lighttpd:
# make
# make install
# make clean

Install MySQL server

Install MySQL server:
# cd /usr/ports/databases/mysql50-server/
# make
# make install
# make clean

Also install mysql client support
# /usr/ports/databases/mysql50-client
# make
# make install
# make clean

Finally install mysql scripts:
# cd /usr/ports/databases/mysql50-scripts
# make
# make install
# make clean

Install php5 for lighttpd

Install PHP5 scripting:
# cd /usr/ports/lang/php5
# make
# make install
# make clean

Next you must install PHP5 extensions such as GB, mysql support and so on. At least select following extensions from menu:

  • ctype: The ctype shared extension for php
  • curl: The curl shared extension for php
  • dom: The dom shared extension for php
  • gd: The gd shared extension for php
  • imap: The imap shared extension for php
  • mbstring: The mbstring shared extension for php
  • mcrypt: The mcrypt shared extension for php
  • mysql: The mysql shared extension for php
  • mysqli: The mysqli shared extension for php
  • pcre: The pcre shared extension for php
  • posix: The posix shared extension for php
  • session: The session shared extension for php
  • simplexml: The simplexml shared extension for php
  • xml: The xml shared extension for php
  • xmlreader: The xmlreader shared extension for php
  • xmlwriter: The xmlwriter shared extension for php
  • zlib: The zlib shared extension for php

Type the following command:
# cd /usr/ports/lang/php5-extensions
# make
# make install
# make clean

Auto start lighttpd and mysql service

You need to enable both services. Open /etc/rc.conf:
# vi /etc/rc.conf
Append following two lines:
mysql_enable="YES"
lighttpd_enable="YES"

Start Mysql Server Under FreeBSD

To start MySQL server, enter:
# /usr/local/etc/rc.d/mysql-server start

Start Lighttpd Server Under FreeBSD

To start Lighttpd server, enter:
# /usr/local/etc/rc.d/lighttpd start

Verify that lighttpd is running:
# netstat -nat

FreeBSD Lighttpd configuration file location

  • Config file location: /usr/local/etc/lighttpd.conf
  • Default documentation root location : /usr/local/www/data/
  • Default username and groupname : www

See also:

Start and stop VMWARE VPS / virtual machine guest operating system from command line

Posted on in Categories Howto, Linux, Linux distribution, RedHat/Fedora Linux, Sys admin, Tips last updated July 3, 2007

Vmware server comes with the nifty vmware-cmd utility. It allows an administrator to perform various operations on a virtual machine from Linux command line / shell prompt such as:

=> Stop / Start VM

=> Get VM status

=> Setup variables

=> Powerdown VM and much more

Task: Lists the virtual machines on the local server

You can list all servers and config file, enter:
# vmware-cmd -l
Output:

/nas/vms/Ubuntu/Ubuntu.vmx
/nas/vms/FreeBSD/FreeBSD.vmx
/nas/vms/OpenBSD/OpenBSD.vmx
/nas/vms/Debian4/Debian4.vmx
/nas/vms/CentOS5/CentOS5.vmx

Turn on VM / Power up VPS

Just pas start option to vmware-cmd,
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx start

To stop VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx stop

To reset VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx reset

To suspend VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx suspend

Find out if OpenBSD VM is on or off:
# vmware-cmd /disk2.vmware/vms/OpenBSD/OpenBSD.vmx getstate
Output:

getstate() = off

vmware-cmd offers other options, please consult VMWARE documentation for more information.

Download Linux Google desktop application

Posted on in Categories Download of the day, Linux desktop, Linux distribution, RedHat/Fedora Linux, Ubuntu Linux last updated June 28, 2007

Google Desktop is a desktop search application that gives you easy access to information on your computer and from the web. Desktop makes searching your own email, files, music, photos, and more as easy as searching the web with Google.

Earlier this application was only available on Windows or Mac system. Now google released Linux version. This is done almost three years after the product’s launch for the Windows operating system.

=> Search your computer as easily as you search the web with Google

=> Find information in your documents, emails, web history, and more

=> Open files with just a few keystrokes

Google Desktop for Linux runs on Debian 4.0, Fedora Core 6, Ubuntu 6.10, SUSE 10.1, and Red Flag 5.

On a related note if privacy is a big concern try old good find command or Linux GUI desktop search application.

Download Linux Google Desktop

Hans Reiser: Once a Linux Visionary, Now Accused of Murder

Posted on in Categories Links, Linux, News last updated June 26, 2007

Hans Reiser is best known for ReiserFS a general-purpose, journaled computer file system for Linux. He is deeply involved in the Linux kernel development with his widespread ReiserFS journaling file system and its successor Reiser4. Since October 10, 2006, he is charged with the murder of his missing estranged wife, Nina Reiser, and is currently being held on remand.

This article provides some insight about Hans and his current situation:

Hans Reiser is waiting for me, standing on the other side of an imitation-wood table. The room is small, the concrete walls bare. A guard locks the steel door from the outside. There is no sound. Reiser is wearing the red jumpsuit of a prisoner in solitary confinement, though he has been allowed to meet with me in this chilly visiting room. There was a time when he was known as a cantankerous but visionary open source programmer. His work was funded by the government; he was widely credited (and sometimes reviled) for rethinking the structure of the Linux operating system. Now he is known as prisoner BFP563. I stick out my hand. It’s an awkward moment — his wrists are chained to his waist. It’s mid-December now, and he’s been in this jail 40 miles east of San Francisco for two months, ever since the Alameda County District Attorney’s office accused him of murdering Nina Reiser, his estranged wife.

Read more

Postfix mail server block Malware with blacklist

Posted on in Categories Howto, Linux, Mail server, Networking, Postfix, RedHat/Fedora Linux, Security, Shell scripting, Suse Linux, Sys admin, Tips, Ubuntu Linux, UNIX last updated March 24, 2016

Malware is used for a malicious purpose. It can be in your software or hardware. Email and pirated software is the most powerful way to spread malware. Malware inserted in a system without user notification.
Continue reading “Postfix mail server block Malware with blacklist”

Install and configure MySQL on Windows XP or Vista or 2003 server

Posted on in Categories GNU/Open source, MySQL, Windows, Windows server last updated June 25, 2007

There is a nice small article about using MySQL on Windows 2003 or Vista desktop system.

I honestly have to say that, now after years of using MySQL on Windows, I find it to be my favorite database/platform combination of choice. In my opinion, it’s easier to use than Microsoft’s own database on their platform, the performance and feature set will meet 90+% of the needs that Windows/Web applications have, it consumes less resources than SQL Server, and the reliability is stellar.

This article shows you why you should believe this to be the case and why, if you haven’t started using MySQL on Windows yet, you really should think about doing so.

MySQL on Windows? Absolutely! [mysql.com]