Install LAMP for WordPress on Opensuse

From stock Leap 42.3, install the LAMP Server stack

zypper install -t pattern lamp

This will install Apache2, PHP5, and MariaDB.

Start the Database and Run the MariaDB initialization script

rcmysql start

/usr/bin/mysql_secure_installation (Record the root password!)

Login into MariaDB, create user, create wordpress database, grant permissions.

mysql -u root -p

create database <DB Name>;

create user <user>@<host> identified by <password>;

grant all privileges on <DB Name> to <user>@<host>;

flush privileges;

Change ownership of /srv/www/htdocs to Apache2

chown -R wwwrun:www /srv/www/htdocs

Run the YAST2 Wizard for Network Services, enable PHP, open firewall ports.

Start and enable Apache2 web server and MySQL server

systemctl start apache2

systemctl enable apache2

systemctl start MySQL

systemctl enable MySQL

Test Apache2 by browsing to localhost or your IP, you should see “It works!”

Create /srv/www/htdocs/test.php file to test PHP

<?php
$msg = "Seeing this means php is working";
echo $msg;
?>

Create /srv/www/htdocs/info.php for nice info on your installation

<?php
phpinfo();
?>

Optional: Install phpMyAdmin to manage databases over the web.

zypper  install phpMyAdmin

Browse to your server:

<localhost or IP>/phpMyAdmin/index.php

Download latest binary from wordpress.org, extract and copy

wget wordpress.org/latest.tar.gz

tar -xvzf latest.tar.gz

mv wordpress /srv/www/htdocs

Edit /srv/www/htdocs/wp-config.php and add, database, database user, and password.

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here‘);
/** MySQL database username */
define(‘DB_USER’, ‘username_here‘);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here‘);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost‘);

Browse to <localhost or IP>/wp-admin/install.php

If you see the setup of WordPress, voila!

Advertisements

Installing Google repositories on OpenSuse

While its simple enough to download and install google chrome on Opensuse, in order to keep it updated regularly, you need to configure the google repository.

The process is two fold, download the signing key to accept software from Google, and to add the repository.

From a terminal command prompt: (full instructions from this Google page)

Download the signing key and import into RPM:

wget https://dl.google.com/linux/linux_signing_key.pub sudo rpm –import linux_signing_key.pub

Verify the key installation by running:

rpm -qi gpg-pubkey-7fac5991-*

To manually verify an RPM package, you can run the command:

rpm –checksig -v <packagename>.rpm

To add the google repository:

sudo zypper ar http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome

This will create a repository called “Google Chrome”

To test, run the command:

sudo zypper lr (You should see a repository called “Google Chrome”

and then refresh and update if necessary:

sudo zypper update

Opensuse 42.2 emergency mode after install

Reinstalling my system, clean install of OpenSuse 42.2, but then at boot, after passing grub and kernel selection, it logs into the emergency shell.

Fokkow instructions in shell, give root password, and look for errors from logs using systemctl -xb 

It turns out that it was not able to mount /home

Checked /etc/fstab and the filesystem type was marked as unknown.

Edited to ext4, save, reboot, and Presto!

Running BOINC on OpenSuse

Notes on how to run BOINC on Opensuse (Leap 42.2) from command line as deamon.

Install the packages from packman repository

zypper in boinc-client boinc-manager

After installation verify that user and group boinc is created

cat /etc/passwd | grep boinc

cat /etc/groups | grep boinc

Add the user boinc to the group boinc.

usermod -G boinc -a boinc (repeat with any other user if necessary)

verify that boinc-client is already running as a daemon

ps -aux | grep boinc or systemctl status -l boinc-client.service

verify that all files under /var/lib/boinc are owned boinc:boinc

change permissions of /var/lib/boinc/gui_rpc_auth.cfg 

chmod 664 /var/lib/boinc/gui_rpc_auth.cfg

Optional, create simbolic link for user account logged in while running boinc

ls -s  /var/lib/boinc/gui_rpc_auth.cfg /home/<user>/gui_rpc_auth.cfg

Now, if previously attached to a project, retrieve your key:

boinccmd –lookup_account <project url> <email> <password>

Or create an account if needed:

boinccomd –create_account <project url> <email> <password> <name>

Attach to the project

boinccmd –project_attach <project url> <key>

Voila! you should be running now as a daemon and connected to the project.

Verify by issuing:

boinccmd –get_project_status or boinccmd –get_state

OpenSuse Linux, Citrix and Certs

I needed to remote in from my personal laptop running OpenSUSE Leap 42.1 into my work’s Citrix Remote Desktop runnin on a Windows Server farm.

After logging in, install the Citrix Reciever from your Citrix server (if provided), or from Citrix directly.

My version of receiver is 11.100 for linux x86.

The Linux installation is straight forward, accept the defaults.

Now, the tricky part.

Upon logging in and launching a RDP session, I received the following error message:

You have not chosen to trust “XXXYYY”, the issuer of the server’s security certificate (SSL error 61).

Upon some googling I decided to go to my certificate provider XXX, and download their Public Root Certificate Bundle.

After opening the tar file, found the certificates of type YYY. Then copied those certificates into the path of my Citrix Reciever installation, in my case:

/usr/lib/ICAClient/keystore/cacerts

Voila!

btrfs adventures on opensuse

I am currently using OpenSuse 13.2, and started using Picard for sorting my music, around 12000 files. Later I started doing some BASH script to further clean up the names of the mp3 files.

Anyhow, all of this to say, that I have been working the file system, copying, moving and erasing (hundreds) of files around.

At the end, the system started to be very slow, and at some point, gnome started to crash, funny enough, there is no /var/log/messages to check, 13.2 implements Systemd, so there is journalctl to check the error messages, but in the console (F12) many errors for different systemd components complaining that there was no space left on device, but doesn’t says which one, and doing a “df -h” shows still free space on the hard drives.

Puzzling.

At the end, the OpenSUSE forums gave me the solution on this thread.

If you keep reading, the problem is not the file system, it the meta data of the file system.

The default file system of OpenSuse13.2 is btrfs, which implements journalling and snapshot capabilities, and if not correctly tuned and configured, can generate this kind of scenarios.

The key commands to fix my issues were:

btrfs filesystem show

btrfs filesystem df (here you can see the meta data space full)

snapper -c root list (lists snapshots of root the file system)

snapper -c delete (this will clean the snapshots of the file system that are taking space, leaving the current one (0) and the last one)

btrfs balance start (in my case / for root, the closest explanation this is similar to a defrag>

Et Voila! space magically appears, and system is usable again.

Similar case, with explainations from “The Nerdy Room“.