Yesterday, I saw a pretty flock of sparrows. Nowadays this is very rare in my town though I often saw flocks of sparrows in the rice fields when I was a child. I think the opportunities to see sparrows are decreased despite they were very popular birds and we have a lot of folktales of them. I took a picture of them.
Today I saw the bird on the left image. I think this is Shirohara. Am I correct?
By the way, I updated some server software on my Web server yesterday (The server OS is Win7 HP SP1 x86).
They released phpMyAdmin 4.3.0 on December 5 and 4.3.1 on December 8. So I updated to 4.3.1 from 4.2.13.1 yesterday. Here is the ChangeLogs. The 4.3.0 has a tons of improvements by RFE(Request for enhancement). The 4.3.1 is a bugfix version.
By the way, when I compared the new config.sample.inc.php with my old one(=Ver.4.2.x), I found a line was lost and a line was added.
At /* Storage database and tables */ area
The lost line.
// $cfg[‘Servers’][$i][‘designer_coords’] = ‘pma__designer_coords’;
The added line.
// $cfg[‘Servers’][$i][‘central_columns’] = ‘pma__central_columns’;
So, when I logged on the new phphmyadmin as root at the first time, I got “The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. Or alternately go to ‘Operations’ tab of any database to set up it there”.
By clicking ‘Find out why’, I got the alerts like the right image.
I had instructions, too.
Quick steps to setup advanced features:
Create the needed tables with the ./examples/create_tables.sql.
Create a pma user and give access to these tables.
Enable advanced features in configuration file (config.inc.php), for example by starting
from config.sample.inc.php.
Re-login to phpMyAdmin to load the updated configuration file.
I did the followings.
Log on the new version with the old config.inc.php as root.
Add the ALTER privilege to the controluser(Default : pma) on the database phpmyadmin.
Import the new create_tables.sql. If you change the database name(Default : phpmyadmin) and the controluser name(Default : pma), you need to customize the sql file before import. See “Configuration storage“.
Log out.
Edit the old config.inc.php.
Delete the line.
$cfg[‘Servers’][$i][‘designer_coords’] = ‘pma__designer_coords’;
Add the line.
$cfg[‘Servers’][$i][‘central_columns’] = ‘pma__central_columns’;
His return is scheduled in 2020. What a long journey!! The place where he would return is in Australia as same as his brother Hayabusa’s. I pray for peace. We have to protect the world peace, or, we could not recover its capsule if we have the war between Australia and Japan or WW III when his return. I think the peaceful uses of space require the peaceful world. But, the world… I hope that is my imaginary fears, though.
Yesterday, they announced Hayabusa 2 Launch rescheduled again. The new schedule for it is at 13:22:04 on December 3(JST). I hope good weather which makes third time lucky aha.
I’ll create a LAMP server on CentOS7 with SELinux enforcing in VPS.
But before this, I did the three four things.
$ sudo vi /etc/pam.d/su
Then, uncomment the next line. #auth required pam_wheel.so use_uid –>> auth required pam_wheel.so use_uid
Now the OS permits for only the users in Wheel Group can become root by ‘su’ command.
$ sudo vi /etc/aliases
Then, uncomment the last line of the file and change the user name. #root: marc –>> root: centos
$ sudo newaliases
By this, the user centos can get root’s mail.
Check up on the time zone.
$ sudo timedatectl status
Everything is OK.
$ sudo systemctl status chronyd.service
I had “System clock wrong by 1.088336 seconds, adjustment started” in the result, so I edited /etc/chrony.conf.
$ sudo vi /etc/chrony.conf
In the file I found “# Use public servers from the pool.ntp.org project.”, and I went to pool.ntp.org. I added the lines with ‘+’ at their head and deleted ‘-’s by the instructions.
+server 0.pool.ntp.org iburst
+server 1.pool.ntp.org iburst
+server 2.pool.ntp.org iburst
+server 3.pool.ntp.org iburst
–server 0.centos.pool.ntp.org iburst
–server 1.centos.pool.ntp.org iburst
–server 2.centos.pool.ntp.org iburst
–server 3.centos.pool.ntp.org iburst
Then, restart the service and check again.
$ sudo systemctl restart chronyd.service
$ sudo systemctl status chronyd.service
Now everything is OK.
Note) The location of exstra.conf files: /etc/httpd/conf.d
The extra conf files by default: autoindex.conf, userdir.conf, welcome.conf
Note2) The location of module.conf files: /etc/httpd/conf.modules.d/
Note3) I do not rotate log files but the Apache Httpd seems to be able to make it automatically (See /var/log/httpd/ after more than one-day server running). From when can it do this?? Or is this CentOS7’s own feature?
Usually ~userid has the permission 700, but it needs 701 for httpd accessibility. This information on the userdir.conf.
$ chmod 701 centos
I set the DocumentRoot to an user’s home directory, so I need to tell it to SELinux and to allow httpd to access User Home Directory. This information is on httpd_selinux(8). However, when I tried to read it, CentOS7 said it’s empty, oops!!
See online httpd_selinux(8).
$ sudo setsebool -P httpd_enable_homedirs on
$ sudo systemctl start httpd.service
I had the error message “Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.” when I first started httpd.service. Because I forgot to create ‘www’ and ‘html’ directories. So I made them as the user centos.
[centos@localhost ~]$ mkdir www
[centos@localhost ~]$ cd www
[centos@localhost www]$ mkdir html
Check the directories context.
$ ls -Z
drwxrwxr-x. test test unconfined_u:object_r:httpd_user_content_t:s0 www
$ ls -Z
drwxrwxr-x. test test unconfined_u:object_r:httpd_user_content_t:s0 html
$ sudo systemctl start httpd.service again.
$ sudo firewall-cmd --permanent --zone=public --add-service=http
$ sudo firewall-cmd --reload
$ sudo systemctl enable httpd.service
Note4) Each Well-Known-Port seems to be set by default. So you don’t need firewall-cmd command for port 80.
Access http://VPS_DomainName/. You can see a page like the right image.
||Install MariaDB||
$ sudo yum install mariadb-server mariadb
The installed version is mariadb.x86_64 1:5.5.40-1.el7_0 & mariadb-server.x86_64 1:5.5.40-1.el7_0.
$ sudo systemctl start mariadb
$ sudo mysql_secure_installation Enter current password for root (enter for none): <<-- Hit [Enter] key.
Set root password? [Y/n] <<-- Hit [Enter] key.
New password: <<-- Type a password for root.
Re-enter new password: <<-- Type the password again.
Hit [Enter] key for each question below ⇩.
Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n]
$ sudo systemctl enable mariadb.service
||Install PHP||
$ sudo yum install php php-mysql php-mbstring
The installed version is php.x86_64 5.4.16-23.el7_0.3 , php-mbstring.x86_64 5.4.16-23.el7_0.3 & php-mysql.x86_64 5.4.16-23.el7_0.3.
At the instllation, the php.conf is created in /etc/httpd/conf.d automatically.
Edit /etc/php.ini.
$ sudo vi /etc/php.ini
Show line numbers by ‘:set nu’.
line# 243: output_buffering = 4096 –>> output_buffering = Off
Note5) The location of additional.ini files: /etc/php.d
The additional ini files by default: curl.ini, fileinfo.ini, json.ini, mbstring.ini, mysql.ini, mysqli.ini, pdo.ini, pdo_mysql.ini, pdo_sqlite.ini, phar.ini, sqlite3.ini, zip.ini
$ sudo systemctl restart httpd.service
||Install phpMyAdmin||
I need phpMyAdmin he-he. However I could not find it among the three repositories, base, extras and updates. So, I added ‘epel’.
$ sudo yum install epel-release
$ sudo yum install phpmyadmin
The installed version is phpMyAdmin.noarch 4.2.11-1.el7.
At the instllation, the phpMyAdmin.conf is created in /etc/httpd/conf.d automatically.
Edit /etc/httpd/conf.d/phpMyAdmin.conf
$ sudo vi /etc/httpd/conf.d/phpMyAdmin.conf
Here is my phpMyAdmin.conf. See below. # phpMyAdmin - Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin
$ sudo setsebool -P ftp_home_dir on
Because I uncomment local_enable=YES. This information is on the vsftpd.conf.
$ sudo vi /etc/vsftpd/chroot_list
I added ‘admin’ to the chroot_list.
When I made “chroot_~” uncommented and an access via FTP as a normal user, I had 500 OOPS: vsftpd: refusing to run with writable root inside chroot(), so I added allow_writeable_chroot=YES to the vsftpd.conf. This information I found on 500 OOPS: vsftpd: refusing to run with writable root inside chroot() Login failed on debian.
line# 104: –>> allow_writeable_chroot=YES
Yesterday morning WordPress 4.0.1 came. They say it is an update for fixing security issues, especially XSS. I encourage you to update to the version immediately if its not updated automatically. When I read “An extremely unlikely hash collision could allow a user’s account to be compromised, that also required that they haven’t logged in since 2008 (I wish I were kidding).”, I laughed despite myself. But I wouldn’t be laughing (Sigh).
CentOS7 provides SSH feature by default. After changing OS, I connected to the VPS by SSH client named TeraTerm. Of course, you can use other SSH client software, for example, PuTTY, WinSCP, etc. The default SSH server version is 6.4p1-8 now.
The default setting was less secure because I could connect to the VPS as a root user with root-password. So I changed the settings.
Before this, I made a public key and a private key by TeraTerm. I set a passphrase to the private key. Of course, I can make the keys on the server, but in such a case I have to have the private key via the Internet. I hate this.
||First, to edit Sudoers File||
Log in VPS Control Panel and click “リモートコンソール”, and then click “VNCコンソールを開く”.
Click “HTML5モードで開く” within 60 seconds. QEMU pop-up in another window.
# usermod -G wheel centos <— “centos” is one of normal users I add to the Sudoers File.
# visudo
The Sudoers File opens.
Search the line includes “wheel” by the command ‘/wheel’.
If you find “#” at the head of “%wheel ALL=(ALL) ALL”, remove “#”. But I found no “#” with the head, so I had nothing to do.
Note) How to use visudo is the same as how to use the vim editor.
Quit visudo.
# su - centos
$ sudo shutdown -h now
At the first time you use ‘sudo’, you have the followings.We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
And it requires your password like this.
[sudo] password for centos:
You can confirm the server halted at the page “VPS ホーム”. Reboot the server.
||Second, to install the package policycoreutils-python||
Log on QEMU again. Install the package policycoreutils-python because I need the ‘semanage’ command for changing SSH port.
# yum install policycoreutils-python
||Third, to change SSH settings||
Run TeraTerm (ttermpro.exe). Log in VPS as the user “centos” with password.
Drag&Drop the public key (id_rsa.pub) to TeraTerm Window. TeraTerm has SCP(Secure Copy Protocol) feature. Click “SCP” button.
#Port22 —> Port****
#PermitRootLogin yes —> PermitRootLogin no
PasswordAuthentication yes —> PasswordAuthentication no
Overwrite and save the sshd_config.
# systemctl restart sshd.service
Note) **** is one of the numbers other than well-known ports. But the numbers are 0 – 65535.
# firewall-cmd --permanent --zone=public --add-port=****/tcp
# firewall-cmd --reload
# semanage port -a -t ssh_port_t -p tcp ****
# exit
$ exit
The connection is terminated.
Run TeraTerm (ttermpro.exe) again. Log in VPS as the user “centos” with key authentication. At the time, use the new SSH port (****) and you need the passphrase of the private key.
I used ‘sudo’ command via SSH.$ sudo firewall-cmd --list-all
public (default, active)
interfaces: eth0
sources:
services: dhcpv6-client ssh
ports: ****/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
Mission complete!!
By the way, I updated my PHP to 5.6.3 on Nov. 15th. ChangLog
くりくりさん’s comment on the Japanese blog inspired me to use CentOS7 on さくらのVPS. I began to use a free trial for two weeks on 18th.
Unfortunately, their service is only in Japanese and only for people who live in Japan. But, I think their service is well if you live in Japan. So, I’ll introduce how to register for it.
The page “さくら VPS のお申し込み” shows up. Click “利用規約の確認へ” (fig.2).
The page “以下の約款及び個人情報の取扱いについてよくご確認ください。” shows up. Print out “基本約款” and “個人情報の取扱いについて” and read them thoroughly. Check the radio button “同意する” and click “つぎへ –>” (fig.3).
The page “お客様の情報をご入力ください” shows up.
Complete the forms about followings on the page. (*) things are required.
The page “会員メニューへログインするためのパスワードを指定してください” shows up.
パスワード: Pasword:
「ひみつ」の質問 : Secret Question: <--- Select from the pull-down menu or you can make an original question.
「ひみつ」の答え: Answer:
Click “つぎへ –>”.
The page “サービスプラン” shows up.
Select さくらのVPS 1G <--- If you use a free trial for two weeks.
Select a residence 石狩/東京/大阪
Click “つぎへ –>”.
The page “Payment” shows up.
Select 毎月払い/年払い monthly/yearly
There are several Payment Methods on the page but you can only use “クレジットカード (Credit Card)” if you use a free trial for two weeks.
There are some important notes on the page. Especially, the two written in red are very important. ・お申込から2週間後に自動で本登録になります。キャンセルの場合は、お客様にて行っていただく必要がございます。
・This temporary registration becomes a formally registration after 2 weeks from your application. If you want the cancellation within the trial period, you have to do it by yourself.
・会員メニューから「本登録」をするとキャンセルが行えなくなります。
・You can manually change the status of the registration from temporary to formally by your account menu. But if you did it, you lose your right about the cancellation even if your trial period doesn’t end.
Click “つぎへ –>”.
The page “最終のご確認” shows up.
This is a confirmation page. Print it out if you need.
The page “以下の通りお申込を受付いたしました” shows up. The page gives you the followings.
会員ID User ID
プラン名 Service Name
サービスコード Service ID
メールアドレス E-mail
Click “会員メニューへお進みください” (fig.4).
Now you reach your account page. Logout. The temporary registration completely.
||How to log in VPS Control Panel||
Go to VPSコントロールパネル and log in.
You can find IPアドレス (IP address) and パスワード (Password) on the email “[さくらのVPS] 仮登録完了のお知らせ”.
パスワード変更 Chage password <--- This password is for VPSコントロールパネル.
||How to install CentOS7||
The default OS is CentOS6, but I want to use CentOS7. So I installed it from “OS再インストール”.
Go to “OS再インストール” and click “カスタムOSインストールへ”.
Select “CentOS 7 x86_64” from the drop-down menu and click “確認 (confirm)”.
Click “実行 (execute)”.
Click “HTML5モードで開く” within 60 seconds. QEMU pop-up in another window.
About instllation, see CentOS 7.
While the instillation you need to set up root-password and a normal user.
The instillation might take time. When it has finished, you have the message “Server disconnected…”. Buck to “VPSホーム” and boot the server (仮想サーバ操作:起動). The “ステータス (status)” is changed from “停止” to “稼働中”.
Now I have CentOS7 as VPS OS.
It was in trouble during the installation that the bottom of QEMU did not appear at all. So I had to handle “Reclaim space” and “Begin Installation” with my intuition and [TAB] and [ENTER] keys. Oops!
Philae landed on comet on November 12th at 15:35 UTC (13th at 00:35 JST).
The comet name is 67P/Churyumov-Gerasimenko. Wow!!
By the way, have you known that our Hayabusa 2 launch is scheduled on November 30th? I can’t wait and I hope good weather!
Memo 1
I added alphabet headlines to Notes, and I use Kranky for their font. For this, I made the following customization to the style.css of the main site. I added the lines with “+” at its head. @import url("../sugar-and-spice/style.css");
+@import url(https://fonts.googleapis.com/css?family=Kranky);
Note) In my case, I changed <h2> tag’s property because I don’t use this tag for any other places on my main site. So, this change does not give any effects to rest of the main site.
I bought this!! What is this? See the right advertisement. \(^o^)/.
Last week, my very old gamepad was broken. I couldn’t find such old models at stores near my house, so I was googling on the Internet and found it out. Its vender is Buffalo but it looks remarkably like the SNES/Super Famicom gamepad by Nintendo.
I ordered it at around 9pm on last Saturday and had it 3pm on last Sunday. Amazon.co.jp is quick about their work and the delivery service company was Kuroneko at this time.
The gamepad works well. I give two thumbs-up to it, he-he.
Hey guys! There are less than two months left this year. It’s getting colder in my town.
By the way, Shinchōsha released Yamada Akihiro’s Twelve Kingdoms Calendar 2015, which is available at stores in Japan only but you can buy it from Amazon.co.jp despite your address. I don’t care that you buy it or not (^o^). So, jump to the page from the right image. It’s not very expensive, ¥1,950. I think it is a kind of book, so its shipping rates is less than ¥1,000 or so.
The calendar is made of seven sheets.
Cover : A new illustlation
Jan & Feb : A new illustlation
Mar & Apr : From “Kasho no Yume (華胥の幽夢)”
May & Jun : From “Hisho no Tori (丕緒の鳥)”
Jul & Aug : From “Tonan no Tsubasa (図南の翼)”
Sep & Oct : From “Tasogare no Kishi Akatsuki no Sora (黄昏の岸暁の天)”