自分用メモなのでかなり割愛しています。詳細を知りたい場合は各々のサイトでご確認ください。
以下のコマンドを実行後、任意にパスワードを設定する。
htpasswd -c /etc/nginx/.htpasswd username
xxxxxxxxxx
location / {
auth_basic "Basic Authetication";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location の部分に上記2行を追加する。
データベースを作成したあとユーザを作成し、そのユーザ情報に紐づけます。
xxxxxxxxxx
CREATE DATABASE dbname;
xxxxxxxxxx
GRANT ALL PRIVILEGES ON dbname.* TO dbuser@'localhost' IDENTIFIED BY 'dbpassword';
nginxの設定でパーマリンクの処理の行を追加しないと反映しません。
xxxxxxxxxx
location / {
# Wordpress Parmanent Link
try_files $uri $uri/ /index.php?q=$uri&$args;
}
xxxxxxxxxx
openssl genrsa 2048 > server.key
xxxxxxxxxx
openssl req -new -key server.key > server.csr
xxxxxxxxxx
rsync -auz -e "ssh -p 10022" username@servername:/directory/path/ /copy/distination/
xxxxxxxxxx
vim-cmd vmsvc/getallvms
xxxxxxxxxx
vim-cmd vmsvc/device.connection VIM-ID 3002 true
xxxxxxxxxx
vim-cmd vmsvc/device.connection VIM-ID 3002 false
xxxxxxxxxx
vim-cmd vmsvc/power.on VIM-ID
xxxxxxxxxx
vim-cmd vmsvc/power.reboot VIM-ID
xxxxxxxxxx
vim-cmd vmsvc/power.shutdown VIM-ID
xxxxxxxxxx
wget -r -np http://www.example.com/hoge/
xxxxxxxxxx
xgettext -k"_" --from-code=UTF-8 -o message.pot *.php
msgmerge en_US/LC_MESSAGES/message.po message.pot -o en_US/LC_MESSAGES/new-message.po
msgfmt -o message.mo message.po
xxxxxxxxxx
yum remove mariadb-libs
xxxxxxxxxx
yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
xxxxxxxxxx
yum -y install mysql-community-server
xxxxxxxxxx
systemctl enable mysqld
systemctl start mysqld
systemctl stop mysqld
MySQL Community Server は最初にテンポラリパスワードが設定されNoパスワード状態ではログインできません。/var/log/mysqld.log の中に生成されたパスワード情報が記載されていますのでその情報を使ってログインします
xxxxxxxxxx
A temporary password is generated for root@localhost: ABCDEFGHIJK
エラー: 依存性の欠如: /lib/ld-linux.so.2 は esets-4.5.5-5.x86_64 に必要とされています /usr/lib/gconv/UTF-16.so は esets-4.5.5-5.x86_64 に必要とされています
エラーの原因は ld-linyx.so.2 の不足によるものです。
xxxxxxxxxx
yum install ld-linux.so.2
Privateキーと証明書を1つにまとめた PKCS12 の証明書の作り方です。
xxxxxxxxxx
openssl pkcs12 -export -inkey server.key -in server.crt -certfile server.crt -out server.pfx
以下のコマンドを実行する。
xxxxxxxxxx
certbot certonly --manual --server https://acme-v02.api.letsencrypt.org/directory -d *.qurataro.com
実行すると以下のメッセージが表示される
xxxxxxxxxx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for qurataro.com
-------------------------------------------------------------------------------
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.
Are you OK with your IP being logged?
-------------------------------------------------------------------------------
(Y)es/(N)o:
Please deploy a DNS TXT record under the name
_acme-challenge.qurataro.com with the following value:
Ahacuzt7x1785Kr8jncL4IqfpbBG3gqwVnrBstesRSC
Before continuing, verify the record is deployed.
-------------------------------------------------------------------------------
Press Enter to Continue
指定したワイルドカード証明書のドメインに対して、認証用のサブドメイン名とチャレンジコードが発行される。この段階で、「Enter」を押さず、チャレンジレスポンスコードをコピーし、ドメインを管理しているDNSサーバに登録する。
サブドメイン名 | _acme-challenge |
---|---|
レコードタイプ | TXT |
データ | Ahacuzt7x1785Kr8jncL4IqfpbBG3gqwVnrBstesRSC |
DNSに登録したら登録情報が反映されるまでしばらく待ちます。TTL 3600 だと1時間は待ったほうがいいです。失敗するとチャレンジコードが再発行され、前のチャレンジコードが利用できなくなりますので、再発行されたチャレンジコードを再度DNSに登録する必要があります。
発行が成功すると、/etc/letsencrypt/live/qurataro.com/ にワイルドカード証明書が発行される。
今回は Vison Effect Floating ライセンスサーバの管理コマンド /sbin/rvlserver, /sbin/rvlkillserver の2つをセットする場合を想定します。
xxxxxxxxxx
[Unit]
Description=RVL Server Floating License Agent
After=syslog.target
Conflicts=rvlserver.service
[Service]
Type=forking
ExecStart=/sbin/rvlserver
ExecStop=/sbin/rvlkillserver
[Install]
WantedBy=multi-user.target
xxxxxxxxxx
$ systemctl enable rvlserver
xxxxxxxxxx
$ systemctl start rvlserver
MacOS Mojave を使った場合の例です。
xxxxxxxxxx
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/NO\ NAME/ --applicationpath /Applications/Install\ macOS\ Mojave.app
Macbook の電源を投入後「option」ボタンを押し続けると、USBから起動します。 CentOS8 のデフォルト GUI 起動を停止する方法 CentOS8 はデフォルトでコンソール画面が GUI が起動するが、これを CUI 起動に変更する。
xxxxxxxxxx
$ systemctl disable gdm.service
Cockpit のポート番号を変更
[Unit]
Description=Cockpit Web Service Socket
Documentation=man:cockpit-ws(8)
Wants=cockpit-motd.service
[Socket]
ListenStream=9090 --> 12345678
ExecStartPost=-/usr/share/cockpit/motd/update-motd '' localhost
ExecStartPost=-/bin/ln -snf active.motd /run/cockpit/motd
ExecStopPost=-/bin/ln -snf /usr/share/cockpit/motd/inactive.motd /run/cockpit/motd
[Install]
WantedBy=sockets.target
iperf コマンドを使って通信速度の確認を行います。 送信側と受信側でコマンドを実行する必要があります。
$ iperf -s
このコマンドを実行して受信側が待機します。
iperf -c 192.168.1.2 -r
受信側のIPアドレスを -c 以下にセットします。
$ iperf -c 192.168.1.2 -r
Server listening on TCP port 5001
TCP window size: 208 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.1.1, TCP port 5001
TCP window size: 208 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.1.2 port 59854 connected with 192.168.1.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 290 MBytes 243 Mbits/sec
[ 4] local 192.168.1.2 port 5001 connected with 192.168.1.1 port 39888