도커로 워드프레스를 설치하고 잘 사용하다가 업데이트를 마딱드린 순간이 찾아왔다. 워드프래스 내의 자동 업데이트 기능을 사용해 보려 했으나, FTP 정보를 입력 해라는둥 도커 시스템에는 적합하지 않는 업데이트 방법만 제시했다. 그래서 도커를 이용해서 WordPress를 업데이트할 방법을 찾아봤다.
방법은 간단하다. 파일 두개를 삭제한 후, Docker의 워드프레스 이미지를 업데이트 하고 컨테이너를 재생성 하면 된다.
rm index.php && rm wp-includes/version.php
docker-compose pull
docker-compose up -d
주의할 부분이 있다. 이 방식은 WordPress 코어를 최신 버전으로 덮어쓴다는 것이다. /wp-content 폴더나 /wp-config.php 파일을 제외한 모든 기본 워드프레스 파일들이 모두 덮어써진다. 플러그인등을 사용하지 않고 기존에 워드프레스 코어를 직접 수정한 경우라면 이 방법을 사용해서는 안된다. 이 방법을 사용했다가는 기존 수정했던 코드들이 다 날라갈 것이다.
이전 글에서는 Docker를 사용해 게스트 유저가 서버를 운영할 수 있는 가상 환경을 만드는 것을 했다. 그런데 이전 글을 잘 보면 Volume 설정을 하지 않아 컨테이너를 종료하면 컨테이너 내의 모든 작업 내역이 유실된다.
모든 데이터를 보존하려 아래와 같이 컨테이너의 루트 디렉터리를 호스트와 공유하여 데이터를 동기화해보는 방법을 시도할 수는 있겠지만,
docker run -dit -v ~/guest1:/ ubuntu:18.04
루트 디렉터리는 볼륨으로 바인딩 할 수 없다는 오류를 볼 수 있다.
docker: Error response from daemon: invalid volume specification: '/home/ubuntu/guest1:/': invalid mount config for type "bind": invalid specification: destination can't be '/'.
bind mount를 하거나 tmpfs mount를 해도 결과는 같다.
docker run -dit --mount type=bind,source=~/guest1,target=/ ubuntu:18.04
# or
docker run -dit --tmpfs / ubuntu:18.04
그렇다면 어떻게 해결할 수 있을까? Docker는 여러 명령어를 지원하는데 export와 import 명령어를 사용하면 이 문제를 어느 정도 해결 할 수 있다.
정확히 말하면 위의 방법들처럼 실제 데이터를 호스트와 공유하는 것이 아닌, 특정 시점의 컨테이너 파일 시스템을 파일로 저장하고 불러오는 방법이다.
먼저 컨테이너를 파일로 저장하는 방법은 아래와 같다. export 명령어를 사용하여 컨테이너의 파일 시스템을 guest1_export.tar 파일로 아카이빙 할 수 있다.
This page describes three advancedsettings.xml settings that can be used to maximize the video playback cache. You can use all or just a couple of these settings to see significant improvements in cache performance, should you require it (most users will not require these modifications). This can help with intermittent network issues, buffering, reduce how long the network is tied up, and sometimes improve battery life.
Note: Even if you change the cache settings in Kodi, that won’t change how fast the video file data comes in over the network. For example, it won’t make a slow server load the video any faster.
If you don’t already have an advancedsettings.xml file, it’s very simple to make. Kodi uses this file for advanced settings and features that normal users shouldn’t modify without first knowing what they do, as well as for experimental features, etc.
1
Since you can use all or just some of the following settings, let’s start out with the basic file. Create a plain text file (no rich text formatting, don’t use .doc, etc) and save it as advancedsettings.xml. Make sure that the file extension is “.xml” and not “.txt” or “.xml.txt”.
2
Cut and paste this into your new plain text file:<advancedsettings> <cache> <!— The three settings will go in this space, between the two cache tags. —> </cache> </advancedsettings>
3
Add some or all of the settings tags from the next section.
4
Save this file in your userdata folder:Note: If you have an existing file, make sure the <cache></cache> tags, and settings we’ll add between them, are between the main <advancedsettings></advancedsettings> tags.The Userdata folder is a subfolder of the Kodi Data Folder and is located as shown in the table below.Operating systemUserdata FolderAndroidAndroid/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)iOS/private/var/mobile/Library/Preferences/Kodi/userdata/LibreELEC/storage/.kodi/userdata/Linux~/.kodi/userdata/Mac/Users/<your_user_name>/Library/Application Support/Kodi/userdata/Nvidia Shield (SMB)smb://<nvidiashieldurl>/internal/Android/data/org.xbmc.kodi/files/.kodi/userdataOSMC/home/osmc/.kodi/userdata/tvOS/private/var/mobile/Library/Preferences/Kodi/userdata/Windows%APPDATA%\Kodi\userdataWindows Portable<Install location chosen by you>\portable_data\userdata\Windows via Microsoft Store%LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\Windows Xbox%LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\Note: In some Android setups the path may be slightly different to the one stated above.
2 Cache settings
advancedsettings.xml tag
what it does
<buffermode>1</buffermode>
Choose what to bufferThis setting will force Kodi to use a cache for all video files, including local network, internet, and even the local hard drive. Default value is 0 and will only cache videos that use internet file paths/sources.0Buffer all internet filesystems (like “2” but additionally also ftp, webdav, etc.) (default)1Buffer all filesystems, both internet and local2Only buffer true internet filesystems (streams) (http, etc.)3No buffer4All network filesystems (incl. smb, nfs, etc.)
<memorysize>20971520</memorysize>
Increasing the cacheHere we can do two things:Value: 20971520(or any value, in bytes)– keep the cache in RAM, but increase how much RAM is used. The number is the buffer size in bytes (20971520 is the default, which is 20MB, which requires 60MB of free RAM). Kodi will not buffer ahead more than this. Note: For the memory size set here, Kodi will require 3x the amount of RAM to be free. Setting this too high might cause Kodi to crash if it can’t get enough RAM.orValue: 0 – we can use the local disk memory (typically your hard drive), which will not put any limit on the size (outside of the size of your drive). This also allows devices with low RAM, such as the Raspberry Pi, to cache more than they normally would due to the small amount of RAM they have. The cache is deleted from the local disk whenever playback is stopped. Note: This will likely cause increased wear-and-tear on your drive. Note: Do not use the 0 (zero) setting if you have a device with a low amount of local storage, such as 8GB on a Fire TV. As a general rule of thumb, only use this setting if you have at least 16 GB of local drive space that is currently free on the device. Otherwise, Kodi will stall and stop playing the video, or might even crash.
<readfactor>10</readfactor>
Increase the fill-rate of the cacheBy default (value: 4), Kodi will only fill the cache a little above what is needed to play it back. It does this as to not max out your network and possibly max out some hardware. For most users and hardware, this setting shouldn’t cause any issues, but be aware of it if you have unusual CPU spikes in your HTPC. The value of this setting is a multiplier of the default limit. If Kodi is loading a typical bluray raw file at 36 Mbit/s, then a value of 2 will need at least 72 Mbit/s of network bandwidth. However, unlike with the RAM setting, you can safely increase this value however high you want, and Kodi won’t crash. Just know that it might cause Kodi to attempt to use all available bandwidth on your HTPC during playback.
3 Kodi v17 changes
In Kodi v17, the cache-related tags were removed from <network> and placed under a new<cache> tag. In addition, the following tags were renamed:
<cachemembuffersize> was renamed to <memorysize>
<readbufferfactor> is renamed to <readfactor>
4 Examples
NOTICE: These are just examples to explain how the feature works. Most users will just want to use example 4.
4.1 Example 1
All three options enabled, using local hard drive for cache.
Two options enabled, using 50MB of RAM for cache (which requires 150MB of free RAM), and cache both internet, LAN, and local content.advancedsettings.xml
A safe setting for most devices with 1GB of RAM that should help most users “on the edge”. All protocols get cached, cache rate fills up pretty much as fast as possible, and cache size is about 133MB, using about 400MB of ram total.advancedsettings.xml
오다시티(audacity) 는 무료 음악 편집 프로그램으로써 잡음을 제거할 수 있고 음악파일을 마음대로 자르고 붙일 수 있는 프로그램입니다. 사용법도 매우 간단하며 한글 적용이 되기 때문에 누구나 쉽게 사용이 가능하다는 장점이 있습니다. 오다시티 설치 및 간단한 오류해결과 사용법에 대해 알려드리도록 하겠습니다.
오다시티의 주요 기능은 아래 사진을 참고하시기 바랍니다. 저도 몇가지 무료 음악 편집 프로그램을 사용해봤었는데요. auda시티 만큼 소음 제거 기능이나 편집 기능이 쉽고 잘되있는 프로그램은 없던 것 같네요.
간단하게 설치 방법부터 알려드리도록 하겠습니다. 가장 먼저 아래 링크를 클릭 – 무료 다운로드 버튼 클릭해서 설치파일을 다운로드 받습니다. 네이버 로그인 시 고속 다운로드를 받으실 수 있기 때문에 로그인 후 설치 파일을 받으시는 걸 권장합니다.
설치 파일을 다운로드 받으시고 실행시키시면 설치가 진행되는데요. English 선택 후 OK버튼을 클릭합니다. 간혹 English버전이 아니라 한글버전으로 받는 방법은 없는지 궁금해하시는 분들이 계신데요. 여기서 English를 선택해도 한글버전으로 설치가 되기 때문에 걱정안하셔도 될 것 같네요. ^^
OK버튼 클릭 후 다음 나오는 화면에서 Next -> 그 다음 화면에서도 Next 버튼을 클릭합니다. 정보를 소개하는 창이기 때문에 바로 넘어가셔도 상관없습니다.
Next 버튼을 클릭하시면 경로 설정하는 화면이 나오는데요. C드라이브의 용량이 부족한게 아니라면 기본적으로 설정되어있는 경로로 설치하시는걸 권장합니다.
경로 설정 후 Next 버튼을 클릭하시면 아래 사진과 같은 화면이 나오는데요. 첫 번째 체크 박스는 바탕화면에 바로 가기 생성 유무, 두 번째 체크 박스는 설정을 초기화하는 체크박스입니다. 첫 번째 체크박스에만 체크 후 Next 버튼을 클릭합니다.
다음 화면에서 Install 버튼을 클릭하시면 설치가 진행됩니다. 설치 완료 후 Finish 버튼을 클릭하시면 설치가 완료됩니다.
다음으로 간단한 사용법 및 오류 해결 방법에 대해 알려드리도록 하겠습니다
가장 먼저 파일(F) 버튼 클릭 – 가져오기(I) 버튼 클릭을 하시면 오디오, 레이블 등 다양한 형식의 파일을 불러올 수 있습니다.
파일 편집 방법 (자르기, 붙이기) 은 자르고 싶은 부분을 드래그 하시면 구간이 선택되는데요. 구간 선택 후 자르기를 원하시면 가위 버튼(잘라내기)을 클릭, 붙이고 싶으시면 붙여넣기 아이콘을 클릭하시면 됩니다. ^^ 해보시면 아시겠지만 전혀 어렵지않고 누구나 하실 수 있는 수준입니다.
이런식으로 원하는 대로 파일을 편집 후 저장을 해야겠죠? 저장 방법은 파일(F) 버튼 클릭 – 내보내기 버튼 클릭 후 파일이름과 mp3 파일 형식으로 변경 후 저장 버튼을 클릭합니다. 파일 형식은 마음대로 하셔도 되긴 하는데 보통 mp3 파일 형식을 많이 쓰기 때문에 mp3 파일 형식으로 하시는걸 권장합니다.
내보내기를 진행하시다가 아래 사진과 같이 lame_enc.dll파일이 필요하다는 메시지 창이 뜨는 경우가 있는데요. 오른쪽에 다운로드 버튼을 클릭합니다.
다운로드 버튼을 클릭하시면 아래와 같은 페이지로 이동하는데요. 가운데 exe 응용 프로그램을 다운받아 설치하시면 됩니다. 헷갈리시는 분들을 위해 아래에 링크를 첨부해두었으니 참고하시기 바랍니다. 설치화면이 열리면 그냥 다음 버튼만 모두 눌러주시고 마지막에 Finish 버튼만 눌러시면 완료됩니다. 매우 간단합니다.
Lame 설치 완료 후 다시 프로그램으로 이동해서 내보내기 버튼 클릭 – 파일 저장을 하시면 완료됩니다. ^^
여기까지 audacity 완벽정리 및 audacity 사용법 꿀팁 – 오다시티 에 대해 알아보았는데요. 사용법이 매우 간단하고 무료 프로그램이기 때문에 먼저 사용하시다가 어느정도 익숙해지시면 유료 프로그램도 한번 써보시는 것도 좋을 것 같습니다. 저도 현재 그렇게 하고있는데 확실히 처음에 무료 프로그램이 익숙해 진 후에 사용하는게 좋은 것 같더라구요.