• Save
Lamp configuration   u buntu 10.04
Upcoming SlideShare
Loading in...5
×
 

Lamp configuration u buntu 10.04

on

  • 1,776 views

 

Statistics

Views

Total Views
1,776
Views on SlideShare
1,776
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Lamp configuration   u buntu 10.04 Lamp configuration u buntu 10.04 Document Transcript

  • LAMP CONFIGURATION – UBUNTU SERVER 10.04 LTS<br />===============================================================================<br />
    • Install the Server + Apache MySQL PHP
    • Install uBuntu 10.04 Server Edition with minimum packages. (Should be ~1GB at the end).
    • Check the hostname is correct.
    • sudo vi /etc/hosts
    • Check the host address is correct (check /etc/network/interfaces file). Modify the interface entry:
    • auto eth0
    • iface eth0 inet static
    • address XXX.XXX.XXX.XXX
    • netmask XXX.XXX.XXX.XXX
    • network XXX.XXX.XXX.XXX
    • broadcast XXX.XXX.XXX.XXX
    • gateway XXX.XXX.XXX.XXX
    • Check the DNS setting file /etc/resolv.conf.
    • name server XXX.XXX.XXX.XXX
    • (Optional) Remove dhcp-client (or dhcp3-client) and restart the network.
    • sudo apt-get remove dhcp-client
    • sudo /etc/init.d/networking restart
    • Update the stock uBuntu to the latest updates. (should be 10.04 update 3 now)
    sudo apt-get update && sudo apt-get upgrade<br />sudo apt-get install curl<br />
    • If the add-apt-repository command is not found, try to update this package:
    • sudo apt-get install --reinstall python-software-properties
    • Install Apache MySQL PHP
    • Install the Apache, MySQL, and PHP
    sudo apt-get install apache2 php5 php5-cli php5-gd php-pear php5-curl php5-mcrypt php5-dev apache2-dev <br />sudo apt-get install mysql-server php5-mysql<br />sudo a2dismod cgi autoindex<br />sudo a2enmod deflate expires rewrite vhost_alias<br />sudo pecl install apc<br />sudo pecl install bcompiler<br />
    • Install PECL uploadprogress module
    cd /tmp<br />wget http://pecl.php.net/get/uploadprogress-1.0.2.tgz<br />gunzip uploadprogress-1.0.2.tgz<br />tar –xvf uploadprogress-1.0.2.tar<br />cd uploadprogress-1.0.2<br />phpize<br />./configure<br />make<br />sudo make install<br />
    • Edit the extension_dir directive and add apc.so, bcompiler.so, curl.so, mcrypt.so, uploadprogress.so extensions to php.ini
    • extension_dir = “/usr/lib/php5/20090626+lfs/”
    • extension=apc.so
    • extension=bcompiler.so
    • extension=curl.so
    • extension=mcrypt.so
    • extension=uploadprogress.so
    • Check whether the rewrite module is loaded and enabled:
    sudo apache2ctl -M<br />
    • If it not in the list, then enable the module with:
    sudo a2enmod rewrite<br />
    • Restart Apache webserver.
    • Edit the default file (or site configuration file) in /etc/apache2/sites-available, change the AllowOverride None to AllowOverride All.
    • ----------- CAUTION!!! DO NOT USE STEP 13-17 FOR PRODUCTION ENVIRONMENT!!! -------------
    • Open port 3306 for remote access to mySQL server.
    • /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
    /sbin/iptables-save > /etc/iptables.rules<br />
    • Enable the remote access to mySQL server (/etc/mysql/my.cnf),
    • make sure the "skip-networking" and/or "bind-address = 127.0.0.1" is commented.
    • Restart MySQL server.
    • sudo service mysql restart
    • Enable the remote access to mySQL server.
    • mysql -u root -p mysql
    • mysql> CREATE USER 'root'@'remote_machine_address' IDENTIFIED BY 'your password';
    • mysql> GRANT ALL PRIVILEGES ON * . * TO 'root'@'remote_machine_address' WITH GRANT OPTION;
    • Create a new database using HeidiSQL or other SQL GUI tools.
    • --------------------------------------------------------------------------------------------------------------------------------
    • Install Drush
    • Install Drush and Drush Make.
    • cd /usr/local/src
    • wget http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz
    • wget http://ftp.drupal.org/files/projects/drush_make-6.x-2.2.tar.gz
    • tar -xzf drush-7.x-4.4.tar.gz
    • tar -xzf drush_make-6.x-2.2.tar.gz
    • rm drush*.tar.gz
    • mkdir /etc/drush
    • cp /usr/local/src/drush/examples/example.drushrc.php /etc/drush/drushrc.php
    • ln -s /usr/local/src/drush/drush /usr/local/bin/drush
    • Edit /etc/drush/drushrc.php to add Drush Make to include path.
    • $options['i'] = '/usr/local/src/drush_make';
    • Install Virtualmin
    • Log in as root:
    • sudo -s
    • Backup and add webmin/virtualmin repositories and GPG keys
    • cp /etc/apt/sources.list /etc/apt/sources.list-bak
    • vi /etc/apt/sources.list
    • add three repositories to the list:
    • deb http://download.webmin.com/download/repository sarge contrib
    • deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
    • deb http://software.virtualmin.com/gpl/debian virtualmin-universal main
    • import the pgp keys:
    • cd /tmp
    • wget http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin
    • wget http://www.webmin.com/jcameron-key.asc
    • apt-key add jcameron-key.asc
    • apt-key add RPM-GPG-KEY-virtualmin
    • update the repositories:
    • apt-get -y update
    • apt-get -y upgrade
    • install package dependencies:
    • wget http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-lucid/main/binary-i386/procmail-wrapper_1.0-2_i386.deb
    • dpkg -i procmail-wrapper_1.0-2_i386.deb
    • set the server's hostname:
    • /bin/hostname server.domain.com
    • use the virtualmin GPL Auto-install script:
    • wget http://software.virtualmin.com/gpl/scripts/install.sh
    • chmod u+x install.sh
    • /tmp/install.sh
    • check hostname has full domain in it:
    • hostname –f
    • Configure the Virtualmin, especially the Virtual hosts part.
    =============================================================================== <br />Some good references:<br />http://jeffbeeman.com/node/117<br />http://drupal.org/node/134439<br />http://drupal.org/node/15365<br />http://civicactions.com/blog/2010/may/26/ubuntu_1004_and_drupal<br />http://2bits.com/drupal-planet/various-ways-running-php-52-ubuntu-1004-lucid-lynx.html<br />https://help.ubuntu.com/community/ApacheMySQLPHP <br />https://help.ubuntu.com/community/Drupal<br />http://www.semioticpixels.com/2010/05/setting-up-ubuntu-lucid-10-04-for-web-development-part-1/<br />http://technotes.trostfamily.org/?p=83<br />http://library.linode.com/lamp-guides/ubuntu-10.04-lucid <br />http://blog.breidert.net/php-5-2-and-php-5-3-for-drupal-applications-under-apache-on-ubuntu-10-04-lts/<br />http://earthviaradio.wordpress.com/2011/02/04/compiling-php-5-2-for-ubuntu-10-10/<br />http://fordrupal.com/blog/setup-ubuntu-vpsserver-drupal<br />http://fordrupal.com/blog/ubuntu-production-setup-vpsserver-drupal-part-2<br />http://freestylesystems.co.uk/blog/installing-pecl-uploadprogress-extension-drupal-filefield-30-module<br />http://www.avargas.info/index.php?option=com_content&task=view&id=11&Itemid=1<br />http://ppa.launchpad.net/andphe/php/ubuntu/pool/main/p/php5/<br />http://stackoverflow.com/questions/4698154/why-wont-my-mod-rewrite-rule-work-under-apache2-debian-virtualmin<br />===============================================================================<br />