User Tools

Site Tools


software:drupal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
software:drupal [2017/10/08 18:46] – [Setup on Ubuntu for personal use] superwizardsoftware:drupal [2017/10/15 03:52] superwizard
Line 1: Line 1:
-====== Setup Drupal with Composer ======+====== Setup Drupal with Composer  
 +Setup on Ubuntu for personal use ====== 
 + 
 +=== First Setup LAMP === 
 + 
 +From: http://www.howtogeek.com/howto/42480/how-to-turn-your-home-ubuntu-pc-into-a-lamp-web-server/ 
 + 
 +<code> 
 +sudo apt-get install lamp-server^ 
 +http://localhost/ 
 + 
 +Note: Ubuntu 16.4 has moved website to html directory and default www is:  /var/www/ 
 +sudo nano /var/www/html/testing.php 
 +<?php phpinfo(); ?> 
 +sudo service apache2 restart 
 +http://localhost/testing.php 
 + 
 +cat /etc/hosts | grep localhost 
 + 
 +Note: Ubuntu 16.4 has mysql configuration in "/etc/mysql/mysql.conf.d" 
 +sudo nano /etc/mysql/mysql.conf.d 
 + 
 +sudo apt-get install phpmyadmin 
 + 
 +Note: must install some xtra for mbstring 
 +sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0 
 +sudo service apache2 restart 
 +sudo systemctl restart apache2 
 +http://localhost/phpmyadmin/ 
 +U: root 
 +P: whatyouuse 
 +</code> 
 + 
 +From: https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite 
 + 
 +<code> 
 +sudo a2enmod rewrite 
 +</code> 
 + 
 + 
 +=== Next is the Database This case is MySql === 
 + 
 +From: http://linoxide.com/ubuntu-how-to/install-drupal-7-x-apache-2-x-ubuntu/ 
 + 
 +<code> 
 + 
 +    mysql -u root -p 
 + 
 +Once Successful login to the Mysql Server, we'll use these command to create database for  
 +drupal. In this case I will give the name of the drupal database as drupaldb, You can call  
 +this whatever you would like. 
 + 
 +    CREATE DATABASE drupaldb; 
 + 
 +Next, we are going to create a separate MySQL user account and give this user a password. On  
 +this case we will call the new account “linoxideuser” and password for new account “drupaLinoxide1“,  
 +you should definitely change the password for your installation and can name the user whatever you’d  
 +like but make sure you don't forget the database name,username and password. You can do this by  
 +typing the following command: 
 + 
 +    CREATE USER linoxideuser@localhost IDENTIFIED BY 'drupaLinoxide1'; 
 + 
 +Next, grant all privileges on the database you just created to the new user by running the commands  
 +below 
 + 
 +    GRANT ALL PRIVILEGES ON drupaldb.* TO linoxideuser@localhost; 
 + 
 +We need to flush the privileges so that the current instance of MySQL knows about the recent  
 +privilege changes we’ve made: 
 + 
 +    FLUSH PRIVILEGES; 
 + 
 +And finally we exit the MySQL terminal by entering: 
 + 
 +    exit; 
 +</code> 
 + 
 +=== Setup Drupal website Without Composer See next section for Composer install === 
 + 
 +From: http://linoxide.com/ubuntu-how-to/install-drupal-7-x-apache-2-x-ubuntu/ 
 + 
 +<code> 
 +sudo rsync -avP /home/marcus/Downloads/drupal-8.1.1/   /var/www/html 
 +mv /var/www/html/index.html /var/www/html/index_apache2.html 
 +apache2ctl -M 
 +sudo mkdir /var/www/html/sites/default/files 
 +sudo chmod a+w  /var/www/html/sites/default/files 
 +sudo cp /var/www/html/sites/default/default.settings.php  /var/www/html/sites/default/settings.php 
 +sudo chmod a+w /var/www/html/sites/default/settings.php 
 + 
 +rerun install 
 + 
 +sudo chmod go-w /var/www/html/sites/default/settings.php 
 +sudo chmod go-w  /var/www/html/sites/default 
 + 
 +sudo nano /etc/apache2/apache2.conf 
 + 
 +<Directory /var/www/> 
 +        Options Indexes FollowSymLinks 
 +        AllowOverride All 
 +        Require all granted 
 +</Directory> 
 + 
 +sudo service apache2 restart 
 +sudo systemctl restart apache2 
 + 
 + 
 +sudo chmod a+w /var/www/html/web/sites/default/settings.php 
 +sudo nano /var/www/html/web/sites/default/settings.php 
 + 
 + 
 +$settings['trusted_host_patterns'] = array( 
 +  '^127\.0\.0\.1$', 
 +  '^localhost$', 
 +  '^drupal\.example\.com$', 
 +); 
 + 
 + 
 +sudo chmod go-w /var/www/html/web/sites/default/settings.php 
 +</code>
  
 ==== Download Composer ==== ==== Download Composer ====
Line 38: Line 157:
 </code> </code>
  
-From: +<code> 
 +Ubuntu 17.04 
 +composer create-project drupal-composer/drupal-project:8.x-dev  /var/www/html/ --stability dev --no-interaction 
 + 
 +Results say: 
 +Create a sites/default/settings.php file with chmod 0666 
 +Create a sites/default/files directory with chmod 0777 
 +</code> 
 + 
 +==== Ubuntu Setup Virtual host for domain = wellcreateddomain.name ==== 
 + 
 +From: https://help.ubuntu.com/14.04/serverguide/serverguide.pdf 
 +  
 +<code> 
 +Ubuntu 17.04 
 + 
 +sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/wellcreateddomain.conf 
 + 
 +if need add to hosts 
 + 
 +127.0.0.1 wellcreateddomain.name 
 +</code> 
 + 
 +sudo mkdir /var/www/html/sites/default/files 
 +sudo chmod a+w  /var/www/html/sites/default/files 
 +sudo cp /var/www/html/sites/default/default.settings.php  /var/www/html/sites/default/settings.php 
 +sudo chmod a+w /var/www/html/sites/default/settings.php 
 + 
 +rerun install 
 + 
 +sudo chmod go-w /var/www/html/sites/default/settings.php 
 +sudo chmod go-w  /var/www/html/sites/default 
 + 
 +==== Ubuntu after copy of Drupal to web location setup setting.php ==== 
 + 
 +From: https://linoxide.com/ubuntu-how-to/install-drupal-7-x-apache-2-x-ubuntu/ 
 +  
 +<code> 
 +compose done - sudo mkdir /var/www/html/web/sites/default/files 
 +compose done - sudo chmod a+w  /var/www/html/web/sites/default/files 
 +compose done - sudo cp /var/www/html/web/sites/default/default.settings.php  /var/www/html/sites/default/settings.php 
 +compose done - sudo chmod a+w /var/www/html/web/sites/default/settings.php 
 + 
 +sudo chown -R www-data:www-data /var/www/html/web 
 + 
 +rerun install 
 + 
 +sudo chmod go-w /var/www/html/web/sites/default/settings.php 
 +sudo chmod go-w  /var/www/html/web/sites/default 
 + 
 +</code>
  
  
software/drupal.txt · Last modified: 2018/10/18 22:43 by superwizard