{"id":1813,"date":"2014-02-11T15:30:13","date_gmt":"2014-02-11T13:30:13","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=1813"},"modified":"2014-02-14T22:32:03","modified_gmt":"2014-02-14T20:32:03","slug":"ubuntu-server-12-04-drupal-install-modules-and-themes","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=1813","title":{"rendered":"Ubuntu Server 12.04 \/ Drupal Install Modules and themes"},"content":{"rendered":"<h2>Easy LAMP server installation<\/h2>\n<p>The easiest method is to use a single command from the command-line terminal, which installs the entire LAMP stack in an integrated package:<\/p>\n<pre>sudo tasksel install lamp-server<\/pre>\n<p>If your system doesn&#8217;t provide the tasksel command, then install it:<\/p>\n<pre>sudo apt-get install tasksel<\/pre>\n<p>I also (optionally) recommend enabling the rewrite functions of Apache2, which helps with many modules in Drupal and with the correct redirection of web-pages on your Apache server:<\/p>\n<p>Edit the file &#8220;\/etc\/apache2\/sites-available\/default&#8221; and replace every occurrence of &#8220;<strong>AllowOverride none<\/strong>&#8221; with &#8220;<strong>AllowOverride All<\/strong>&#8220;, then run:<\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/default<\/pre>\n<p>&nbsp;<\/p>\n<pre>sudo a2enmod rewrite\r\nsudo service apache2 restart<\/pre>\n<p>You have an Intranet Drupal. If you want to upload modules and themes from internet, you must give the right permissions and DNS server when you have a fiwed ip in internal network<\/p>\n<p>Things to check :<\/p>\n<p>You&#8217;ve got nameservers defined in \/etc\/resolv.conf and put your internal DNS name server instead default below :<\/p>\n<p><strong><code>\/etc\/resolv.conf <\/code>:<\/strong><\/p>\n<pre><code>nameserver 8.8.8.8\r\nnameserver 8.8.4.4\r\n<\/code><\/pre>\n<p>You&#8217;ve got a default gateway (proxy ip) in your routing table:<\/p>\n<p><strong><code>ip route<\/code><\/strong><\/p>\n<pre><code>tom.oconnor@charcoal-black:~$ ip route\r\n192.168.122.0\/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 \r\n169.254.0.0\/16 dev eth0  scope link  metric 1000 \r\n192.168.0.0\/16 dev eth0  proto kernel  scope link  src 192.168.100.27 \r\ndefault via 192.168.1.1 dev eth0  metric 100 \r\n<\/code><\/pre>\n<p>Default route is the one that starts &#8220;<strong><code>default via\"<\/code><\/strong><\/p>\n<h2 id=\"Clean_URLs\">Clean URLs<\/h2>\n<p><strong>Have Clean URL activated in Drupal :<\/strong><\/p>\n<p>The rewrite_module must be loaded in Apache.<\/p>\n<p>in file &#8216;default&#8217; (etc\/apache2\/sites-available\/default)<br \/>\nchange for the Directory \/var\/www<br \/>\nAllowOverride None<br \/>\nto AllowOverride All<\/p>\n<h2 id=\"Clean_URLs\">Clean URLs<\/h2>\n<p>To get Clean URLs working, you need to uncomment and change the value of RewriteBase in the htaccess file in your drupal folder to &#8216;\/drupal&#8217;:<\/p>\n<p>Modify the RewriteBase if you are using Drupal in a subdirectory or in a VirtualDocumentRoot and the rewrite rules are not working properly. For example if your site is at <a href=\"http:\/\/example.com\/drupal\">http:\/\/example.com\/drupal<\/a> uncomment and modify the following line:<\/p>\n<pre>sudo nano \/var\/www\/drupal\/.htaccess<\/pre>\n<pre>  # RewriteBase \/drupal<\/pre>\n<p>to<\/p>\n<pre>    RewriteBase \/drupal<\/pre>\n<h2>Giving the right to Apache on www folders for installing remote modules :<\/h2>\n<p>For Manual installation by ftp transfer, It is required to create a <em>files<\/em> subdirectory in your drupal default site installation directory. It will be used for files such as custom logos, user avatars, and other media associated with your new site.<\/p>\n<pre>sudo mkdir \/var\/www\/drupal\/sites\/default\/files\r\nsudo chown www-data:www-data \/var\/www\/drupal\/sites\/default\/files<\/pre>\n<p>It is also required to create the initial configuration file for the default site.<\/p>\n<pre>sudo cp \/var\/www\/drupal\/sites\/default\/default.settings.php \/var\/www\/drupal\/sites\/default\/settings.php\r\nsudo chown www-data:www-data \/var\/www\/drupal\/sites\/default\/settings.php<\/pre>\n<h3 id=\"Write_Access\">Write Access<\/h3>\n<p>If you not to worried about security then changing write access is the quick method<\/p>\n<p>When the user is www-data:<\/p>\n<pre>sudo chown www-data:www-data -R \/var\/www\/drupal\/sites<\/pre>\n<h3>Add an existing user to www-data group<\/h3>\n<p>Type the following command to add an existing user called <strong>mimas<\/strong> to the www-data group, enter:<\/p>\n<pre>\u00a0\r\nsudo usermod -a -G www-data  mimas\r\nid mimas\r\ngroups mimas<\/pre>\n<h3>Making www-data user and group drupal folder owner<\/h3>\n<pre> sudo chown www-data:www-data -R \/var\/www\/drupal<\/pre>\n<p><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2014\/02\/mimas.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1820\" alt=\"mimas\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2014\/02\/mimas.jpg\" width=\"721\" height=\"277\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2014\/02\/mimas.jpg 721w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2014\/02\/mimas-300x115.jpg 300w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/><\/a><\/p>\n<h2 id=\"Adjust_PHP_memory_limit\">Adjust PHP memory limit<\/h2>\n<p>You should increase the default PHP memory limit value (the amount of memory dedicated to running scripts), since the default 8 MB is not sufficient. Use 96 MB (or even 160M) if you intend to use graphics (although for simple uses 32 MB may be sufficient).<\/p>\n<p>In newer versions of Drupal6, you can simply edit the settings.php file and add the line:<\/p>\n<pre>ini_set('memory_limit', '96M');<\/pre>\n<p>It is also possible to increase the amount of PHP memory using this method:<\/p>\n<p>Edit the <strong>\/etc\/php5\/apache2\/php.ini<\/strong> file and increase the memory_limit value to 96M (or another value of your choice).<\/p>\n<p>If using PostgreSQL, you can also edit the \/etc\/php5\/apache2\/php.ini file to accommodate PostgreSQL options by adding the line:<\/p>\n<pre>extensions=pgsql.so;<\/pre>\n<p>&nbsp;<\/p>\n<h2 id=\"Adjust_PHP_Error_Reporting\">Adjust PHP Error Reporting<\/h2>\n<p>An adjustment to the error reporting is required for the install.php page to come up properly. Edit your settings.php file (e.g., \/etc\/drupal\/6\/sites\/default\/settings.php) and add the following ini_set line after the existing ini_set lines:<\/p>\n<pre>ini_set('error_reporting',          4096);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Easy LAMP server installation The easiest method is to use a single command from the command-line terminal, which installs the entire LAMP stack in an integrated package: sudo tasksel install lamp-server If your system&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2843,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[139,209,14],"tags":[57,273],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1813"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1813"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1813\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2843"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}