LAMP CONFIGURATION – UBUNTU SERVER 10.04 LTS<br />========================================================================...
Install uBuntu 10.04 Server Edition with minimum packages. (Should be ~1GB at the end).
Check the hostname is correct.
sudo vi /etc/hosts
Upcoming SlideShare
Loading in...5
×

Lamp configuration u buntu 10.04

1,569

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,569
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lamp configuration u buntu 10.04

  1. 1. LAMP CONFIGURATION – UBUNTU SERVER 10.04 LTS<br />===============================================================================<br /><ul><li>Install the Server + Apache MySQL PHP
  2. 2. Install uBuntu 10.04 Server Edition with minimum packages. (Should be ~1GB at the end).
  3. 3. Check the hostname is correct.
  4. 4. sudo vi /etc/hosts
  5. 5. Check the host address is correct (check /etc/network/interfaces file). Modify the interface entry:
  6. 6. auto eth0
  7. 7. iface eth0 inet static
  8. 8. address XXX.XXX.XXX.XXX
  9. 9. netmask XXX.XXX.XXX.XXX
  10. 10. network XXX.XXX.XXX.XXX
  11. 11. broadcast XXX.XXX.XXX.XXX
  12. 12. gateway XXX.XXX.XXX.XXX
  13. 13. Check the DNS setting file /etc/resolv.conf.
  14. 14. name server XXX.XXX.XXX.XXX
  15. 15. (Optional) Remove dhcp-client (or dhcp3-client) and restart the network.
  16. 16. sudo apt-get remove dhcp-client
  17. 17. sudo /etc/init.d/networking restart
  18. 18. Update the stock uBuntu to the latest updates. (should be 10.04 update 3 now)</li></ul>sudo apt-get update && sudo apt-get upgrade<br />sudo apt-get install curl<br /><ul><li>If the add-apt-repository command is not found, try to update this package:
  19. 19. sudo apt-get install --reinstall python-software-properties
  20. 20. Install Apache MySQL PHP
  21. 21. Install the Apache, MySQL, and PHP</li></ul>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 /><ul><li>Install PECL uploadprogress module</li></ul>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 /><ul><li>Edit the extension_dir directive and add apc.so, bcompiler.so, curl.so, mcrypt.so, uploadprogress.so extensions to php.ini
  22. 22. extension_dir = “/usr/lib/php5/20090626+lfs/”
  23. 23. extension=apc.so
  24. 24. extension=bcompiler.so
  25. 25. extension=curl.so
  26. 26. extension=mcrypt.so
  27. 27. extension=uploadprogress.so
  28. 28. Check whether the rewrite module is loaded and enabled:</li></ul>sudo apache2ctl -M<br /><ul><li>If it not in the list, then enable the module with:</li></ul>sudo a2enmod rewrite<br /><ul><li>Restart Apache webserver.
  29. 29. Edit the default file (or site configuration file) in /etc/apache2/sites-available, change the AllowOverride None to AllowOverride All.
  30. 30. ----------- CAUTION!!! DO NOT USE STEP 13-17 FOR PRODUCTION ENVIRONMENT!!! -------------
  31. 31. Open port 3306 for remote access to mySQL server.
  32. 32. /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT</li></ul>/sbin/iptables-save > /etc/iptables.rules<br /><ul><li>Enable the remote access to mySQL server (/etc/mysql/my.cnf),
  33. 33. make sure the "skip-networking" and/or "bind-address = 127.0.0.1" is commented.
  34. 34. Restart MySQL server.
  35. 35. sudo service mysql restart
  36. 36. Enable the remote access to mySQL server.
  37. 37. mysql -u root -p mysql
  38. 38. mysql> CREATE USER 'root'@'remote_machine_address' IDENTIFIED BY 'your password';
  39. 39. mysql> GRANT ALL PRIVILEGES ON * . * TO 'root'@'remote_machine_address' WITH GRANT OPTION;
  40. 40. Create a new database using HeidiSQL or other SQL GUI tools.
  41. 41. --------------------------------------------------------------------------------------------------------------------------------
  42. 42. Install Drush
  43. 43. Install Drush and Drush Make.
  44. 44. cd /usr/local/src
  45. 45. wget http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz
  46. 46. wget http://ftp.drupal.org/files/projects/drush_make-6.x-2.2.tar.gz
  47. 47. tar -xzf drush-7.x-4.4.tar.gz
  48. 48. tar -xzf drush_make-6.x-2.2.tar.gz
  49. 49. rm drush*.tar.gz
  50. 50. mkdir /etc/drush
  51. 51. cp /usr/local/src/drush/examples/example.drushrc.php /etc/drush/drushrc.php
  52. 52. ln -s /usr/local/src/drush/drush /usr/local/bin/drush
  53. 53. Edit /etc/drush/drushrc.php to add Drush Make to include path.
  54. 54. $options['i'] = '/usr/local/src/drush_make';
  55. 55. Install Virtualmin
  56. 56. Log in as root:
  57. 57. sudo -s
  58. 58. Backup and add webmin/virtualmin repositories and GPG keys
  59. 59. cp /etc/apt/sources.list /etc/apt/sources.list-bak
  60. 60. vi /etc/apt/sources.list
  61. 61. add three repositories to the list:
  62. 62. deb http://download.webmin.com/download/repository sarge contrib
  63. 63. deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
  64. 64. deb http://software.virtualmin.com/gpl/debian virtualmin-universal main
  65. 65. import the pgp keys:
  66. 66. cd /tmp
  67. 67. wget http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin
  68. 68. wget http://www.webmin.com/jcameron-key.asc
  69. 69. apt-key add jcameron-key.asc
  70. 70. apt-key add RPM-GPG-KEY-virtualmin
  71. 71. update the repositories:
  72. 72. apt-get -y update
  73. 73. apt-get -y upgrade
  74. 74. install package dependencies:
  75. 75. wget http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-lucid/main/binary-i386/procmail-wrapper_1.0-2_i386.deb
  76. 76. dpkg -i procmail-wrapper_1.0-2_i386.deb
  77. 77. set the server's hostname:
  78. 78. /bin/hostname server.domain.com
  79. 79. use the virtualmin GPL Auto-install script:
  80. 80. wget http://software.virtualmin.com/gpl/scripts/install.sh
  81. 81. chmod u+x install.sh
  82. 82. /tmp/install.sh
  83. 83. check hostname has full domain in it:
  84. 84. hostname –f
  85. 85. Configure the Virtualmin, especially the Virtual hosts part.</li></ul>=============================================================================== <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 />

×