ラベル Ubuntu Server の投稿を表示しています。 すべての投稿を表示
ラベル Ubuntu Server の投稿を表示しています。 すべての投稿を表示

2017年12月2日土曜日

Ubuntu 16.04でアップデートに失敗する

自宅にあるSoftEtherなUbuntu 16.04をアップデートしたら、以下のようなメッセージが出て失敗しました。

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: warning: script 'S20vpnserver' missing LSB tags and overrides
insserv: warning: script 'vpnserver' missing LSB tags and overrides
insserv: There is a loop between service plymouth and mountdevsubfs if started
insserv:  loop involving service mountdevsubfs at depth 2
insserv:  loop involving service udev at depth 1
insserv: There is a loop at service plymouth if started
insserv: Starting vpnserver depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting vpnserver depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting vpnserver depends on plymouth and therefore on system facility `$all' which can not be true!
以下続く・・・
どうやら原因はsystemd周り?のようで、対処法は
起動スクリプトの

# chkconfig: 2345 99 01
# description: SoftEther VPN Server
なところを

# Provides : vpnserver
# Required-Start :
# Required-Stop :
# Default-Start : 2 3 4 5
# Degault-Stop : 0 1 6
# Description : SoftEther VPN Server
にすればOKです。

早速WiKiに反映しておこう・・・

2017年4月5日水曜日

Ubuntu 16.04でシェルを動かすと、変数展開に失敗し、 Bad substitutionとでる。

CentOSでは問題なく動いていたスクリプトが、Ubuntu16.04に持っていくと、
変数展開する箇所で Bad substitutionと出て動かなくなりました。

これ、地味に悩んだのですが、結果はあっけなく

#!/bin/sh



#!/bin/bash

に変えるだけでした。

どうも変数展開自体がbashの機能らしく、CentOSではshでもbashが動くようですが、Ubuntuは古い動作をするようです。

CentOSなどRedHat系になれていると、UbuntuなどDebian系はいろいろ勝手が違います・・

Ubuntu 16.04でcron.daily、cron.hourlyが動かない

Ubuntu 16.04でcron.dailyやcron.hourlyに入れたスクリプトが起動しないことがあります。

でも、実行権限などは付与しており、手動では動きます。

これ、どうやらUbuntuのcronの制限で、ファイル名にドットがあるとダメのようです。

なので、
root@hogehoge:/etc/cron.hourly# ls -lah
合計 16K
drwxr-xr-x   2 root root 4.0K  4月  5 00:41 .
drwxr-xr-x 103 root root 4.0K  4月  5 00:00 ..
-rw-r--r--   1 root root  102  4月  6  2016 .placeholder
-rwxr-xr-x   1 root root  402  4月  5 00:37 log-check.sh  <--これはダメ

拡張子を省きましょう。

2013年3月18日月曜日

Ubuntu Server 実践バイブルを読んで見ました。

自宅サーバの次期OSとして、UbuntuServerを使ってみようかなと思っているので、
勉強がてらどんなものか調べていたところ、調度良い本が見つかったので、Amazonでポチりました。

読んでみた感想としては、実践バイブルと銘打っていますが、実際はインストール手順から詳細に解説してあり、初心者向けの内容だと思いました。
(この内容が本当に現場で即運用に役立つ場面があるのか?現場レベルでは少なくとも覚えて置かなければいけないレベルだと思いました)

内容的には、例えばパテーションの切り方ひとつとっても、昔は各ディレクトリのパテーションを分離していたが、今はHDDが大きいので切るほうが寧ろ害になるとかちゃんと最近の内容が記載されており、初心者が躓きそうなところはフォローできている感じがしました。

思ったより内容が平易だあった為、特に躓くことなく最後まで一気に読み進められました。
これからUbuntuServerを触ってみたい方にはおすすめだと思います。

(個人的には、ファイヤーウォールの説明は最後ではなく最初にして欲しいと思いましたが。)