# apt install openjdk-11-jdk

# java -version

# apt install tomcat9

# vi /var/lib/tomcat9/conf/server.xml

 

vi /lib/systemd/system/tomcat9.service

JAVA_OPTS -Duser.timezone=GMT+9 추가한다.

 

server.xml 

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>

을 아래 같이 변경

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxPostSize="-1"/>

maxPostSize="-1" 이 옵션은 파일 업로드 할때 용량 제한 풀기 위한것.

그래봐야 1G밖에 안된다.

 

/var/lib/tomcat9/webapps/

밑에 war파일 올리면

Posted by jtfafa
,

기본으로 설치하면 버젼이 낮아 설정하기 어려으므로 최신버젼으로 설치해야 한다.

 

# apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring

# gpg --dry-run --quiet --import --import-options import-show /etc/apt/keyrings/nginx-archive-keyring.gpg

# echo "deb [signed-by=/etc/apt/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx"  | sudo tee /etc/apt/sources.list.d/nginx.list

# apt update

# apt install nginx

 

Posted by jtfafa
,

# apt install mariadb-server mariadb-client -y

 

# mysql_secure_installation

 

# echo "" >> /etc/mysql/mariadb.cnf

# echo "[mysqld]" >> /etc/mysql/mariadb.cnf

# echo "max_allowed_packet = 1G" >> /etc/mysql/mariadb.cnf

# echo "" >> /etc/mysql/mariadb.cnf

# echo "[mysqldump]" >> /etc/mysql/mariadb.cnf

# echo "quick" >> /etc/mysql/mariadb.cnf

# echo "max_allowed_packet = 2G" >> /etc/mysql/mariadb.cnf


MariaDB [(none)]> create database board;
MariaDB [(none)]> create user board identified by 'board';
MariaDB [(none)]> grant all privileges on board.* to board;
MariaDB [(none)]> grant process on *.* TO board;
MariaDB [(none)]> flush privileges;

MariaDB [(none)]> show grants for board;

 

백업

# mysqldump -u board -p board --hex-blob > yyyymmdd.sql

--hex-blob 옵션은 Blob타입까지 안전하게 백업받기 위한 것.

 

복구
# mysql -u board -p board < yyyymmdd.sql

#### mysql에서 덤프받은 경우
sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_general_ci/g' board20230227.sql

Posted by jtfafa
,

snap list
snap remove --purge snap-store
snap remove --purge gtk-common-themes
snap remove --purge gnome-3-38-2004
snap remove --purge core20 
snap remove --purge bare

apt autoremove --purge snapd

apt-mark hold snapd

sudo apt install gnome-software gnome-software-plugin-flatpak

 

Posted by jtfafa
,

그놈기능개선 소프트웨어 설치 안하고 명령어로 설정할 때 사용

 

gsettings set org.gnome.mutter center-new-windows true

Posted by jtfafa
,

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
echo eval "$(pyenv init --path)" >> ~/.bashrc
source ~/.bashrc
echo eval "$(pyenv init -)" >> ~/.bashrc
source ~/.bashrc
exec "$SHELL"
sudo apt update 
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev
pyenv install 3.10.5
pyenv rehash
pyenv global 3.10.5

Posted by jtfafa
,

sudo apt install nemo
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings get org.nemo.desktop show-desktop-icons
gsettings set org.gnome.desktop.background show-desktop-icons false

 

기존 파일관리자 삭제해도 무관

sudo apt purge -y nautilus

Posted by jtfafa
,

sudo apt install ffmpegthumbnailer

Posted by jtfafa
,

sudo add-apt-repository ppa:trebelnik-stefina/grub-customizer
sudo apt update
sudo apt install -y grub-customizer

Posted by jtfafa
,

use admin
db.createUser({user: "jtfafa" , pwd: passwordPrompt() , roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})

user board
db.createUser({user: "board" , pwd: passwordPrompt() , roles: ["dbAdmin", "readWrite"]})

Posted by jtfafa
,