Artistic Research Platform Notes

Software configuration for commodity x86/86_64 linux art research platform.

Prerequisites

Assume Fedora 27.

Database Setup 1: server mysql

Both the wiki and wordpress require a database. So, pick the MySQL database, which is packaged as mariadb on Fedora.

dnf install -y mariadb-server php-mysqlnd phpMyAdmin

And enable and start it via

systemctl enable mariadb.service
systemctl start mariadb.service

Set the root password on the database

sudo mysqladmin -u root password

To use the web-ui to administer, go to

http://localhost/phpmyadmin/

Database Setup 2: per-user postgressql

For non-platform use, aka for individual users, pick the glom front-end for the postgres database. Some platform notes are here.

dnf install -y postgresql postgresql-server postgresql-libs postgresql-contrib phpPgAdmin

Initialize the database

postgresql-setup --initdb --unit postgresql

Then enable and start

systemctl enable postgresql
systemctl start postgresql

To use the web-ui to administer, go to

http://localhost/phppgadmin/

LOL, of course it is not that simple.

http://localhost:8080/phppgadmin

There is a graphical database called glom that is similar to FileMakerPro on the mac and Access on windows.

dnf install -y glom

Webserver Setup

Assume physical access to the server hardware, that there is a default install of the operating system, that the network is up, and that the static IP address of the server is 192.168.1.52. For any of the commands below, assume the root user or use of sudo.

Use the Apache httpd package. See the section of the Fedora System Administration Guide on Web Servers for background, and a quick install notes at Fedora magazine. After, read the getting started notes.

dnf install -y httpd mod_ssl

Then configure the webserver to start at boot via

systemctl enable httpd.service

And punch holes through the firewall to allow incoming traffic on port 80 and 443

 firewall-cmd --permanent --add-service=http --add-service=https 

Then, a bit of fun to enable the webserver for other computers, aka enabling access to web applications in Fedora-speak. The authorization file is /etc/httpd/conf.d/webapp.conf, so add a new config file that loads after this to broaden access. Say, /etc/httpd/conf.d/z-webapp-allow.conf with the following


    
        # Apache 2.4
        Require all granted
    
    
        # Apache 2.2
        Order Deny,Allow
        Allow from all
    

At this point, using either of the chrome or firefox browsers on the server’s desktop should show a default webserver welcome page when

http://localhost

is entered into the search bar. To check that the webserver is working for other computers, try to view it on another computer. For instance, try

http://192.168.1.52

on both computers. The generated page should look the same. If so, congratulations, the first of part of setup is completed.

Additional SELinux efforts:

setsebool -P httpd_graceful_shutdown 1;
setsebool -P httpd_can_network_connect 1;

Configure the webserver to allow mod_rewrite so that wordpress can make more legible permalinks.
Find the part of the main configuration file (as below) and change the directory block to have AllowOverride All.

To check the configuration of the webserver, post-hacking, use

apachectl configtest

Main configuration file is: /etc/httpd/conf/httpd.conf
Configuration file for the first page is: /etc/httpd/conf.d/welcome.conf
Apache site files are found: /var/www/html/

CMS Setup

Use wordpress packages.

dnf install -y wordpress wordpress-plugin-bad-behavior wordpress-plugin-defaults python3-wordpress-xmlrpc

Configure as per these Fedora-specific notes. Also, read these Centos-7 notes.

Recommended, but not essential packages:

dnf install -y php-pecl-imagick php-pecl-ssh2 php-opcache php-pecl-zendopcache php-pecl-apc

To import a pre-existing site, install the import plugin. See the importing content part of the wordpress codex.

For sites that have export files over the default 2M, a bit of tweaking is necessary to import the export file (WXR) in its entirety. First, find out where the active php.ini file is:

php -i | grep "Loaded Configuration File"
Loaded Configuration File => /etc/php.ini

So, edit this file to change the value of upload_max_filesize to 64M like so:

24c824
 upload_max_filesize = 64M

Configuration file for webserver-wordpress is: /etc/httpd/conf.d/wordpress.conf
Configuration file for wordpress is: /etc/wordpress/wp-config.php
Wordpress site files are:/usr/share/wordpress

Wiki Setup

Use mediawiki packages.

dnf install -y mediawiki mediawiki-wikicalendar php-pecl-apcu php-pecl-apcu-bc

Notes for the platform are here, and the file /usr/share/doc/mediawiki/README.RPM.

Use /var/www/mediawiki/parse as the installation directory.

mkdir /var/www/mediawiki/parse
mw-createinstance /var/www/mediawiki/parse
chown -R apache:apache /var/www/mediawiki/parse
chcon -R system_u:object_r:httpd_sys_content_t:s0 /var/www/mediawiki/parse

and then edit the /etc/httpd/conf.d/mediawiki.conf file as

DocumentRoot /var/www/mediawiki/parse
Alias /skins /usr/share/mediawiki/skins

Next, configure the wiki database, called parse_wiki_db.

mysqladmin create parse_wiki_db -u root -p

Make a system database user parsewiki, give it access to the wiki’s database.

sudo mysql -D mysql -u root -p;

GRANT ALL PRIVILEGES ON parse_wiki_db.* TO 'parsewiki'@'localhost' IDENTIFIED BY 'yer-password-here';

FLUSH PRIVILEGES;

QUIT;

This should be enough setup to start the web-based wiki installation. Go to

http://localhost

And finish the setup. Some of the remaining configuration: wiki administrator user name and password, license terms for the wiki content, open or private wiki access, etc.

Skin and theme the wiki.

Etherpad Setup

Etherpad is a collaborating system for writing. Some required packages: Node.js

dnf install -y nodejs

Next, create a system-level user to checkout the etherpad sources and run the etherpad application. For this, use parseepad. After this is done, clone the repository.

cd /var/www;
git clone https://github.com/ether/etherpad-lite.git;

This will checkout sources in the following directory, which doubles as the installation location for this package: /var/www/etherpad-lite

To start up the etherpads, run

/var/www/etherpad-lite/bin/run.sh

And then open the following in a browser, to bring up the etherpad main page:

http://localhost:9100

Close the terminal or otherwise exit the etherpad process to continue installation.

Next, conversion to mysql database. Configure the etherpad database, called parse_pad_db.

mysqladmin create parse_pad_db -u root -p

Make a system database user parsepad, give it access to the etherpads’s database.

sudo mysql -D mysql -u root -p;

GRANT ALL PRIVILEGES ON parse_pad_db.* TO 'parsepad'@'localhost' IDENTIFIED BY 'yer-password-here';

FLUSH PRIVILEGES;

QUIT;

Next, edit /var/www/etherpad-lite/settings.json to tie in the database above:

  /* An Example of MySQL Configuration   */
   "dbType" : "mysql",
   "dbSettings" : {
                    "user"    : "parsepad",
                    "host"    : "localhost",
                    "password": "your-password-here",
                    "database": "parse_pad_db",
                    "charset" : "utf8mb4"
                  },

Next, go to the admin page and install some plugins:

http://0.0.0.0:9001/admin/plugins

Add the following

adminpads, bookmark, small_list, themes, font_color, font_family, font_size, print, copy_paste_images, sketchspace

Finally, restart the etherpad application and start making pads!

Main configuration file is: /var/www/etherpad-lite/settings.json

About sunglint
----

Comments are closed.

%d bloggers like this: