Running Bootstrap locally on CentOS/Fedora

1 Comment

Within my job we are quite frequently faced with creating web pages and in order to improve the look and feel we have made (intensively) use of jQuery. Because of this we keep an eye on developments in this area, although it is not our main area of expertise, particularly for items that may help us in making our job easier.

Something that, from our perspective, seems to be emerging is Bootstrap. Bootstrap is, as they state on their site:

Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.

Curious as I am I thought I have a look into this. The first thing I wanted to do is get Bootstrap up and running on my own laptop(s). One had Fedora 20 installed, the other is running CentOS 6.4. Both already have Apache installed and running.

For the installation of Bootstrap I decided to use Bower, as indicated on the Bootstrap getting started page. In order to install Bower firstly npm and git need to be installed:
sudo yum install npm git

Once these are installed bower can be installed
sudo npm install -g bower

On the getting started page of Bootstrap also the following is indicated:

If you work with Bootstrap’s uncompiled source code, you need to compile the LESS files to produce usable CSS files. For compiling LESS files into CSS, we only officially support Recess, which is Twitter’s CSS hinter based on less.js.

As such I also installed Recess:
sudo npm install -g recess

If you prefer to use LESS itself, this can be installed with
sudo npm install -g less

Now that I had Bower installed I could install Bootstrap. This is to be done in your webserver’s “main directory”, which in my case is /var/www/html. Thus:
cd /var/www/html
bower install bootstrap

This will create a subdirectory called bower_components which in its turn has a bootstrap and a jquery subdirectory.

One of the things I noticed is that the content of the html pages of Bootstrap somewhat looked “funny”. They have some sort of heading and after that just content for the pages. Looking around, using my “good friend” I found out that I also needed a parsing engine and mostly suggested was Jekyll.

Since Jekyll is bundled as a ruby gem and therefor we first need to install the required packages
sudo yum install rubygems ruby-devel

Once these are installed Jekyll can be installed as follows
sudo gem install jekyll

Now if we go into the earlier created bootstrap directory we can use jekyll
cd /var/www/html/bower_components/bootstrap
jekyll serve

Based on the settings in _config.yml and other content jekyll will create webpages in the directory that is indicated in _config.yml (default for Bootstrap is _gh_pages) and start a “server”
$ jekyll serve
Configuration file: /var/www/html/bower_components/bootstrap/_config.yml
Source: /var/www/html/bower_components/bootstrap
Destination: ./_gh_pages
Generating... done.
Server running... press ctrl-c to stop.

In the configuration file also the port is indicated via which the server can be reached, the default that Bootstrap uses is 9001. So now when you open the page <your web server addres>:9001 you will see Bootstrap running.

Another option is, since Jekyll also created the pages that can be published on a web server, so with more recognizable html content, is to open the _gh_pages directory from your web server.

Bootstrap - Examples

Bootstrap – Examples

Although it took some searching and looking around setting up Bootstrap locally, once you know how, is quite easy to do.

Now I have to figure out some more how I can create my own web pages using Bootstrap and look for an editor, preferably something that works similar as Jetstrap, that I can run “locally”.

Fedora 19 by means of FedUp

1 Comment

Those who have read my latest blog posts know that I have been trying out Fedora 19 since the Alpha release became available. Initially just the “regular” (Gnome) version and since around Beta also the LXDE release for the OpenBox part of it. Since I encountered basically no major issues I was confident enough about the quality and stability of Fedora 19 to now also update my “production” version of Fedora 18 to 19.

When I went from Fedora 17 to 18 I used FedUp for the first time, as can be read in this blog post. Since I was very pleased with how it worked I used FedUp also to upgrade now from Fedora 18 to 19. You can debate whether a clean install is preferred and I do admit that from time to time I do a clean install simply to get rid of “left behind (s)crap”. Since I just recently – unwillingly forced – had to do a clean install (see Fedora 19 … New things learned) I was not to uncomfortable with upgrading.

In order to perform the upgrade I basically just followed the steps as described in the FedUp documentation. So first I installed FedUp
sudo yum install fedup

Next I provided the command that prepares the upgrade by downloading the required packages
sudo fedup-cli --network 19

FedUp @ work

FedUp @ work

Unfortunately this stopped before it was finished with the following error
Downloading failed: Errors were encountered while downloading packages.
google-chrome-stable-28.0.1500.68-209102.x86_64: [Errno 256] No more mirrors to try.

For me this is not the first time that the Google Chrome repos are unavailable and since they remained unavailable at a second try I simple removed my chrome repo file (temporarily) to my Documents folder
sudo mv /etc/yum.repos.d/google-chrome.repo ~/Documents/

Issued the fedup-cli command again and now it finished without errors, confirmed by checking the /var/log/fedup.log, as can be seen below
setting up repos...
No upgrade available for the following repos: Dropbox virtualbox
getting boot images...
.treeinfo                                                | 1.1 kB     00:00
setting up update...
finding updates 100% [=========================================================]
verify local files 100% [======================================================]
testing upgrade transaction
rpm transaction 100% [=========================================================]
rpm install 100% [=============================================================]
setting up system for upgrade
Finished. Reboot to start upgrade.
NOTE: Some repos could not be contacted: Dropbox, virtualbox
If you start the upgrade now, packages from these repos will not be installed.

After this I rebooted and picked “System Upgrade” from the boot menu. This started the upgrade process and now all I had to do was wait patiently. Once completed the system rebooted and gave some errors about the grub theme (no major issue and was already known), just bypassed these and the system booted with no further errors.

From the Beta tests I had already learned that the “grub errors” could be fixed by installing the starfield theme:
sudo yum install grub2-starfield-theme

Next edit the appropriate line in the  /etc/default/grub file to refer to this theme by changing the line into

And finally rebuild the grub.cfg file by issuing the command
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Now when you reboot there is a themed background again.

Fedora 19 Running

Fedora 19 Running

Those with the trained eye (and the others now as well) will notice that conky does not show an internet address and/or internet speeds. This is an issue I have to address and can be easily fixed although the bottom part is vnstat info and I would like to see that preserved and if possible integrated to the new situation where wlp3s0 is used instead of wlan0.

Furthermore I ran into issues when trying to do a “yum update”. Both DropBox and VirtualBox do not (yet) have a Fedora 19 repository. I could set those (temporarily) back to Fedora 18 but for now I have taken the same action as done for the Google Chrome repository, simply moved them from the /etc/yum.repos.d/ directory to my ~/Documents directory. I have checked and both DropBox and VirtualBox still work, so for now I’m good.

To see whether there were many orphaned packages used package-cleanup
sudo package-cleanup --orphans

The list remained showed no worrying packages and therefore that left me with no work on that side.

All in all, basically smooth sailing from start to finish. Ready to actually start using Gnome 3.8 full time.

Fedora 19 with OpenBox and LAMP (sort of)


From my recent posts it may have become clear that I am “playing around” with Fedora 19, which is currently at Beta level. Besides the “regular” installation with Gnome 3.8 I have created a separate VM on which I installed the LXDE spin. Not for LXDE but for OpenBox which comes included with that spin. The installation was straight forward and I have opted for most of the default settings. With regard to setup I have basically opted to also install the items as I have described in my blog post “Fedora 15 with OpenBox” (only did not install xscreensaver). Furthermore I slightly modified the menu and provided myself with the option to “Log Out”, “Reboot” or “Shutdown” (opposed to only log out which comes with the default menu). The end result of this installation is as shown below.

Fedora 19 with OpenBox

Fedora 19 with OpenBox

After having read about the change in the MySQL license and the fact that Fedora 19 will use MariaDB instead of MySQL, I wondered if setting up a LAMP server with MariaDB would already be possible. This post will describe how I installed a (sort of) LAMP.

The first thing I decided to do differently, after all I was looking at OpenBox because it is lightweight, to replace Apache with a more lightweight webserver. A quick search using yum resulted in finding lighttpd. As they describe on their site:

Security, speed, compliance, and flexibility — all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems.

Furthermore I also wanted php support (for using phpMyAdmin) which requires the installation of lighttpd-fastcgi and php-cli. As such I issued the command
yum install lighttpd lighttpd-fastcgi php-cli

Next I tried whether the web server would start by issuing the command
service lighttpd start

And yes … it did!  ;-)

lighttpd running

lighttpd running

For the configuration of fastcgi I had to use my good friend Google, but it comes down to the following. In the file “/etc/lighttpd/lighttpd.conf” add the line: include “conf.d/fastcgi.conf”. I have added it in the section to load the modules
## Load the modules.
include "modules.conf"
include "conf.d/fastcgi.conf"

Additionally in the file ” /etc/lighttpd/conf.d/fastcgi.conf” the fastcgi.server has to be defined. I have done this as follows:
fastcgi.server = ( ".php" =>
("localhost" =>
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"

Next cd-ed into the director /var/www/lighttpd and created a php directory. In this php directory I created a file called “test.php” with the following content:

Next restarted the web server (not sure if it is necessary, but just to be sure) and checked if it worked. The result …

php test

php test

Next I decided to install the MariaDB server, client and phpMyAdmin by issuing the command
yum install mariadb-server mariadb-client php-mysql phpMyAdmin

Next started the server, which as I understood for compatibility reasons, can be started with the command
service mysqld start

Setting the root password for MariaDB and setting up basic configuration can easily be done with the command

This will take you through some questions for which I followed the suggestions except for the deletion of the test databases. Next, again just to be sure, stopped the MariaDB and the web server and restarted both. Then wanted to test phpMyAdmin but that failed.  :(

So I searched for the installation path of phpMyAdmin and found that it was installed in /usr/share/phpMyAdmin. So I cd-ed into /var/www/lighttpd and created a symlink as follows
ln -s /usr/share/phpMyAdmin/ phpMyAdmin

Now phpMyAdmin also works!

phpMyAdmin running

phpMyAdmin running

All in all there were some little humps to overcome, but in general it was not too hard to install a (sort of) LAMP in Fedora 19 using an alternative web server and the replacement of MySQL, MariaDB.

Now find the time to “play around” some more.  :D

Gnome Weather application – Changing metrics


This time a (very) small blog post, but as those who follow my blog know, I also use my blog as an external memory for myself. ;-)

One of the items I indicated in my blog post “My first peek at Fedora 19” was the fact that I had not found a way to alter the metrics for the new Gnome Weather application. Being from Europe I prefer “proper metrics” to indicate temperature, wind speed and so on. Yesterday I found some time to do some searching and have found the solution.

The settings can be changed by altering the “gsettings” of which most are incorporated in the dconf-editor. This is not installed by default, so you may have to install it.

Gnome Weather - Change metrics

Gnome Weather – Change metrics

In “dconf-editor” opt for the path: org –> gnome –> Gweather. Once there, per unit, you can alter the metrics displayed by choosing an option from the drop down box. When Gnome Weather now is started the metrics as set here will be displayed.

From what I understand from Bug 695762 (GNOME Bugzilla) there will be a configuration box added to the Weather application, but for now using “dconf-editor” does the trick.


Fedora 19 … New things learned


As indicated in my previous blog post “My first peek at Fedora 19” here’s the continuation of my experience with Fedora 19 Alpha and Gnome 3.8.

Since my last blog post I have done a clean install. Not because I had issues, but simply because my (virtual) disk ran out of space. With the initial installation I had opted for an 8 Gb virtual disk, with the new installation I opted for a 10 Gb virtual disk giving me some more room to move. One thing I did different opposed to the previous time is that this time I opted for the default LVM partitioning. However, much to my surprise, I had less space than the first time. Turned out that an over 4 Gb swap partition was created?!

F19 LVM Original DiskSize

F19 LVM Original DiskSize

Since these are logical volumes it seemed to me that this must be (relatively) easy to change, After some reading up and google-ing I indeed found the way to do this. First thing I did was reduce the size of the swap volume back to 500 Mb with the following command
lvreduce -L500M /dev/mapper/fedora_10-swap

Next I expanded the root volume to increase size so that all (now) available free space was used
lvextend -l +100%FREE /dev/mapper/fedora_10-root

Finally instruct the logical volume to increase to the same size as the physical size
resize2fs /dev/mapper/fedora_10-root

This worked like a charm and now I have more space in the root partition than I had with the original installation.

F19 LVM Altered DiskSize

F19 LVM Altered DiskSize

On a side note: Please be careful when using the commands that I used on a production environment! Having learned the above commands I figured I could use them on my “production” laptop to reduce the root volume and increase my home volume. Although a warning is giving when reducing a volume’s size I decided to neglect it and reduced it anyway. This left me with a non working Fedora installation.
Since I have a LUKS encrypted disk I had to go through quite some hazzle to retrieve my data, move this to an external disk and then do a clean install and set everything back up the way it was. So do be careful!

With the clean install I came across a Gnome Shell Extension that I had not noticed before: gnome-shell-extension-apps-menu
This extension gives you the possibility to use a new version of the “old” applications menu

F19 Applications Shell Extension

F19 Applications Shell Extension

I think it looks pretty good and that it may help those who can not part from the “old menu” style. This extension is now also available (Fedora 18) but in the current version it does not replace the Activities menu while in Fedora 19 it does.

A final new thing I came across is Gnome Photos. From what I understand this may replace Shotwell, the current photo application.

F19 Gnome Photos

F19 Gnome Photos

Concluding: Still coming across (minor) new things and changes but all to me seem as improvements. Furthermore I also learned something about resizing logical volumes both with Fedora 19 and my “production” installation.  ;-)

My first peek at Fedora 19


Hearing about Fedora 19 Alpha and Gnome 3.8 I just could not resist to create a VM in VBox, download the netinst.iso and having a first peek. Being well aware that it is “just” Alpha and that, as they indicate in the installer, I have to accept my fate.

The VM I created is pretty basic for what I generally use when “playing” around with a new or different distro. Memory set to 2048Mb, video memory at 64Mb, 2 processors and an 8Gb “hard disk”. For the rest I just accept the defaults. As with regard to “Installation Destionation” I have opted for a custom partitioning, using 500Mb for /boot, 7Gb for / (root) and the remaining space for swap.

Fedora 19 - Installer

Fedora 19 – Installer

After the initial screen, as shown above, a second screen shows the installation progress plus the possibility to set the root password and the creation of a user with an option to add this user to the administration group. Installation took quite some time, about an hour and a half in my case, but hat may as well also being caused by my network speed (or lack thereof).

Once installed and after reboot a “First login” sequence is started to set language and such. What was new to me, and hopefully also for others, was that I was prompted to create a “Local User” account.

Fedora 19 - Local Account

Fedora 19 – Local Account

I haven’t yet figured out the reason why, particularly since I had already indicated to create an account for me during installation. This is something I still have to look into. When having gone through the “First Login” cycle I was logged in as the “Local Account” and a (Gnome) help window appeared. Not sure if this will be expanded but to me it seemed not very useful at the moment since, AFAIK, it did not provide any new information related to version 3.8.

On the “outside” not much seems to have changed but Gnome 3.8, as far as I can tell at the moment, did make some improvement for convenience. For example, when looking for an application it provides the option to switch  between frequently used and all applications.

Fedora 19 - Frequently used

Fedora 19 – Frequently used

Furthermore the search is extended to files, documents and others and you have the possibility to set the priority in which area the search has to be done.

Fedora 19 - Search priority

Fedora 19 – Search priority

What sort of surprised me is that I noticed during a “yum update” that deltarpm was not installed, which is something I have always liked. I do have it now installed and will see if it (already) works. Another thing I experience at the moment is that it all seems sluggish and that CPU use is quite high, but hey .. we are still at Alpha stage.  ;-)

The final screenshot shows the new Gnome weather application and conky running. With regard to the weather application, haven’t figured out yet how to have it show “proper” metrics.  :D

Fedora 19 - Weather and Conky

Fedora 19 – Weather and Conky

I think I will keep this VM around and regularly update to see if there are changes and what these changes are.
So I’ll conclude with: to be continued….



Upgrade from Fedora 17 to Fedora 18 using FedUp


As could be read in my previous blog post I have made the change over from Ubuntu to Fedora. Just as with Ubuntu also with Fedora I was following the coming of the new release, Fedora 18 (Spherical Cow). From the beta release onward I was running this release in VirtualBox.

January 15 last Fedora officially released Fedora 18 and, although maybe not always wise, I just had to upgrade. As of Fedora 18 a changeover has been made from PreUpgrade to FedUp (FEDora UPgrader), meaning that if you want to upgrade to Fedora 18 or a later release now FedUp is to be used.

The wiki basically explains very clearly how to upgrade. It is very simple. The first thing to do is to install FedUp.
yum install fedup

NOTE: When performing administrative tasks I always change over to root, but those comfortable with ‘sudo’ can follow the commands keeping in mind that I ran them as root.

Once installed I have executed the following command:
fedup-cli --network 18 --debuglog fedupdebug.log --instrepo

Currently the wiki shows the command without the –instrepo option since this option is no longer required after Fedora 18 was officially released. I have added just in case, but it seems that currently you can run it without.

Once executed FedUp will alter the repositories and pull in all the packages that are to be installed and/or upgraded. When this is completed without errors it is safe to reboot, if not it is best to examine the log to see what went wrong. In my case there were no errors so I rebooted.

After the reboot the GRUB menu will show the option “System Upgrade”. Choose this option and the upgrade will start automagically. Now simply wait until it is completed and the system is rebooted.

After the reboot the GRUB menu showed to options “Fedora” and “Advanced options for Fedora”. I opted for the regular item but that started a “simple” Fedora with no access to the wireless and more items that seemed to be missing. It turned out that I was faced with bug 893175, which caused the fedup entry to be started instead of the latest kernel version. Removing the fedup files, as indicated in comment #4, and rebuilding the GRUB menu resolved the issue.

With the upgrade also a new version of VirtualBox was installed. That I had to reinstall the VirtualBox extensions did not seem to strange to me. The fact that I had to run “/etc/init.d/vboxdrv setup” did seem somewhat strange to me. Since I have DKMS installed I normally do not have to run this when the kernel is upgraded. For some reason this was not done after the upgrade.

Bottomline: Upgrading with FedUp turned out to be an easy task and did not cause any major issues.

Fedora 18 - Desktop

Fedora 18 – Desktop

Older Entries


Get every new post delivered to your Inbox.

Join 257 other followers