Home Blog Page 1303

The Perfect Server – Ubuntu 14.10 (nginx, BIND, Dovecot, ISPConfig 3)

The Perfect Server – Ubuntu 14.10 (nginx, BIND, Dovecot, ISPConfig 3)

This tutorial shows how to prepare an Ubuntu 14.10 (Utopic Unicorn) server (with nginx, BIND, Dovecot) for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache or nginx web server, Postfix mail server, Courier or Dovecot IMAP/POP3 server, MySQL, BIND or MyDNS nameserver, PureFTPd, SpamAssassin, ClamAV, and many more. This setup covers nginx (instead of Apache), BIND (instead of MyDNS), and Dovecot (instead of Courier).

Read more at HowtoForge

Raided for Hosting a Tor Node? New Precedent Set

Over the last 48 hours the alleged owner of Silk Road 2.0 has been arrested in San Francisco and named as Blake Benthall, a former SpaceX employee who left the firm in February. I got alerted to this event via the Tor subreddit where an eastern European (he didn’t disclose what country) said his house had been raided, two computers seized and told he is an ‘international suspect of fraud and money laundering’ and could face a maximum sentence of fourteen years in prison although no charges have been pressed at this point.

It’s unclear whether he was running and exit relay or not and said he followed a tutorial to get things setup so it’s normal to think he was unsure of the fine details. However this incident seems to have set a dangerous precedent: running a Tor node can potentially land you in hot water with law enforcement.

 

Read more at The Mukt

[Developer] Booting Tizen Common on Radxa Rock with Rockchip RK3188

  Our friend Leon Anavi is at it again !!!! What I mean by that vague statement is that he is porting Tizen onto another Development Board, in this case the Radxa Rock dev board that supports the Rockchip RK3188 SoC, which is a 28nm 1.8Ghz quad core ARM Cortex A9 and quad core Mali 400-mp4 GPU. It has 2GB DDR3 RAM and 8GB internal storage

At the moment Leon has booted Tizen:Common from microSD card. More details below in his own words: “I have combined an Ubuntu image for RK3188 (provided by linuxium) with Linux-rockchip kernel 3.0.36+ and the Tizen:Common rootfs that has been used at the latest Tizen-sunxi image. The bootloader is proprietary and it is provided as a blob from Rockchip…”

Read more at Tizen Experts

New Kernel Live Patching Combines kGraft & Kpatch

Back in February SUSE unveiled a new means of live Linux kernel patching, kGraft, compared to the existing Ksplice. One month later, Red Hat unveiled their own solution that happened to be under development at the same time, Kpatch. Since both of them have been out, both have pursued mainline interests but neither one accepted upstream yet. Now a new live kernel patching solution is out that tries to take the best of both worlds…

Read more at Phoronix

Debian 8.0 Jessie Now Under Its Feature Freeze

Jonathan Wiltshire on the behalf of the Debian release team announced this week that Debian 8.0 “Jessie” is frozen…

Read more at Phoronix

Intro to Systemd Runlevels and Service Management Commands

Linux kernel unified hierarchy cgroups and systemd.svg

In olden times we had static runlevels. systemd has mechanisms for more flexible and dynamic control of your system.

Before we get into learning more useful systemd commands, let’s take a little trip down memory lane. There is this weird dichotomy in Linux-land, where Linux and FOSS are always pushing ahead and progressing, and people are always complaining about it. Which is why I am taking all of this anti-systemd uproar with a grain of salt, because I remember when:

  • Packages were evil, because real Linux users built everything from source code and kept strict control of what went on their systems.
  • Dependency-resolving package managers were evil, because real Linux users resolved dependency hells manually.
  • Except for apt-get, which was always good, so only Yum was evil.
  • Because Red Hat was the Microsoft of Linux.
  • Yay Ubuntu!
  • Boo hiss Ubuntu!

And on and on…as I have said lo so many times before, changes are upsetting. They mess with our workflow, which is no small thing because any disruption has a real productivity cost. But we are still in the infant stage of computing, so it’s going to keep changing and advancing rapidly for a long time. I’m sure you know people who are stuck in the mindset that once you buy something, like a wrench or a piece of furniture or a pink flamingo lawn ornament, it is forever. These are the people who are still running Windows Vista, or deity help us Windows 95 on some ancient, feeble PC with a CRT monitor, and who don’t understand why you keep bugging them to replace it. It still works, right?

Which reminds me of my greatest triumph in keeping an old computer running long after it should have been retired. Once upon a time a friend had this little old 286 running some ancient version of MS-DOS. She used it for a few basic tasks like appointments, diary, and a little old accounting program that I wrote in BASIC for her check register. Who cares about security updates, right? It’s not connected to any network. So from time to time I replaced the occasional failed resistor or capacitor, power supply, and CMOS battery. It just kept going. Her tiny old amber CRT monitor grew dimmer and dimmer, and finally it died after 20+ years of service. Now she is using an old Thinkpad running Linux for the same tasks.

If there is a moral to this tangent it escapes me, so let’s get busy with systemd.

Runlevels vs. States

SysVInit uses static runlevels to create different states to boot into, and most distros use five:

  • Single-user mode
  • Multi-user mode without network services started
  • Multi-user mode with network services started
  • System shutdown
  • System reboot.

Me, I don’t see a lot of practical value in having multiple runlevels, but there they are. Instead of runlevels, systemd allows you to create different states, which gives you a flexible mechanism for creating different configurations to boot into. These states are composed of multiple unit files bundled into targets. Targets have nice descriptive names instead of numbers. Unit files control services, devices, sockets, and mounts. You can see what these look like by examining the prefab targets that come with systemd, for example /usr/lib/systemd/system/graphical.target, which is the default on CentOS 7:

[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
After=multi-user.target
Conflicts=rescue.target
Wants=display-manager.service
AllowIsolate=yes
[Install]
Alias=default.target

So what do unit files look like? Let us peer into one. Unit files are in two directories:

  • /etc/systemd/system/
  • /usr/lib/systemd/system/

The first one is for us to play with, and the second one is where packages install unit files. /etc/systemd/system/ takes precedence over /usr/lib/systemd/system/. Hurrah, human over machine. This is the unit file for the Apache Web server:

[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd/ $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi.user.target

These files are fairly understandable even for systemd newcomers, and unit files are quite a bit simpler than a SysVInit init file, as this snippet from /etc/init.d/apache2 shows:

SCRIPTNAME="${0##*/}"
SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}"
if [ -n "$APACHE_CONFDIR" ] ; then
	if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
	        DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}"
	else
	        DIR_SUFFIX=

The whole file is 410 lines.

You can view unit dependencies, and it’s always surprising to me how complex they are:

$ systemctl list-dependencies httpd.service

cgroups

cgroups, or control groups, have been present in the Linux kernel for some years, but have not been used very much until systemd. The kernel documentation says: “Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour.” In other words, it has the potential to control, limit, and allocate resources in multiple useful ways. systemd uses cgroups, and you can see them. This displays your entire cgroup tree:

$ systemd-cgls

You can generate a different view with the good old ps command:

$ ps xawf -eo pid,user,cgroup,args

Useful Commands

This command reloads the configuration file of a daemon, and not its systemd service file. Use this when you make a configuration change and want to activate it with least disruption, like this example for Apache:

# systemctl reload httpd.service

Reloading a service file completely stops and then restarts a service. If it is not running this starts it:

# systemctl restart httpd.service

You can restart all daemons with one command. This reloads all unit files, and re-creates the whole systemd dependency tree:

# systemctl daemon-reload

You can reboot, suspend, and poweroff as an ordinary unprivileged user:

$ systemctl reboot
$ systemctl suspend
$ systemctl poweroff

As always, there is much, much more to learn about systemd. Here We Go Again, Another Linux Init: Intro to systemd and Understanding and Using Systemd are good introductions to systemd, with links to more detailed resources.

10 Great Quotes from LinuxCon and CloudOpen Europe Keynote Videos 2014

There were many inspiring talks alongside the great technical content at LinuxCon, CloudOpen and Embedded Linux Conference Euorpe in Dusseldorf last month. To give you a taste, I’ve chosen a quote from each keynote that I think will get your blood pumping or pique your interest. You can watch each keynote in full, below, or on the Linux Foundation’s YouTube channel.

1. State of Linux – Jim Zemlin, The Linux Foundation

“Drones are only at the very beginning of what I think is going to be an incredible industry with applications we haven’t thought of. That’s what makes it such a great open source project. The more people who get involved the more we’re going to see unexpected innovation in platforms that are powering a new and vibrant industry.” – Zemlin on the news that Dronecode is a new Linux Foundation collaborative project.

https://www.youtube.com/watch?v=8EUuaY6rh4o?list=PLbzoR-pLrL6o9doyRBnyaFWhjA8jk6nQT” frameborder=”0

OpenStack: Distribution or Service?

OpenStack cloud technology is getting very popular, but how should your business use it: By deploying an OpenStack distribution in your servers or data center, or by using it as a service from a service provider?

LXD: The New Container Hypervisor for Virtualization Security [VIDEO]

VIDEO: Mark Shuttleworth, founder of Ubuntu Linux, details what the new LXC container effort is all about.

Read more at eWeek

DataCore Ready Software-Defined Storage Servers Debut

DataCore’s SANsymphony-V software works with Dell’s PowerEdge servers and a range of Dell Storage MD Series, SC Series and PS Series arrays.

Read more at eWeek