๐ปTech162 [๋ฆฌ๋ ์ค] ulimit ์ค์ ํ์ฌ ์ฑ๋ฅ ์ ํ ํด์ open file๊ณผ process ์์ฑ ์ ํ ๊ด๋ จ ์์ธ ๋ฐ์์ ๋ฐฉ์งํ๊ธฐ ์ํด ์ค์ ํด์ค๋๋ค. โพ limit values ์์ vi /etc/security/limits.conf ------------------------------ * - nofile 65536 * - nproc 65536 ------------------------------ (- : soft, hard ๋์ผํ๊ฒ ์ ์ฉ) โพ ulimit ์กฐํ ๋ช ๋ น์ด ulimit -a ----------------------------------------- open files (-n) 65536 max user processes (-u) 65536 2023. 8. 21. [๋ฆฌ๋ ์ค] ssh ํจ์ค์๋ ์ ๋ ฅ์์ด ์ ์ (passwordless) ๋ฆฌ๋ ์ค์์ ํจ์ค์๋ ์ ๋ ฅ ์์ด ssh ์ ์ํ๋ 2๊ฐ์ง ๋ฐฉ๋ฒ ์ ๋ฆฌํฉ๋๋ค. 1. ํจ์ค์๋ ์ ๋ ฅ ์์ด ์ ์ํ ์๋ฒ์ ์ํธํ ํค๋ฅผ ๋ฑ๋กํ์ฌ ์๋๋ก๊ทธ์ธ์ ํฉ๋๋ค. โพ rsa ํค ์์ฑ์ด ์๋์์ ๊ฒฝ์ฐ ์์ฑํด ์ค๋๋ค. ssh-keygen -t rsa Enter file in which to save the key (/home/hadoop/.ssh/id_rsa): ## ()๊ดํธ ์์น๋ก ์ฌ์ฉํ ๊ฑฐ๋ฉด Enter Enter passphrase (empty for no passphrase): ## ํจ์ค์๋ ์์ด ์ฌ์ฉํ ๊ฑฐ๋ฉด Enter Enter same passphrase again: ## Enter โพ authorized_keys ํ์ผ์ด ์์ผ๋ฉด ์์ฑํ๋ฉด ๋ฉ๋๋ค. chmod 700 ~/.ssh ## 700์ผ๋ก ๊ถํ ๋ณ๊ฒฝ cd.. 2023. 8. 21. MySQL, MariaDB ํ๊ธ ๊นจ์ง ํ์ ํด๊ฒฐ(Hive Metastore) Hive์์ desc๋ก ํ ์ด๋ธ ์กฐํ ์ ํ๊ธ comment๊ฐ ๊นจ์ง๋ ๊ฒฝ์ฐ๊ฐ ์๋๋ฐ, metastore DB ํ๊ธ ์ค์ ์ด ์ ๋ผ์ ๊ทธ๋ ์ต๋๋ค. ์๋ ์กฐ์น ๋ฐฉ๋ฒ์ ๋๋ค. MySQL 1. my.cnf ์์ my.cnf ํ์ผ ์ด์ด์ ์๋๋ด์ฉ์์ ์๋๊ฒ๋ค์ ์ถ๊ฐํด ์ฃผ์ธ์. [root@localhost]$ vi /etc/my.cnf ---------------------------------------------------------- [client] character-sets-dir = utf8 [mysqld] init_connect=SET collation_connection = utf8_general_ci init_connect=SET NAMES utf8 character-set-server = utf8 col.. 2023. 8. 21. [Hive,Impala] sqlํ์ผ ์คํํ ๋ ๋ณ์ ๋๊ธฐ๋ ๋ฐฉ๋ฒ โพ Hive hive 3.0๋ถํฐ๋ hiveconf ์ฌ์ฉ์ด ์ ๋ผ์ hivevar๋ฅผ ์ฌ์ฉํฉ๋๋ค. -hivevar ์ฌ์ฉ hive --hivevar dt=20190923 -f hive.sql -hive.sql ํ์ผ ๋ด์์ ๋ณ์ ๋ฐ๋ ๋ฐฉ๋ฒ (ํํฐ์ ์์ฑ ์์ ) ALTER TABLE dbnm.tblnm ADD PARTITION(dt='${hivevar:dt}'); โพ Impala impala-shell -k --var="dt=20230821" -f impala.sql 2023. 8. 21. [NiFi] FlowFile "Details" ๊ฐ attribute ์ถ์ถ ๋ฐฉ๋ฒ Details ํญ์์ Filename, File Size ๋ผ๋ ๊ฐ์ attribute๋ก ์ถ์ถํ๋ ๋ฐฉ๋ฒ์ ๋๋ค. UdateAttribute ํ๋ก์ธ์๋ฅผ ์์ฑํ๊ณ ์๋์ ๊ฐ์ด ์ค์ ํด์ฃผ๋ฉด ํด๋น ๊ฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค. ์์ฑ์ด๋ฆ: my_file_name ์์ฑ๊ฐ: ${filename} ์์ฑ์ด๋ฆ: my_file_size ์์ฑ๊ฐ: ${fileSize} 2023. 4. 21. [๋ฆฌ๋ ์ค] JupyterHub ์ค์น ๋ฐฉ๋ฒ ๋ฆฌ๋ ์ค ํ๊ฒฝ (CentOS 7, Python3.8)์์ JupyterHub ์ค์น ๋ฐฉ๋ฒ ๊ณต์ ํฉ๋๋ค. ์ค์น ์ Jupyter ์ฉ์ด ๊ด๋ จํ์ฌ ๊ฐ๋ตํ๊ฒ ์ ๋ฆฌ ํ๊ฒ ์ต๋๋ค. Jupyter Notebook ๋ํํ Python Interpreter๋ก ์น ํ๊ฒฝ์์ Python ์ฝ๋ ์์ฑ ๋ฐ ์คํํ๋ ๊ฐ๋ฐ ํ๊ฒฝ(tool) Jupyter Lab Jupyter Notebook์ ์ฐจ์ธ๋ ๋ฒ์ ์ผ๋ก ์ฌ์ฉ์ ํธ์ ๊ธฐ๋ฅ๋ค์ด ์ถ๊ฐ๋จ ๋ค์ค์ฐฝ ์ง์, csv/pdf ๋ฑ ํ์ผ๋ ์ด ์ ์์ด์ ๋์๋ณด๋์ฒ๋ผ ์ฌ์ฉ ๊ฐ๋ฅ JupyterHub ๋ฉํฐ ์ฌ์ฉ์ ํ๊ฒฝ์์ Jupyter Notebook/Lab์ ์ฌ์ฉ ๐ ์ค์น ๋ฐฉ๋ฒ 1. os ํจํค์ง ์ค์น yum install –y nodejs yum install openssl 2. nodejs ํจํค์ง ์ค์น โพ.. 2023. 4. 13. [python] pysqlite3 ์ค์น ์ค๋ฅ ํด๊ฒฐ ๐ซ ERROR src/connection.h:34:21: fatal error: sqlite3.h: No such file or directory #include "sqlite3.h" compilation terminated. error: command 'gcc' failed with exit status 1 ๐ก SOLVED $ yum install -y libsqlite3x-devel $ pip3 install pysqlite3 2023. 4. 12. [python] sasl ์ค์น ์ค๋ฅ ํด๊ฒฐ sasl ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น ๊ณผ์ ์์ ์๋์ ๊ฐ์ ์ค๋ฅ ํด๊ฒฐ ๋ฐฉ๋ฒ๋ค์ ๋๋ค. ๋ฆฌ๋ ์ค ํจํค์ง ์ค์น๊ฐ ํ์ํ๋ค์. ๊ฒฐ๊ณผ์ ์ผ๋ก ์๋ ๋ช ๋ น์ด ์ํํ์ฌ ํจํค์ง ์ค์นํด์ฃผ๋ฉด ๋ฉ๋๋ค. ๐ซ ERROR gcc: error trying to exec 'cc1plus': execvp: No such file or directory sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory ๐ก SOLVED $ yum install -y gcc-c++ cyrus-sasl-devel $ pip3 install sasl 2023. 3. 22. ์ด์ 1 2 3 4 5 6 ยทยทยท 21 ๋ค์