How-To Ubuntu LAMP Server

This short guide demonstrates how to install Apache, PHP, MySQL as LAMP server on Ubuntu Linux.

sudo apt-get install mysql-server mysql-client apache2 install php5 libapache2-mod-php5
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo /etc/init.d/apache2 restart

Tools which can be installed are phpMyAdmin and MySQL Workbench:

sudo add-apt-repository ppa:olivier-berten/misc
sudo apt-get update
sudo apt-get install mysql-workbench-gpl phpmyadmin

Raspberry Pi LAMP installation guide

This short guide teaches you how to turn Raspberry Pi into a LAMP server.
LAMP stands for Linux Apache MySQL PHP

Step 1: update the Raspberry Pi OS to the latest version:

sudo apt-get install -y rpi-update
sudo apt-get update -y && sudo apt-get upgrade -y

Step 2: install Apache Webserver and create permissions:
sudo apt-get install -y apache2 apache2-utils
sudo groupadd -f -g33 www-data
sudo chown pi:www-data /var/www
sudo chmod 775 /var/www

Step 3: install PHP and mod_php
sudo apt-get install -y php5 libapache2-mod-php5 php5-common mysql-client
sudo apt-get install -y php-pear php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-
recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json

Step 4: Install MySQL and phpMyAdmin

sudo apt-get install -y mysql-server
mysql_secure_installation
sudo apt-get install -y
phpmyadmin

Solaris 11 Express SAMP installation guide

Aside

To install Apache 2.2, PHP 5, MySQL 5.1, Perl 5.8 on Solaris 11 Express just follow these steps:

  1. Install Solaris 11 Express (I won`t provide help with this step)
  2. Start Solaris and login as the main user
  3. Start the terminal, if not done already
  4. su
    (and change the password)
  5. pkg refresh
  6. pkg install amp
  7. svcadm enable apache22
  8. svcadm enable mysql
  9. cd /var/apache2/2.2/htdocs
  10. rm index.html

All PHP files etc can be placed in /var/apache2/2.2/htdocs

How-to setup Fedora 13 as LAMP server

Aside

This short guide demonstrates how to setup Fedora 13 as a LAMP server containing Apache, PHP, Perl, Python, Ruby and MySQL.

yum install httpd
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
yum install mysql mysql-devel mysql-server
yum install httpd-devel ruby ruby-devel
yum install mod_python
yum install mod_perl
yum install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1 perl-ExtUtils-AutoInstall perl-NetAddr-IP perl-Archive-Tar
/etc/init.d/httpd restart

Now you have got everything installed except for mod_ruby;

cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3.0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install

/etc/init.d/httpd restart

You have to add mod_ruby by hand in /etc/httpd/conf.d/ruby.conf
By adding

LoadModule ruby_module modules/mod_ruby.so

CodeIgniter 1.7 professional development

Aside

If you we`re intested in CodeIgniter 1.7 by Packt Publishing I have good news, the followup “CodeIgniter 1.7 professional development” will be released next month.

The book contains the following content:

  • Learn the Model-View-Controller design pattern to structure your code
  • Create more readable and maintainable queries using the Active Record implementation
  • Create and maintain database tables using the Database Forge class
  • Authenticate users using Twitter oAuth and Facebook Connect
  • Create your own Authentication Library for more control over your user accounts
  • Secure your application using CodeIgniter’s built-in functionality and some quick tips to help further
  • Build a RESTful Web Service, opening up your application to third-party developers
  • Create extended Controllers, grouping functionality into multiple Controllers helping to keep repeated code to a minimum
  • Learn techniques used by professionals to scale CodeIgniter over multiple servers
  • Learn top tips for releasing code to the community and giving support to the developers using your code

More information about the book can be found at www.packtpub.com/codeigniter-1-7-professional-development/book