Its3 Drupal


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Its3 Drupal

  1. 1. ITS3 Installation of Drupal on CentOS Miriam Segondat
  2. 2. Introduction: <ul><li>As part fullfillment for the award of a BSc in Information Technology Support, I am required to complete an individual project. </li></ul><ul><li>I have chosen to install a Drupal CentOS client and server on a LAMP server. I choose Drupal as it is a widely used content management system and I wanted to learn more about it. </li></ul>
  3. 3. What is Drupal ? <ul><li>Drupal is a open source software package distributed under the GPL (“General Public Licence”). </li></ul><ul><li>It allows individual or community users to publish, manage and organise a wide variety of content on a website. </li></ul>
  4. 4. Benefits of the Drupal Content Management System – <ul><li>Drupal is wildly popular because it provides a powerful, scalable, low cost, high value solution to manage and grow an internet presence. </li></ul><ul><li>Drupal is open source. </li></ul><ul><li>Drupal is supported by a passionate community of thousands of developers who continuously work to enhance the functionality and security of Drupal to enterprise levels and beyond.. </li></ul>
  5. 5. How is Drupal installed ? <ul><li>The following shows a summary of the installation process that will be documented in this presentation. </li></ul><ul><li>System Requirements </li></ul><ul><li>Download Drupal </li></ul><ul><li>Grant write permissions on the configuration file </li></ul><ul><li>Create the database </li></ul><ul><li>Run the install script </li></ul><ul><li>Set up cron </li></ul><ul><li>Create a “files” directory for uploads </li></ul>
  6. 6. Web Server <ul><li>Apache </li></ul><ul><li>Drupal will work on Apache 1.3 or Apache 2.x hosted on UNIX/Linux, OS X, or Windows. The majority of Drupal development and deployment is done on Apache so there is more community experience and testing performed. </li></ul><ul><li>Drupal is being developed to be web server independent. </li></ul><ul><li>Drupal core files alone will take up approximately 2 to 3 MB uncompressed. </li></ul>
  7. 7. Web Server <ul><li>Php </li></ul><ul><li>The php version used for this project is 5.1.6 </li></ul><ul><li>PHP memory of 16 MB or higher for a default Drupal 6 installation. </li></ul><ul><li>Depending on the site's use of custom or contributed modules, PHP memory limit may need to be increased beyond 16 MB . </li></ul>
  8. 8. Database server <ul><li>The database server used in this project is MySql </li></ul>
  9. 9. What is CentOS ? <ul><li>CentOS is a Linux distribution built off the open-source, free packages prepared for Red Hat Enterprise Linux. </li></ul><ul><li>CentOS delivers the same level of security support through software updates, product lifetime and performance of other enterprise Linux solutions. </li></ul><ul><li>CentOS delivers the same access to industry standard software including full compatibility with software packages prepared specifically for Red Hat Enterprise Linux systems. </li></ul>
  10. 10. Installation of the operating system CentOS. Follow the instructions from the main screen below to complete installation.
  11. 11. Configure the LAMP server <ul><li>LAMP stands for Linux Apache MySQL and PHP. </li></ul><ul><li>The installation process is documented in the next few slides. </li></ul>
  12. 12. Install Apache 2.2 using the yum command <ul><li># yum install httpd </li></ul><ul><li>Once Apache is installed, make sure it starts the next time you boot Linux. </li></ul><ul><li># chkconfig httpd on </li></ul><ul><li>To determine whether the chkconfig command worked, use the --list switch: </li></ul><ul><li># chkconfig --list httpd </li></ul><ul><li>Apache starts and stops with the following commands: </li></ul><ul><li># apachectl stop # apachectl start </li></ul><ul><li>or # service httpd start # service httpd stop </li></ul>
  13. 13. If Apache installation is successful, the default Apache Web page screen should appear like the screen below :
  14. 14. eLinks <ul><li>A text-based browser called elinks is then installed with the following command: </li></ul><ul><li># yum install elinks </li></ul><ul><li>Start the elinks browser, pointing to the local system, with the following command: </li></ul><ul><li># elinks </li></ul>
  15. 15. PHP and MySQL <ul><li>PHP and MySQL is then installed as follows: </li></ul><ul><li># yum install php # yum install mysql-server mysql # apachectl stop # apachectl start # service mysqld start </li></ul>
  16. 16. Next set up a team in VMware, using a CentOS client and a CentOS server, on the configured LAMP server. <ul><ul><li>Power on the team. Put both onto the same LAN. </li></ul></ul>
  17. 17. Testing the Server <ul><li>Test out the Apache server from the server by typing the following command: </li></ul><ul><li>root@localhost # elinks </li></ul><ul><li>type http:// localhost in the url bar </li></ul><ul><li>If you can see the contents of the index.php file in the html directory, it means Apache is working. An example of what it should look like can be seen below. </li></ul>
  18. 18. index.php file
  19. 19. Testing the Client <ul><li>Open up a browser in Firefox with . Again the contents of the index.php file should be displayed. </li></ul><ul><li>To turn off the firewall type the following: </li></ul><ul><li>root@localhost # service iptables stop </li></ul><ul><li>Now the network adapter needs to be changed to bridged </li></ul><ul><li>Reboot the system </li></ul>
  20. 20. DHCP <ul><li>On the server type system-config-network and then press F12. A screen like the one below should appear. </li></ul><ul><li>Tab down to “Use DHCP” and press the space bar to place an * there, then press ok. </li></ul><ul><li>Tab down to quit and press ok. </li></ul><ul><li>Change the network adapter to bridged and reboot. </li></ul>
  21. 21. Installation of Drupal Packages <ul><li>#yum install httpd mod_ssl </li></ul><ul><li>#php php-gd </li></ul><ul><li>#php-mbstring </li></ul><ul><li>#php-mysql </li></ul><ul><li>#mysql-server </li></ul>
  22. 22. Install Drupal <ul><li>Drupal is installed from the drupal website . version 6.10. Follow the instructions to complete the installation process in the server. </li></ul><ul><li>Type wget </li></ul><ul><li>followed by tar -zxvf drupal-6.10.tar.gz to unzip the files. </li></ul><ul><li>This will create a new directory drupal-6.10 which contains all the drupal files and directories. </li></ul><ul><li>Now the contents of this directory are moved into the html directory with the following command. </li></ul><ul><li>mv drupal-6.10/* drupal-6.10/.htaccess /var/www/html </li></ul>
  23. 23. The MV command
  24. 24. Permissions <ul><li>To continue the server must be given back its static is address so again from the root directory type system-config-network. </li></ul><ul><li>Press F12 and manually insert the static ip address </li></ul><ul><li> as well as changing the network adapter back to LAN. </li></ul><ul><li>Next copy the default.settings.php file into the settings.php file in the /var/www/html/sites/default directory and give it full permissions (chmod 777 settings.php). </li></ul><ul><li>In the same directory create a sub-directory called files. This will allow for uploading files to the website and we can give full permissions as well. </li></ul>
  25. 25. copy the default.settings.php file into the settings.php file
  26. 26. Next open up elinks from the server and type in http://localhost . The following page is displayed:
  27. 27. Next open up the firefox browser in the client and type and press enter.
  28. 28. Click on each of the following to complete installation : <ul><li>Choose language </li></ul><ul><li>Verify requirements </li></ul><ul><li>Set up database </li></ul><ul><li>Install site </li></ul><ul><li>Configure site </li></ul><ul><li>Finished </li></ul>
  29. 29. Set up the database
  30. 30. Create the database in the server . <ul><li>Firstly type in the command service mysqld start to start mysql. </li></ul><ul><li>Then setup a password for root using the following command mysqladmin –u root –p password </li></ul><ul><li>login to mysql mysql –u root –p </li></ul><ul><li>Finally create the database using the command CREATE DATABASE drupal_devdb CHARACTER SET ‘utf8’ </li></ul>
  31. 31. Create the database in the server
  32. 32. Back to the Drupal Configuration <ul><li>Next go to the browser and continue the drupal configuration </li></ul><ul><li>Clicking on set up a database. </li></ul><ul><li>Enter in the same username, database and password. </li></ul><ul><li>Change the write permissions on the settings.php file by going to the server and doing a chmod 555. </li></ul>
  33. 33. Back at the browser the name and email details are entered: On scrolling down the page the remaining details are filled in then saved.
  34. 34. Theme Using the administrator tab the website was customised to change the theme to garland then some content was added.
  35. 35. Error Reporting shows the default error that will be displayed if a page is not found or access is denied.
  36. 36. Security Features : <ul><li>The status report shows how the various applications have been set up and are functioning correctly. </li></ul>
  37. 38. PERMISSIONS: <ul><li>In the default file a chmod 555 settings.php command changes back the write permissions on the php file. </li></ul>
  38. 39. CRON: <ul><li>Cron is configured as per diagram below. Cron is important in Drupal as checks for updates as well as routing maintenance tasks at specific intervals. </li></ul>
  39. 40. IPTABLES: <ul><li>The following command was added to the iptables to prevent having to turn off iptables everytime at boot up. With regard to security, it only allows tcp traffic through the firewall on port 80. </li></ul><ul><li>root@localhost # cd /etc/sysconfig </li></ul><ul><li>root@localhost sysconfig # vi iptables </li></ul><ul><li>press insert </li></ul><ul><li>type in the following line before the first –A RH rule </li></ul><ul><li>-A INPUT -s -p tcp -m tcp --dport 80 -j ACCEPT </li></ul>
  40. 41. IPTABLES: