研究室内wikiの新規構築

旧和田研のときに使用していたpukiwikiを廃止し,研究室内wikiを新規構築しました.

旧wikiは放置気味かつ新規記事を極めて書きにくい状態でした.そこで,wordpressを用いたwikiを新たに構築しました.

使用したテーマはwikipressです.

新しいwikiの構築により,情報が集積され非常にアクセスしやすくなりました.今後もwikiを更新し続ける予定です.

Linuxマシン認証システムの移行(freeIPA)

研究室内で使用するLinuxマシンの認証システムをNISからfreeIPAに移行しました.

これにより,認証管理の手間が大幅に削減され,加えてレプリケーションを用いることで簡単にIPAサーバを複製できるようになります.

以下にfreeIPAサーバの構築方法を示します.ただし,環境は以下の通り.

  • Oracle Linux 9

まずはアップデート.

sudo dnf upgrade

ホスト名を決定し,freeIPA関連のソフトウェアをインストールします.

ホスト名はFQDNにする必要があり,さらにシングルラベルドメインは不可能.これは,端末の識別・管理をIPではなくネームベースで行う仕様であることに起因します.

sudo hostnamectl hostname <HOSTNAME>
sudo dnf -y install freeipa-server freeipa-server-dns freeipa-client

ファイアウォールとSELinuxを無効化します.

sudo systemctl stop firewalld.service 
sudo systemctl disable firewalld.service
sudo vim /etc/selinux/config
右の様に変更 SELINUX=disabled
sudo reboot

IPAサーバをインストールします.

sudo ipa-server-install

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.
Version 4.10.0

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the NTP client (chronyd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure SID generation
  * Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Do you want to configure integrated DNS (BIND)? [no]: ←何も入力せずにEnter
Cleaning up...
The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information
[hoge@hoge ~]$ 
[hoge@hoge ~]$ sudo ipa-server-install
[sudo] password for hoge: 

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.
Version 4.10.0

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the NTP client (chronyd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure SID generation
  * Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Do you want to configure integrated DNS (BIND)? [no]: yes ←yesと入力してEnter

Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com


Server host name [<HOSTNAME>]: ←何も入力せずにEnter

Warning: skipping DNS resolution of host <HOSTNAME>
The domain name has been determined based on the host name.

Please confirm the domain name [<DOMAINNAME>]: ←何も入力せずにEnter

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [<REALMNAME>]: ←何も入力せずにEnter
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password: 
Password (confirm): 

The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.

IPA admin password: 
Password (confirm): 

Checking DNS domain <DOMAINNAME>., please wait ...
Invalid IP address fe80::642:1aff:fedf:ecb5 for <HOSTNAME>: cannot use link-local IP address fe80::642:1aff:fedf:ecb5
Do you want to configure DNS forwarders? [yes]: yes ←yesと入力してEnter
Following DNS servers are configured in /etc/resolv.conf: <DNS FORWARDERS>
Do you want to configure these servers as DNS forwarders? [yes]: yes
All detected DNS servers were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 
DNS forwarders: <DNS FORWARDERS>
Checking DNS forwarders, please wait ...
Do you want to search for missing reverse zones? [yes]: ←何も入力せずにEnter
Reverse record for IP address <IPADDRESS> already exists
Trust is configured but no NetBIOS domain name found, setting it now.
Enter the NetBIOS name for the IPA domain.
Only up to 15 uppercase ASCII letters, digits and dashes are allowed.
Example: EXAMPLE.


NetBIOS domain name [hoge]: ←何も入力せずにEnter

Do you want to configure chrony with NTP server or pool address? [no]: yes ←yesと入力してEnter
Enter NTP source server addresses separated by comma, or press Enter to skip: ntp.nict.jp
Enter a NTP source pool address, or press Enter to skip: 

The IPA Master Server will be configured with:
Hostname:      <HOSTNAME>
IP address(es): <IPADDRESS>
Domain name:    <DOMAINNAME>
Realm name:     <REALMNAME>

The CA will be configured with:
Subject DN:   CN=Certificate Authority,O=<REALMNAME>
Subject base: O=<REALMENAME>
Chaining:     self-signed

BIND DNS server will be configured to serve IPA domain with:
Forwarders:       <FORWARDERS>
Forward policy:   only
Reverse zone(s):  No reverse zone

NTP server:	ntp.nict.jp
Continue to configure the system with these values? [no]: yes ←yesと入力してEnter

〜省略(かなり時間がかかる)〜

Setup complete

Next steps:
	1. You must make sure these network ports are open:
		TCP Ports:
		  * 80, 443: HTTP/HTTPS
		  * 389, 636: LDAP/LDAPS
		  * 88, 464: kerberos
		  * 53: bind
		UDP Ports:
		  * 88, 464: kerberos
		  * 53: bind
		  * 123: ntp

	2. You can now obtain a kerberos ticket using the command: 'kinit admin'
	   This ticket will allow you to use the IPA tools (e.g., ipa user-add)
	   and the web user interface.

Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
The ipa-server-install command was successful ←これが表示されれば構築は完了

以上でfreeIPAサーバの構築は完了です.