![]() ![]() ![]() Next, make a directory for Drupal with this command: sudo mkdir /var/www/drupal ![]() (Make sure to append to drupaluser otherwise you’ll get a database error when you try to start Drupal for the first time.) Now that you’ve got your Drupal database and your Drupal database user, you’ll need to grant the user all permissions on the database (again, the password goes within the quotation marks, and is case sensitive): GRANT ALL PRIVILEGES ON drupal.* TO IDENTIFIED BY ‘password’ Then create a password for your new user (note that your password will actually go within the quotation marks, and is case-sensitive): SET PASSWORD FOR drupaluser = PASSWORD(“password”) While still in the MySQL command line client, type this: CREATE USER drupaluser Once the database is created, you’ll need to create a database user for Drupal to use. (Note that all commands entered in the MySQL local client must end with a semicolon to denote the end of the statement.) First, create a database for Drupal to use: CREATE DATABASE drupal Once this is completed, log into the MySQL command-line client: mysql -u root –pĮnter your MySQL root user password from above, and you’ll find yourself at the MySQL> local client prompt. Follow the default prompts to remove the testing database in MySQL: sudo mysql_secure_installation First, you’ll need to run MySQL’s install script: sudo mysql_install_dbĪnd then this command, to properly secure MySQL. Now we’ll need to prepare MySQL for use with Drupal. Restart Apache with this command, so it re-reads its configuration file: sudo /etc/init.d/apache2 restart Once you are in gedit, add the following line to the end of the file: AddType application/x-httpd-php.html You can of course use vi or emacs or the editor of your choice, but most new users seem to prefer gedit) You can do so quickly by using sudo cp /etc/apache2/nf ~/Desktop to save a copy to your Desktop. (Note that it’s a good idea to back up any system configuration file before editing it. To edit nf, use the following command: sudo -H gedit /etc/apache2/nf I’ve read differing things about this, but I have found in my own testing that Drupal would not function properly without it, since Apache did not properly interpret the PHP pages otherwise. Now that we’ve got our software installed and downloaded, we’ll need to configure it.įirst, you’ll probably need to add a line to your /etc/apache2/nf file. You can obtain it from here on the site. Install gd module for PHP: sudo apt-get install php5-gdįinally, download the Drupal software to your Downloads folder. Then install the MySQL module for PHP: sudo apt-get install php5-mysql Next, install PHP version 5: sudo apt-get install php5 MySQL is a big package, and depending on your connection and computer speed, it might take a while to install. For obvious reasons, you’ll want to remember this password, not least because we need it again in the following steps. Be sure to pick a strong password (a combination of lowercase, punctuation, and uppercase letters), since the root user has full access to all tables on all databases. Return to the Terminal and type this command: sudo apt-get install mysql-server-5.6ĭuring the installation you be will asked to provide a root password for MySQL. Once the installation is finished, you can test that Apache is working by opening up Firefox and navigating to If you see the “it works!” web page, you have Apache up and running. To install Apache, open up a Terminal window (Applications, Accessories, Terminal), and type the following command (note that all Terminal commands are case-sensitive): sudo apt-get install apache2įollow the prompts to install Apache. Once Ubuntu is installed and updated, you will need to install and configure four pieces of software to create a LAMP server to support Drupal: the Apache web server, the MySQL database server, PHP, and the MySQL module for PHP.īegin with the Apache web server. It's a mildly tricky setup, since you basically have to build a LAMP server from scratch, but here’s a step-by-step guide on how to do it.įirst, install Ubuntu into your machine of choice. You can use it for everything from a small blog to a major business or government site. Drupal is a free and open-source content-management system, and it’s surprisingly flexible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |