User Tools

Site Tools


vps:vps4th2nd_06

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vps:vps4th2nd_06 [2019/04/08 22:00]
hoge@hoge [事前設定]
vps:vps4th2nd_06 [2019/06/16 15:16]
Line 1: Line 1:
-====== prisoner desktop設定 ====== 
-prisonerのdesktopをVDIにする。 
- 
-===== 事前設定 ===== 
-jailerから各設定ファイルを直接編集する。各設定ファイルのプレフィックスは/​usr/​jail/​desktopとなる。 
- 
-  * etc/​syslog.confでconsole出力をコメント化する。<​code>​ 
-# *.err;​kern.warning;​auth.notice;​mail.crit ​             /​dev/​console 
-</​code>​ 
-  * etc/​crontabで不要なcronをコメント化する。<​code>​ 
- # 1,31  0-5     ​* ​      ​* ​      ​* ​      ​root ​   adjkerntz -a 
-</​code>​ 
-  * etc/​pw.confを新規作成する。prisoner内のuid,​ gidとjailerのuid,​ gidが同じになるとセキュリティ上の問題が発生するため、uid,​ gidの範囲を設定する。<​code>​ 
-minuid 2201 
-maxuid 2300 
-mingid 2201 
-maxgid 2300 
-</​code>​ 
-  * etc/​fstabをtouchで作成する。 
-  * etc/​resolv.confを作成する。<​code>​ 
-domain "​ドメイン名"​ 
-nameserver "​さくらのVPS指定 1" 
-nameserver "​さくらのVPS指定 2" 
-</​code>​ 
-  * etc/​hostsにweb自身と内側のホスト(jailer,​ prisoner)を登録する。<​code>​ 
-127.0.0.1 ​            ​localhost localhost.example.com 
-192.168.100.254 ​      gw gw.example.com 
-192.168.100.1 ​        web web.example.com 
-192.168.100.2 ​        ​desktop desktop.example.com 
-192.168.100.2 ​        ​desktop.example.com. 
-192.168.100.253 ​      vps vps.example.com 
-</​code>​ 
-  * etc/​rc.confを新規作成する。<​code>​ 
-hostname="​desktop.example.com"​ 
-ifconfig_epair3b="​inet 192.168.100.2 netmask 255.255.255.0"​ 
-defaultrouter="​192.168.100.254"​ 
-firewall_enable="​YES"​ 
-firewall_type="​open"​ 
-ssd_enable="​YES"​ 
-dbus_enable="​YES"​ 
-hald_enable="​YES"​ 
-</​code>​ 
-    * ifcofig_epair3b\\ jailerで作成したepair3の一端。jailerからprisonerであるdesktopに割り当てる。 
- 
-===== OS設定 ===== 
-prisoner desktopを起動後、以下の設定を行う。 
-  * prisoner:​desktopへ移動<​code>​ 
-# jexec desktop /bin/sh 
-</​code>​ 
-  * newaliasesの実行<​code>​ 
-# newaliases 
- /​etc/​mail/​aliases:​ 27 aliases, longest 10byte, 275 bytes total 
-</​code>​ 
-  * bsdconfigでそれぞれ設定。 
-    * Root Password 
-    * User Management 
-    * Time Zone 
- 
-===== ssh設定 ===== 
-==== sshd ==== 
-  * /​etc/​ssh/​sshd_configにて以下の設定を行う。<​code>​ 
-ChallengeResponseAuthentication no 
-</​code>​ 
-  * 設定後、sshdを再起動する。<​code>​ 
-# service sshd restart 
-</​code>​ 
- 
-==== ユーザ設定 ==== 
-  * ユーザ毎に$home/​.sshを作成する。 
-  * $HOME/​.ssh/​authorized_keysを作成する。<​code>​ 
-#cat "​ユーザの公開鍵"​ >> authorized_keys 
-</​code>​ 
- 
- 
-===== ソフトウェア導入 ===== 
-==== pkg ==== 
-pkgにて、以下を導入。 
-  * xorg 
-  * xfce4 
-  * gnucash 
-  * chromium 
-  * tigervnc 
-  * ja-font-ipa 
-  * ja-fcitx-mozc 
-  * zh-fcitx-configtool 
- 
- 
-==== TigerVNC ​ ==== 
-TigerVNC を inetd で制御する。 
- 
-  * /​etc/​services を編集<​code>​ 
-vnc     ​5901/​tcp 
-</​code>​ 
-  * /​etc/​inetd.conf を編集<​code>​ 
-vnc    stream ​ tcp  nowait ​ nobody ​ /​usr/​local/​bin/​Xvnc ​ Xvnc -inetd -query localhost -once -geometry <​横>​x<​縦>​ -securitytypes=none 
-</​code>​ 
- 
- 
-==== i-bus / mozc  ==== 
-  * X転送を有効にして ssh ログイン 
-  * ibus-setup を起動 
-  * [Input Method] で mozc 以外を Remove 
-  * mozcの設定 
-    * [General] で [Keymap style]を ATOKに変更後 Customize 
-    * keymap を変更 
- 
-^  Mode  ^  Key  ^  Command ​ ^ 
-|Composition|Ctrl Space|IMEOn| 
-|DirectInput|Ctrl Space|IMEOn| 
-|Composition|Ctrl Space|CancelAndIMEOff| 
-|Conversion|Ctrl Space|CancelAndIMEOff| 
-|Precomposition|Ctrl Space|CancelAndIMEOff| 
- 
- 
- 
- 
  
vps/vps4th2nd_06.txt · Last modified: 2019/06/16 15:16 (external edit)