LoginSignup
0
0

More than 5 years have passed since last update.

centos に mjpeg_stremer をいれて他のPCあるいはスマホから見る xfce自動起動

Last updated at Posted at 2019-03-28

1.png

インスト自体は
http://sonohi-bibouroku.hateblo.jp/entry/20170703/1499091966
を参考しました。

あと centosにapacheをいれておきます。

[cent@H3 ~]$ pwd
/home/cent
[cent@H3 ~]$
[cent@H3 ~]$ ls -l /home/cent/ | grep drwx
drwxr-xr-x. 2 cent cent 24576 Mar 28 01:59 BAT
drwxr-xr-x. 2 cent cent 38 Mar 27 22:21 Desktop
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Documents
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Downloads
drwxrwxr-x. 6 cent cent 4096 Mar 28 02:24 mjpg-streamer
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Music
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Pictures
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Public
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Templates
drwxr-xr-x. 2 cent cent 6 Mar 27 20:40 Videos

[cent@H3 ~]$ cd mjpg-streamer/
[cent@H3 mjpg-streamer]$ su
Password:
[root@H3 mjpg-streamer]# ./baby.bat
でいけました

なお

 ./comment-out.bat baby.bat 

systemctl stop  firewalld

systemctl start httpd

export LD_LIBRARY_PATH="$(pwd)"

./mjpg_streamer -i 'input_uvc.so -d /dev/video0 -r 640x480 -n -y' -o 'output_http.so -w /srv/http -p 8888'

です。
これで カメラ付きノートパソコンのカメラを 赤ちゃんにあわせて
自分の庭に行って お外で庭作業をしていても
スマホのクロームに
http://192.168.2.126:8888/?action=stream
をいれると 今 現に赤ちゃんがどうしてるのが ちゃんと見れます。
とっても便利です。

上のように 防火壁を 完全になくさなくても

./comment-out.bat mjpg-streamer/baby.bat 
 firewall-cmd --add-service=http
 firewall-cmd --add-port=8888/tcp
 firewall-cmd --list-all
systemctl start httpd
export LD_LIBRARY_PATH="$(pwd)"
./mjpg_streamer -i 'input_uvc.so -d /dev/video0 -r 640x480 -n -y' -o 'output_http.so -w /srv/http -p 8888'
でもいけます。


この場合は
 [root@H3 cent]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: wlp1s0
  sources: 
  services: ssh dhcpv6-client http
  ports: 8888/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
くらいの防御はかかってます。

(その後なすべきこと1) 時刻合わせ

# systemctl enable chronyd
# systemctl start chronyd

余談)男系天皇

まず
1.jpg
エデンの園の 「アダム」 と「イブ」だ


さて 高校の生物の知識からだけど
2.png

つまり 男の子のY遺伝子は 父のY遺伝子そのもの
で 
平成天皇のY遺伝子は 昭和天皇のY遺伝子そのもの
したがって
昭和天皇のY遺伝子は 明治天皇のY遺伝子そのもの
したがって
明治天皇のY遺伝子は 神武天皇のY遺伝子そのもの

では 世界には何種類のY遺伝子があるのだろう。
アダムは何人いたのだろう? 
Y遺伝子の突然変異がなければDNA解析して塩基配列をみればすぐわかるはず!

 男はハゲるのは必然か

https://ja.wikipedia.org/wiki/Y%E6%9F%93%E8%89%B2%E4%BD%93#/media/File:Human_male_karyotpe_high_resolution_-_Chromosome_Y.png より
Y.png


X染色体と比べると Y染色体は情けないほど小さく、 
X染色体上の遺伝子数は1,098に比較して 1/10以下の Y染色体上の遺伝子数は78 (某報告)

猿は ヒトより毛が3本少ない と仄聞。 
よって 男は 女より毛が1000本以上すくないハゲってか (it's joke)

(  http://www.geocities.jp/ikoh12/kennkyuuno_to/012_2Ysennsyokutai_no_bunnpu_to_keiro.html
は Y染色体に詳しい )

 追記1)

日本語入力は ibus-mozcで fedora と同じくです。

 追記2)

mjpeg_stremer 動かすのは archmanの方がシンプルです。
https://qiita.com/tyokai/items/06a6a44dc3fcfa0e503a

素朴なインスト 3)

ip address

nmcli con up XXXXX

yum install -y epel-release

yum update

yum groupinstall " X Window System "

yum groupinstall xfce

https://eng-entrance.com/linux-package-yum より

yum check-update

yum update

1.png

<wifi> では
nmcli con add con-name wlp0s18f2u4 ifname wlp0s18f2u4 type wifi elecom2g-abc 1234567890

日本語
https://www.server-world.info/query?os=CentOS_7&p=japanese をみて

yum -y install ibus-mozc vlgothic-*

localectl set-locale LANG=ja_JP.UTF-8

source /etc/locale.conf

yum install sddm

./comment-out.bat /etc/sddm.conf
[Autologin]
Session=xfce.desktop
User=cent
[General]
[Theme]
[Users]
[Wayland]
[X11]

$ ./comment-out.bat .xinitrc
startxfce4

xfce4を自動起動するため
# crontab -l
@reboot systemctl start sddm

 centosサーバー用途のためか あまりにも厳密に作りすぎていて 日常使用にはちょっと不便だなあ 

白河の清きに魚も住みかねて もとの濁りの田沼恋ひしき -> 水清ければ魚棲まず
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0