Skip to main content

Installing Drupal 7 on Oracle Linux 7 (Part 1.1)

    To install Drupal 7 from its yum repository, you may need to enable the ol7_developer_EPEL repo.  If yum-utils is installed, you can use the yum-config-manager command to do this (you may have to use sudo).

#    yum install yum-utils
#    yum-config-manager --enable ol7_developer_EPEL

    Once you have the repo installed, it's, then, just a matter of installing it from there:

#  yum install drupal7

    This command will install Drupal 7 in the /usr/share/drupal7 directory.

    It will install the Apache HTTP 2.4 web server, but you'll have to install your database separately if it is not installed already.

    Assuming a database has not been installed, we have many options to set one up.  For this installation, I chose to run MySQL as a Docker container.  I took this approach so we can use Docker environment variables to automate the creation of a Drupal database.

    The Github link to the MySQL container I used is:

        https://github.com/mysql/mysql-docker

    The installation of the Docker engine on Oracle Linux is well-documented(https://docs.oracle.com/cd/E77565_01/E87205/html/docker_install_upgrade.html), so we won't spend much time talking about it.  I'll just mention you may want to consider adding your user to the docker group.

#    usermod -a -G docker $USER

    Naturally, you want to limit root access to the trusted members who need it.  This way, you can execute docker commands as a non-root user without sudo.  Note, once you execute this command, you'll have to fully log out and log back in again to see the change.
...

Popular posts from this blog

More Guice Please!!!: Re-Learning Google's Agile Lightweight Dependency Injection Library (Part 1.1)

Google Guice is used as a lightweight dependency injection framework that further assists developers in modularizing their applications.  Google shared this very useful library with the development community in 2010 in between the Java SE 6 and Java SE 7 releases.  This library is used in some of Java’s (and now Scala’s) most prominent libraries and platforms such as the Simian Army platform shared by Netflix.
We will begin our discussion of Google Guice with its Module interface.  In the Guice developers’ own words, ‘A Guice-based application is ultimately composed of little more than a set of modules and some bootstrapping code.’  We will not be using this interface directly, but it gives us a very good context from which to start.  Instead, we will be extending the abstract class that implements it -- intuitively named AbstractModule.  
If you ever get a chance to look at the Module interface JavaDoc or source code, you’ll see a configure method taking a parameter of type Binder.  
Li…

#processing @Microsoft #office #Excel files with @TheASF POI (part II)

...
     Apache POI's OPCPackage abstract class represents a container that can store multiple data objects.  It is central to the processing of Excel(*.xlsx) files.  We only need to use its static open method to process an InputStream instance.  Further, we can "read" these Excel files via the XSSFWorkbook class.  This class is a high level representation of a SpreadsheetML workbook.  From an XSSFWorkbook, we can get any existing XSSFSheets within the workbook.  Then, we can further subdivide any XSSFSheet into rows and analyze the cell data within the rows.  In general, given certain assumptions in the format of the Excel document, we can extract data as text  from a cell and perform any number of business processes.

     In the Java function code excerpt below, we assume we have an Excel(*.xlsx) file represented as an InputStream.

        @Override
    public Iterator<Row> apply(InputStream inputStream) {

        try(OPCPackage pkg = OPCPackage.open(…

Installing Drupal 7 on Oracle Linux 7 (Part 1.2)

Now, let's see if we can put together a docker command that will get our MySQL container up and running.  First, let's create a volume for our MySQL instance.

        docker volume create --name mysql_volume

    The following command, then, should create an instance of a MySQL container with a drupal database created on startup.

        docker run --restart=always -d -name mysql -p 3306:3306 \
        -e MYSQL_DATABASE=drupal \
        -e MYSQL_USER=drupal \
        -e MYSQL_PASSWORD=+3fRExawr7fu \
     -v mysql_volume:/var/lib/mysql \
     mysql/mysql-server

    After giving it a moment to get going, the 'docker ps' command should give us the status of our new container.

    We'll also want to execute a 'docker logs' command to get out temporary MySQL password.

     #docker logs mysql

    Next, in order to more easily handle the administration of our MySQL Server, we can run phpmyadmin(https://www.phpmyadmin.com) as a Docker container that's linked …