WindowsなどでTeratermなどを使っているとメニューにログとかあるので、簡単にログを残しておけますが、CentOSにはそんなものはない・・・
“CentOS6 ターミナルのログをscriptで残す” の続きを読むnginxインストール
検証のためnginxをyumでインストール。環境はCentOS6.10です。
#yum install nginx
問題なくインストールできたら起動してみる。
# service nginx start
nginx を起動中: [ OK ]
ローカルPCからなら http://localhost で確認できます。
pythonのアップデートでyumが使えない
pythonを2.6.6からアップデートしたらyumが使えなくなった。
yumの実行時に下記のエラーが表示される。
# yum install openssl There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is: 2.7.6 (default, Oct 27 2018, 15:04:53) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq
ポートを何のプロセスが使っているかを調べる
特定のポートを何のプロセスが使用しているのか調べてみたい時がある。
環境はCentOS6.10です。
# lsof -i COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME rpcbind 2560 rpc 6u IPv4 14723 0t0 UDP *:sunrpc rpcbind 2560 rpc 7u IPv4 14724 0t0 UDP *:sco-inetmgr rpcbind 2560 rpc 8u IPv4 14725 0t0 TCP *:sunrpc (LISTEN) rpcbind 2560 rpc 9u IPv6 14726 0t0 UDP *:sunrpc rpcbind 2560 rpc 10u IPv6 14727 0t0 UDP *:sco-inetmgr rpcbind 2560 rpc 11u IPv6 14728 0t0 TCP *:sunrpc (LISTEN) rpc.statd 2621 rpcuser 7u IPv4 15055 0t0 UDP *:41718 rpc.statd 2621 rpcuser 8u IPv4 15058 0t0 TCP *:41790 (LISTEN) rpc.statd 2621 rpcuser 9u IPv6 15061 0t0 UDP *:33947 rpc.statd 2621 rpcuser 10u IPv6 15064 0t0 TCP *:46443 (LISTEN) rpc.statd 2621 rpcuser 32u IPv4 15040 0t0 UDP localhost:703 dhclient 2625 root 6u IPv4 15121 0t0 UDP *:bootpc
ダミーのDNSサーバ dnsmasqを立てる
ダミーのDNSサーバを立てる必要があったのでメモ。
環境はCentOS6.10です。まずはyumでインストールしてみる。
#yum install dnsmasq 読み込んだプラグイン:fastestmirror, refresh-packagekit, security インストール処理の設定をしています Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp パッケージ dnsmasq-2.48-18.el6_9.x86_64 はインストール済みか最新バージョンです 何もしません
おや?デフォルトに入っているようだ。
下記で確認してみると確かにインストールされていて停止している。 “ダミーのDNSサーバ dnsmasqを立てる” の続きを読む