Category Archives: General

How to install WordPress on a CentOS 7 / RHEL 7 server

This how-to explains the necessary steps to install WordPress, the popular blogging platform, on your own CentOS 7 server. Hosting WordPress yourself can have several advantages: It gives you full control over your setup, your learn something and in my case it also led to significant improvements in speed and responsiveness of my page.

When I tried to install WordPress on a CentOS 7 server myself, I discovered that many of the how-tos available on the Internet were either outdated or led to configuration issues. Some tutorials were also outright insecure. Therefore I decided to write a blog entry that sums it all up and leads to a reasonably secure and also performant web server for WordPress.

Overview: Install and configure Nginx, PHP, MySQL/MariaDB and SELinux on CentOS 7 to run WordPress

This guide will cover the following topics, which is basically setting up a LEMP-stack (=Linux, Nginx, MySQL, PHP) plus WordPress. In the end some thoughts on performance tuning and security will be given.

Overview and links to the different parts of this blog entry:
Prerequisites
How to install Nginx, the webserver
How to install MariaDB, a MySQL database
How to create a database in MySQL/MariaDB for WordPress
How to install PHP
How to configure Nginx for WordPress
How to install WordPress
How to configure SELinux to make it work with WordPress
How to install phpMyAdmin and secure it to manage the database
Performance and security tweaks for your setup

This guide is for CentOS 7, but it should also work wit Redhat Enterprise Linux RHEL 7. In addition, Fedora Linux should be similar as well.

In the future I will also include how to set up SSL for your server. That being said, this guide comes with no warranty. Feel free to comment below if you have feedback.

Prerequisites

The prerequisites are that you have a server with CentOS 7 installed. The initial server setup is explained very well in this guide.

Installation of NGINX

To install Nginx, you have to activate the Centos 7 EPEL repository:
sudo yum install epel-release

Continue reading

Asian Adventure: Jakarta – A Capital With Heart and Traffic

The second destination of the South-East Asia tour after Singapore was Jakarta, the capital of Indonesia.

Thunderstorms, Tropical Rain and White Light

The flight from Singapore to Jakarta takes about 2 hours. I flew with AirAsia in one of their brandnew Airbus A319/320. The space on the plane was similarly to Ryanair quite tight, however, you could buy a variety of warm food on the flight.

Street vendor selling fruit in Jakarta, Indonesia

Street vendor selling fruit in Jakarta, Indonesia

The Indonesian capital greeted me with thunderstorm and heavy, tropical rain. It was as if you put the shower on. The humidity was at 100%. Another thing I noticed from the car when leaving the airport: The lights you see are different from Europe. Mostly fluorescent neon lights are used that put everything into a cold, white/blueish light.

Not A Tourist City, Yet Much To Experience

Jakarta is not a tourist city. During the entire stay of about a week, I saw only a handful of visitors in some shopping malls. Jakarta is huge. More than 10 Million people live in this metropolis. What is interesting though, is that the Jakarta is divided into “cities within the city”. In European cities, you often have to go to the other end of the town to get something done. In Jakarta, everything you need is availably within your immediate area.

Flooded highway on the way from the airport into Jakarta

Flooded highway on the way from the airport into Jakarta

The huge amount of people also means that there is a lot of traffic. There is no subway system, hence everybody is using their car or a motorcycle to get from A to B. There is also an express bus system where the buses have their own lanes. Cars and motorcycles must not use the bus lanes, however, nobody seems to care and not even physical barriers seem to hinder cars driving there.

In addition to the sheer amount of cars, the traffic is also very dense. I was very suprised that I did not see any accident, especially since the motorcycles constantly overtake the cars. Timewise, it is quite usual to be 30 minutes in a traffic jam to drive 7 kilometers of road.

Everything Under 30 degrees Is Cold

In contrast to Singapore, many buildings in Jakarta are not fully air conditioned. The installed air conditioning vents make it just “less hot”. It also seems to me that Indonesians have a different sense of temperature: Everything below 30 degrees Celsius is perceived as “cold”.

Traffic in Jakarta - Bus express lane on the right

Traffic in Jakarta – Bus express lane on the right

Many things are less organized (or not organized at all) than in European cities. For example, there is a constant smell of fire in the air because there is always somebody burning something somewhere. Add to that the exhaust from the cars, the chemicals against the Dengue mosquitoes and the humidity and it feels “as if you are breathing cloth” as somebody said. However, I found the air to be not that bad, I had more problems with the heat.

City of Contrasts

Jakarta is also a city of contrasts. While on the one side you can see big luxorious villas with expensive cars parking there, you see on the other side also slums where people live in small hats by a river that carries the sewage water. On some highway entry roads, you also see day laborers waiting to get work for the day.

In other areas, Jakarta can easily match up with other big capitals. There are many restaurants and an extremely well-organized take away service. You can just call and after about 30 minutes someone comes and brings you the food right to your doorstep. Jakarta has also numerous shopping malls and they are top-notch, just like in Singapore or in the US. Prices for luxury goods are of course cheaper than in other cities, but still they cost money.

Another good point: I bought a 3G SIM card for my iPad to surf on the Internet. 3G was often faster than the Wifi offered in restaurants or domestic connections. I could even use it to call home with Skype.

Asian Adventure: Efficient Singapore

It finally happened. I went to a place, I never thought I would travel to. Too far away, too crowded, “out of area”. Or actually not: I travelled to South-East Asia. Singapore, Jakarta, Ubud.

This blog post is about the first destination: Singapore.

Marina Bay Sands Hotel in Singapore

Marina Bay Sands Hotel in Singapore

The Flying Sofa

The route went from Oslo to Copenhagen to Singapore. Singapore Airlines was the carrier of choice, and that choice was a good one: In Economy class on the Boeing 777-200 the seats were wide and the service superb.

Before takeoff, the flight attendands who are dressed in traditional Singaporean clothing handed out a menu. Showing like in a restaurant what would be served during the flight, food and drinks could be ordered anytime during the flight. Only the hot meals were served at fixed times.

The time during the 12 hour flight passed by quickly, partly thanks to the excellent choice of movies and music from the entertainment system. I have never flown a more comfortable airline than Singapore Airlines: The service was friendly, the food was excellent, and I could sleep on standard Economy seats. Hence, I called it the flying sofa.

Cheap, Humid and Crowded

I always thought “Asia is cheap, humid and crowded”. After landing in Singapore, I figured out it is actually true. Only that it is not that cheap. Prices in Singapore are only slightly lower than prices in Germany.

Since Asians tend to avoid the sun, and since it is too hot outside anyway, the main attraction are the city’s numerous shopping malls. Usually, the metro stops directly transition into a mall. You never know where the metro stop ends and where the mall begins and vice versa.

Popular in these malls are expensive European or American luxury brands. And since Singaporeans seem to have money, these boutiques are crowded. Second most important after the malls is the food: Every mall has a food court that offers a wide choice of Asian and Western food. Remember to NEVER order anything that is spicy. When they say it is “a little spicy”, it is usually too hot.

Otherwise, Singapore presents itself as a highly-efficient city. Everything is regulated, misbehavior like drinking or eating in the metro is heavily fined. The city is very clean. You never see litter lying around.

Heartless Efficiency?

This efficiency has only one drawback: It sometimes feels a bit heartless. If you have a problem that does not fit into the Singaporean’s “Standard Operating Procedures” you have lost.

The Metro "MRT" in Singapore. Highly efficient and very clean.

The Metro “MRT” in Singapore. Highly efficient and very clean.

Example: The Singapore Flyer is a kind of ferris wheel that allows you to see the city from above. “Last admission 22.15” it says on their website. Arriving at 22.07 at the ticket office, happy to have made it just in time before closing, I learn that the last ticket sale closes at 22.00. After kindly asking and only getting a “no” as an answer, I see that it is hopeless to get in and let go of this attraction. A visit is not possible for me.

May 17th: Norwegian Independence Day

May 17th, the Norwegian Independence Day, was a rather wet affair this year: Temperatures in Oslo down at about 4°C degrees, some snow in the upper parts, rain in the lower parts of the city and lots of wind as well.

pic
Music ensemble in the parade

Also the concerts at Kubaparken later on suffered a bit because of the weather. We managed to stay there for only about 3 hours, but then went indoors to have a real Norwegian dinner with all kinds of traditional Norwegian food. No, not pizza or hamburgers this time, but well, sausages were there as well.

pic
Patriotic spectator

Despite the weather (“there is no bad weather, only bad clothing”), it was a really nice day with a truly special atmosphere. For Norwegians this day is very important, except for one Norwegian friend of mine who went to his home town for mountain biking by saying “Freedom and independence? You don’t really need this…” (Irony switched on, of course).

For more sunny impressions, check the blog entry from last year.

GPS on the plane: Where am I?

Last weekend, I went for a really quick visit to Germany by plane and had the possibility to try out my new GPS while being airborne. Since I had chosen the somewhat cheaper GPS unit, I had to have a window seat in order to receive enough GPS satellites for the proper calculation of the position.

pic
“My” plane coming in from Frankfurt-Hahn

I took Ryanair from Oslo-Torp to Frankfurt-Hahn and therefore, the plane was a brandnew Boeing 737-800. While sitting next to a window and putting the GPS on the armrest, I had enough reception during the entire flight and could always see where we were.

pic
Data view

The picture above shows the data view of the GPS. You can see (bottom) that the plane is travelling at a speed of 824 km/h at the cruising altitude of 37820 feet, which is roughly 11.5 kilometres. The “Distance to destination” (i.e. Frankfurt-Hahn; top left) is 546 kilometers and the estimated time of arrival (ETA) was 18:02.

pic
Map View

Much more interesting however, was the map view. Here I could see where exactly on the map we were. This helped while being above Denmark to recognize the Danish coastline and parts of the German island of Sylt. Later, above Hamburg there were too many clouds, so nothing of the city was visible.

pic
Just clouds

Back at home, I put the data from the GPS into my laptop. Since the GPS logs the position every second, you can follow the entire trip. Unfortunately, I had totally forgotten to switch off the GPS during final approach and landing ( ;-) ), which made it possible to even see at which speed we touched down on the runway. Very interesting data.

On the flight back, I took SAS from Frankfurt/Main airport and only got a seat in the corridor, which made it impossible for the GPS to receive anything. This personal GPS on the plane is definitely something I don’t want to miss in the future.

Fjords, Waterfalls and Rainbows: Bergen and Flåm

I finally found some time to edit the 3 gigabytes of pictures from only 3 days in Bergen and FlÃ¥m. To see the best of gallery, just click on the picture below. It is very difficult to describe the nature up there, the best thing is to go and see it yourself. In Bergen the weather can be a bit unstable or, as my neighbour put it: “In Bergen the weather changes every twenty minutes. Either the sun shines, it rains or it storms.”

pic
Fjord close to Flåm

A Short Hello From Molvania

While I was already last year in Lutenblag and I actually had not planned to go there again, the price for a flight was so cheap that I changed my mind. Since today, Molvanian national carrier Aeromolv is offering a cheap no-frills service from Oslo’s main airport Gardermoen to Lutenblag airport. We went to Molvania with 5 people and paid in total only 220 NOK (about 26 Euros; bribe money for the Molvanian immigration officials not included) for all the five of us!

pic
Cheap, but big: our hostel (CC)

Since radiation levels have dropped enormously since last year, we decided that is was safe to stay a bit outside of Lutenblag. Due to global warming, there is no more snow in the Lutenblag area, only mud though. We stay on the top floor of the hostel, but because of the smog we cannot see anything. I am now sitting in the internet cafe of the hostel and have limited ability to upload any pictures because the top speed that is possible from here is 9600 baud per second and the modem is getting hot already. Not to mention that the connection is lost every 2 minutes.

Tomorrow, we have a guided tour around the nuclear reactor, which is right inside the city center, and afterwards we will see whether the cable car service to the top of Lutenblag’s city mountain is operating…

CC
(All pictures of this entry are licensed as creative commons, the credit can be found as a link “(CC)” in the description of the image)

First Class With Ryanair

Last week, I flew to Oslo with Ryanair to organize my study-related stay which will start in February. I took the early flight from Frankfurt-Hahn (EDFH / HHN) to Oslo-Torp/Sandefjord (ENTO / TRF) at 6.30 in the morning. Since there are a lot of rumors about Ryanair and their service, I was positively surprised.

The plane was brand new (average age of Ryanair’s fleet is 2.7 years) and was equipped with very comfortable leather seats. Not these dirty ones I encountered about two years ago where you completely sink into the seat. For a two hours flight, the leg room was sufficient as well. What made this a “first class” trip was the load factor of the plane: only 14 people out of possible 189 the plane can carry flew to Oslo on that morning. The whole aircraft was basically empty. This also affected the crew who were very friendly so that I even bought a tea for 2.50 Euros.

pic
Ryanair Cabin View During Flight

The Frankfurt-Hahn airport, which is actually closer to my hometown than to Frankfurt (so I call it Dattenberg-Hahn :-) ), was easily reachable by car as well and the check-in went quite smoothly. Only the shuttle bus driver who brought me from the parking lots to the terminal was not really friendly. Originally, I had planned to fly with Germanwings from Cologne, however, they have cut back their connections to Oslo and will stop the service by end of March. The same happened to Cologne – Gothenburg already (shame on you!).

Due to new hand luggage regulations, it is not allowed anymore to carry liquids into the cabin. Therefore, I brought three empty 0.5 liter bottles, which I filled up with tap water later on. This effort saved about 10 euros as the water you can buy at the airport is quite expensive. The security personnel searched my rucksack very carefully because it seems that they cannot see on their screen whether a bottle is empty or not.

Free Internet at Torp

The Oslo-Torp airport is quite nice as well and even offers free wireless internet. Outside, the Torpekspressen bus already waited with a very friendly bus driver. The ride to Oslo takes a bit less than two hours. To sum up, flying with Ryanair is like flying with any other airline, the only thing is that you pay less and don’t fly into major airports.

The flight back to Frankfurt was more crowded, but went along smoothly as well despite incredible wind speeds of about 150 knots (about 300 km/h) at cruising altitude and 30 knots cross winds during the landing. These speeds were luckily lower than on the day before where a lot of flights (including all to/from Oslo) had been canceled due to gale-force winds. Only flight attendant Agnieszka was a bit on the rougher side… (“Please take your seats as quickly as possible! I said, TAKE YOUR SEATS AS QUICKLY AS POSSIBLE!”)