cd /var/lib
# Redmineが格納されているディレクトリの親ディレクトリに移動します
ls -ld redmine
# 退避対象のディレクトリがあることを確認します
sudo mv redmine redmine_$(date +%Y%m%d)
ls -ld redmine_$(date +%Y%m%d)
apache停止
ここでWebサービスを停止するのは、DBを削除するためです。
systemctl status apache2.service
sudo systemctl stop apache2.service
systemctl status apache2.service
DB削除
慎重に行って下さい。
sudo mysql -u root -p
show databases;
/* redmineのDBがあることを確認 */
drop database redmine;
show databases;
/* redmineのDBがないことを確認 */
CREATE DATABASE redmine character set utf8mb4;
show databases;
/* redmineのDBがあることを確認 */
exit
whoami
#上記、作成したユーザーであることを確認します
sudo su -
# rootに昇格できることを確認します
do-release-upgrade
# *ここからの作業は中断せず、一気通貫で行います*
アップグレード中にプロンプトから質問されたこと
以下、主要な質問事項です。コメント(#の後)に概要を書いています。
Reading cache
Checking package manager
Continue running under SSH?
This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.
If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?
# SSHのポートを追加するか
# → y
Starting additional sshd
To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'
To continue please press [ENTER]
# 設定を変更するか
# → Enter
Do you want to start the upgrade?
4 packages are going to be removed. 85 new packages are going to be
installed. 555 packages are going to be upgraded.
You have to download a total of 247 M. This download will take about
49 seconds with a 40Mbit connection and about 6 minutes with a 5Mbit
connection.
Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be canceled.
Continue [yN] Details [d]
# アップグレード前の最終確認
# → y
There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will x
x normally be prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you automatically so you can avoid being x
x asked questions on each library upgrade. x
x x
x Restart services during package upgrades without asking?
# アップグレード時、各種サービスを再起動前にプロンプトでy/nを確認するか
# → 質問されるのがめんどいので yes
# この間、SSH等の設定変更を行うか訊いてきます。プロンプトの選択を変えずに先に進みました
# keep the local version currently installed
Remove obsolete packages?
# 不要パッケージの削除
# → Yes
System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Continue [yN]
# アップグレード完了後にリブートするか
# → y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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: y
# IPは記録される旨を訊かれるので了承のためY
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.sample.com with the following value:
「文字列」
# 上記文字列をDNSのテキストレコードに登録します
# 登録後、
# nslookup -type=TXT _acme-challenge.sample.comを入力し、「文字列」が返ってくるまで少し待ちます
Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
# TXTレコードが返ってくるのを確認したらEnter
発行完了
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/sample.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/sample.com/privkey.pem
Your cert will expire on 2023-03-24. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le