Installing Drupal 7.0 on OpenSuSE 12.2



Drupal is a free and open-source content management system written in PHP and distributed under the terms of the GNU GPL. It is used for personal blogging, data storage, knowledge management, political and business sites.

This guide is about installing and configuring Drupal 7.0 on OpenSuSE 12.2


Requirements (before starting the steps):
- Install LAMP (Linux Apache MySQL PHP) by following the steps found in this link.

Once LAMP has been installed, you may proceed with this guide.

 1. Access terminal, by clicking on Activities, Applications and either Xterm or Gnome Terminal (either cli's would suffice).

2. On your terminal, log in w/ root privileges by typing su.

3. Type cd /srv/www/htdocs/ to access the apache folder.

4. Create a folder for drupal by typing mkdir drupal

5. Download the drupal7 package by typing wget http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz

6. Extract the contents of your drupal 7 package by typing tar xzf drupal-7.0.tar.gz

7. Move the contents of drupal-7.0 to the /drupal directory - by typing mv drupal-7.0/* drupal

8. Remove the drupal-7.0 directory and the package as well, by typing rm- fr drupal-7.0 drupal-7.0.tar.gz

9. Now to start the installation proper, go to the /sites/default directory by typing cd drupal/sites/default/

10. Duplicate the file named 'default.settings.php' to 'settings.php' by typing cp -p default.settings.php settings.php

11. Edit the permissions of your drupal folder by typing chown -R wwwrun:root /srv/www/htdocs/drupal/*

12. Create drupal's database in mysql by typing mysql -u <yourrootusername> -p and typing create database drupal;

13. Go to your browser and access Drupal 7 by typing localhost/drupal/ . This screen should appear. For this guide, I'm selecting the Standard installation choice. Click on save and continue (until you reach the set up database portion).

14. If you're stuck in the Verify requirements part, with an error about drupal not having permissions to a certain directory, please refer to step 11, to continue.

15. If you were able to reach this screen, type drupal in the Database name field, and your mysql root username and mysql root password in the Database username and password fields respectively. Press save and continue afterwards.

16. Enter the required fields in this page.

17. If you reached this page, you have successfully installed Drupal 7 on OpenSuSE 12.2! Congrats.

Installing phpmyadmin on OpenSuSE 12.2


phpMyAdmin is a free and open source tool used to handle mySQL database functionalities via web browser. Creating, editing or dropping databases, fields or tables can be done in this tool with a click of a button (instead of typing long queries).

This is a simple guide intended to install phpMyAdmin version 3.5.3 on OpenSuSE 12.2.

First of all, you have to have LAMP (Linux Apache MySQL and PHP) installed and configured, if you haven't done so yet, follow the steps in this link, before proceeding here.

And, Lastly, this guide is intended for the installation of phpMyAdmin on the OpenSuSE version 12.2 operating system. 




1. Go to Activities > Applications > (scroll down) and click on Xterm

2. Type su to access root / admin privileges, and input your password.

3. Type the following command: zypper install phpMyAdmin (take note of the spelling, it's not spelled as phpmyadmin.)


4. Restart your apache2 server by typing rcapache2 restart 



5. Go to your browser and type localhost/phpMyAdmin and you may now log-in using your root username and password. At this point you have succesfully installed phpMyAdmin in OpenSuSE 12.2.



Installing LAMP in OpenSuSE 12.2

 

"LAMP is a solution stack of free, open source software. The acronym LAMP refers to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP -- principal components to build a viable general purpose web server." -- LAMP wiki article

Though, the letters M and P could also stand for MariaDB, Perl and Python respectively, this was made as a guide to install and configure Apache, MySQL and PHP on OpenSuSE 12.2.



Installing Apache webserver

1. Go to Activities > Applications > (scroll down) and click on Xterm

2. Type su to access root / admin privileges, and input your password.

3. Type the following command: zypper in apache2

4. Upon installation, restart your apache webserver by typing the following comand: rcapache2 restart.

5. You can check if apache2 is running by typing the following command: service apache2 status -- it should say "active (running)..".. if otherwise, type rcapache2 start -- that should start apache.

6. Now to verify (again) if your server is running, go to /srv/www/htdocs/ by typing cd /srv/www/htdocs/ and type nano index.html .

7. In the text editor, type any message you want, press ctrl X (to exit), and save your file.

8. In your browser, type localhost and -- you will see the text you have placed in your index.html file! (you can verify these methods, by stopping your apache2 server, and accessing localhost again in your browser). When you see index.html's contents, you have successfully installed the apache web server.


Installing MySQL

1. Go to Activities > Applications > (scroll down) and click on Xterm

2. Type su to access root / admin privileges


3. Type the following command: zypper in mysql mysql-client mysql-community-server


4. Upon MySQL's installation, type reboot (to restart your machine).


5. Now, go back to your terminal (still in root privileges), and start MySQL by typing systemctl enable mysql.service and systemctl start mysql.service


6. Secure your MySQL installation by typing mysql_secure_installation


7. On the password question, just press enter.


8. Set up your root password (press y), and type in your new MySQL root password (twice for verification) Note: please choose an easy to recall password.


9. Remove anonymous users, disallow remote root login and remove test db's and access by pressing y for the three questions. (you can press n - no - for some of these questions, but for this guide, this is my method.)


10. Reload privilege tables by pressing y. At this point, you have successfully installed - and - configured MySQL on OpenSuSE



Installing PHP

1. Go to Activities > Applications > (scroll down) and click on Xterm


2. Type su to access root / admin privileges, and input your password.


3. Type the following command: zypper in php5 apache2-mod_php5 .. Then type rcapache2 restart after installation.


4. Now to verify if your php is installed, go to /srv/www/htdocs/ by typing cd /srv/www/htdocs/ and type nano info.php .


5. In the text editor, type <?php phpinfo(); ?> and save your file.


6. Go to your browser and type localhost/info.php you should be able to see your php version, and the various plug-ins it came with upon installation.



At this point you have successfully installed LAMP on OpenSuSE congratulations.