chocolatey is a similar tool for windows like as apt-get in debian
Install is very easy. refer
https://chocolatey.org/
available package lists are here
https://chocolatey.org/packages
谷本の備忘録・雑記帳・work
CATEGORY ARCHIVE
chocolatey is a similar tool for windows like as apt-get in debian
Install is very easy. refer
https://chocolatey.org/
available package lists are here
https://chocolatey.org/packages
wordpress 用のデータをバックアップするためにExpectを使ってバックアップのためのス
クリプトを作ったので掲載。 後はcronで自動実行。
To backup wordpress data easily, I created a script with Expect and post it to
this site.
‘ install method in debian, ubuntu, raspbian
$ sudo apt-get install expect
‘script
――――from here―――――――――――――――――-
#!/usr/bin/expect
set timeout 300
spawn sudo scp -r aaa@192.168.xxx.yyy:/abc /backups/xxx
expect “aaa@192.168.xxx.yyy’s password:”
send “password\n”
expect “aaa@hostname ~ $”
spawn sudo scp -r aaa@192.168.xxx.yyy:/defg /backups/xxx
expect “aaa@192.168.xxx.yyy’s password:”
send “password\n”
expect “aaa@hostname ~ $”
spawn sudo scp -r bbb@192.168.zzz.uuu:/abc /backups/zzz
expect “bbb@192.168.zzz.uuu’s password:”
send “password2\n”
expect “bbb@hostname2 ~ $”
exit 0
――――――― until here―――――――――?
aaa, bbb, xxx, yyy, abc, defg, abc, hostname, hostname2 are
dummy just for open for public.
My web server is not running on a rental server. So FTP is not permitted. Regul
ar update method is conducted with FTP.
So I updated wordpress as following.
レンタルサーバーではないので、外部からのFTPを許可していない。wordpress内の通
常の更新ではFTPを使うので、WEBで調べて次の様にして更新した。
Step1
sudo nano wp-config.php
#insert the following line into wp-config.php
define(‘FS_METHOD’, ‘direct’);
Step2
record current chown status
ls -l
ls -l wordpress
ls -l wordpress/wp-content
Step3
cd wordpress/wp-content
sudo chmod 707 plugins themes upgrade
cd ../..
sudo chown -R www-data:www-data wordpress
Step4
wordpressから更新 プラグインも一緒に更新
update wordpress by wordpress itself.
plug -in can be uodate too.
Step5
Recover of changes by step1 and step3
Finally test access to wordpress page.
As the following warning appeared after introducing of a domain name, I fixed it
by modifying of /etc/hosts.
Warning:
apache2: Could not reliably determine the server’s fully qualified domain name,
using 127.0.1.1 for ServerName
Fix:
sudo nano /etc/hosts
before
127.0.1.1 host_name
after
127.0.1.1 domain_name host_name
Then restart apache.
simle DNS
―――- server side ――
$ sudo apt-get update
$ sudo apt-get install dnsmasq
$ sudo nano /etc/hosts
192.168.2.199 windows7pro
192.168.2.197 debian
192.168.2.198 centos6
192.168.2.192 ubuntu
――― linux client side ――
add
dns-nameserver ‘IP of setted dnsmasq server’
なお、一番先頭にもってこないと、debian以外はうまくいかず
――――-added on 2016/3/13 ――――――
Don’t forget updating of /etc/resolv.conf
――――――――――――――――――――
――― windows client side ――
properties でDNSに追加
詳細設定のDNSのところで、さらに、
a single period (.) を追加が必要
―added on 2016/3/13――――――
at command prompt, the following command may be necessary ipconfig /flushdns
―added on 2016/3/19―――――――-
If and When the dnsmasq server is rebooted, “ipconfig/flushdns” may be necessary.
Though I don’t know why.
―-added on 2016/4/11―――――――
I don’t know the reason,but windows side couldn’t resolve right IP address. Restarting of Windows was necessary.
下記のコメンドを駆使してみる
apt-cache search キーワード #検索
apt-cache show パッケージ名 #パッケージ情報
apt-cache showpkg パッケージ名 #依存関係、被依存関係表示
apt-get -f install
dpkg -l #インストールされたpkgの表示
dpkg -l パッケージ名 # パッケージ情報
dpkg -L パッケージ名 # PKG内ファイル一覧
dpkg -r パッケージ ??
sudo dpkg -configure パッケージ名 #不完全な状態のPKGを再設定
sudo dpkg -configure -a 全て再設定
$ sudo apt-get ?purge remove パッケージ名
$ sudo apt-get clean
依存関係の修復には、以下のコマンドを用います。
$ sudo apt-get -f install
このコマンドにより、依存関係を満たすために必要なパッケージのダウンロード、インストールができるらしい。
パッケージの設定で問題が発生している場合は、以下のコマを試してみる
$ sudo dpkg ?configure -a
修復できない場合は、パッケージを削除し、キャッシュも消す。
$ sudo apt-get ?purge remove パッケージ名
$ sudo apt-get clean
再ダウンロードしたものをインストールしてみる。
$ sudo apt-get update
$ sudo apt-get install パッケージ名