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.

Installing openSUSE-12.2 on Oracle Virtual Machine (VM)


"The openSUSE Project is an Free/Libre Software community developing a Linux distribution named openSUSE. The project is sponsored by a number of companies and individuals, most notably SUSE, AMD, B1 Systems, Heinlein Support and IP Exchange" -- The OpenSUSE Project

This is a step-by-step guide to install openSUSE in Oracle VM.


Before we start, get a copy of "openSuSE 12.2 GNOME Live CD (iso) i686" from this link.


1. Start Oracle VM and click on the New button.

2. Input openSuSE in the Name text field. Usually Oracle VM would automatically search for its version upon typing the name of the OS, but in case it doesn’t, select openSUSE from the Version combo box field. Click the Next button after filling up the necessary fields.


3. Set the memory size to 1024 MB (roughly 1GB) RAM, and click the Next button.

4. Select Create a virtual hard drive now, and click the Create button.

5. Select VDI, and click on the Next button.

6. Select Dynamically allocated, and click on the Next button.

7. By default, the allocated vdd space is set to 8.00 GB, you can set it to any value you are comfortable with, then click on the Create button. Also you can choose where to place your .vdi / virtual drive if you wish. Just click on the Folder with the green caret to choose where to save your .vdi.

8. Now, click on the Start button.

9. If this prompt pops up, click on the folder icon at the right and select your openSuSE 12.2 GNOME Live CD i686 iso file and press Start.

10. Press any key to halt the automatic boot sequence/countdown. Select Installation and press Enter.


11. Upon reaching this screen, you can select the language and the keyboard layout you prefer, by default it is both set to English (US). Click on the arrow button at the lower right corner of the screen to continue.

12. This screen displays the timezone settings, you can change it by clicking and selecting from the Region and the Time Zone combo boxes. Once you’ve selected, click on the Next button.

13. In this screen you can select what type of disk partitioning you prefer. (click on the more link if you wish to know more about which to select. For this guide, since we are installing on a VDI which is set to 8GB (as stated earlier), we are not going to Import any partitions from other Linux systems nor are we going to create a new partition (over the default partition). So click on the Next button to proceed.

14. Fill in the User’s Full Name, Username, Password and Confirm Password text fields here. It is important that you choose a username and password that is easy to remember.

15. This screen displays the summary / details of your preferred installation of openSuSE. If you are satisfied with these – click on the Install button.

16. Once the installation is finished, this prompt would appear, just click on the Reboot Now button.

17. Once the green installer screen reappears, click on any key, and select Boot from Hard Disk.



18. When you reach this screen, you have successfully installed OpenSuSE on your Oracle VM! You may now sign in.  (Note: if SuSE prompts to eject the installer iso from the CD Rom, please press eject – so that the next time you would boot up OpenSuse, the system would boot from the virtual drive, and not from the installer iso.).
 

Also click on the Devices tab (on Oracle VM),  and under CD/DVD Devices, uncheck the ISO file.