Your SlideShare is downloading. ×
Lamp configuration   u buntu 10.04
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Lamp configuration u buntu 10.04

1,539

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,539
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×