집에서 테스트를 위해서 설치한 서버가 있는데, KVM 가상화를 해뒀다. OS 를 설치하기 위해서 virt-manager 를 자주 이용하는데, 노트북에 Mint 리눅스가 있기 때문에 이것을 이용하면 원격 X-Windows 에 접속해 GUI virt-manager 를 실행시킬 수 있다. 그런데, 매번 노트북을 켜서 하기도 귀찮고 그래서 윈도우즈에서 사용가능한 X-Windows 클라이언트를 필요했다. 이에 대해서 이미 NetSarang 에서 만든 XManager, Xming 이란것을 알고 있었다. XManager 는 사용이고, Xming 은 무료이지만 이전에 제대로 안되었던 기억이 있다. 혹시 다른게 있을까 싶어서 찾아보니 VcXsrv 를 알게되었는데 이것을 한번 사용해 보기로 […]
Redmine 컴파일 설치
Redmine 컴파일 설치에 대해서 다룬다. 최신의 OS 를 가지고 하면 좋겠지만, CentOS 7 에서 설치를 진행 했다. Mariadb 설치 MySQL 도 가능하지만, MariaDB 를 선택했다. 컴파일 설치가 가능하지만 패키지 설치로 설치한다.
1 |
]# yum install mariadb-server mariadb-devel -y |
각종 의존성이 함께 설치가 된다. CentOS 7 에서 MariaDB 버전은 5.5 이다. 현재 최선 버전은 10.4 이며 이것을 설치하고자 한다면 MariaDB 홈페이지에 공식 리파지토리를 설정하고 yum 명령어로 간단하게 설치할 수 있다. my.cnf 파일을 다음과 같이 설정해 준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
]# vim /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd character-set-server = utf8 collation-server = utf8_general_ci port = 3306 skip-name-resolve [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d [mysql] default-character-set = utf8 no-auto-rehash show-warnings prompt=\u@\h:\d\_\R:\m:\\s> pager="less -n -i -F -X -E" |
캐릭터 셋을(character-set) 설정하는 부분과 함께 mysql 콘솔에 대한 설정이 전부다. […]
Redmine 설치하기
Redmine 은 오픈소스 프로젝트 매니지먼트 프로그램이다. Ruby 로 제작되었기 때문에 설치 과정에서 Ruby 가 있어야 한다. 웹을 통해서 서비스를 하기 때문에 보통 웹서버와 연동을 하는 편이다. 환경 OS: CentOS 7 Arch: x86_64 Minimal Installation 상태 MariaDB 설치 MySQL 도 가능하지만, MariaDB 를 선택했다. 컴파일 설치가 가능하지만 패키지 설치로 설치한다.
1 |
]# yum install mariadb-server -y |
각종 의존성이 함께 설치가 된다. my.cnf 파일을 다음과 같이 설정해 준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
]# vim /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd character-set-server = utf8 collation-server = utf8_general_ci port = 3306 skip-name-resolve [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d [mysql] default-character-set = utf8 no-auto-rehash show-warnings prompt=\u@\h:\d\_\R:\m:\\s> pager="less -n -i -F -X -E" |
다음과 같이 서버를 실행해 준다.
1 2 |
]# systemctl start mariadb.service ]# systemctl enable mariadb.service |
이제 기본적인 설정을 위해 mysql_secure_installation 을 실행해 준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): <- 그냥 엔터 OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] Y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] Y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] Y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! ]# |
root 패스워드를 설정하기 […]
GitLab 설치와 설정
GitLab 설치 하기. GitLab 은 무료로 사용가능한 git 저장소, ticket 시스템이다. github 의 오픈소스 버전으로 생각할 수 있지만 그것보다 많은 기능을 제공한다. 이 글에서는 gitlab 을 Ubuntu 20.04 LTS 에 설치와 설정에 대해서 알아보도록 하겠다. 준비 Gitlab 을 설치하기 전에 필요한 의존성 패키지들을 먼저 설치해 준다.
1 |
]$ sudo apt install -y ca-certificates curl |
메일을 사용할 경우에는 메일 서버를 설치해줘야 하지만 여기서는 제외한다. Gitlab 설치를 위한 저장소 추가 gitlab 홈페이지에서는 각 리눅스 배포판에 맞춰 스크립트를 제공한다. Ubuntu 20.04 를 위해 제공해주는 스크립트를 실행해 준다.
1 |
]$ sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash |
Gitlab 설치 […]
Oracle Linux 8.2 설치
Oracle 에서 만들어서 배포하는 Oracle Linux 8.2 를 설치해 본다. 현 시점(2020.07) 에서 최신버전은 Oracle Linux 8.2 이다. 다운로드 Oracle Linux 를 설치를 위해 준비된 이미지는 두가지로 전체 패키지를 담은 DVD 이미지와 Boot 이미지를 제공한다. Boot 이미지는 또 일반 커널과 UEK 커널을 가지는 버전으로 제공한다. 어느걸 하던 상관은 없다.
1 2 3 4 5 6 7 8 9 10 11 |
]# wget https://yum.oracle.com/ISOS/OracleLinux/OL8/u2/x86_64/x86_64-boot-uek.iso --2020-07-23 16:53:15-- https://yum.oracle.com/ISOS/OracleLinux/OL8/u2/x86_64/x86_64-boot-uek.iso Resolving yum.oracle.com (yum.oracle.com)... 104.75.8.194 접속 yum.oracle.com (yum.oracle.com)|104.75.8.194|:443... 접속됨. HTTP request sent, awaiting response... 200 OK Length: 682622976 (651M) [application/octet-stream] Saving to: ‘x86_64-boot-uek.iso’ x86_64-boot-uek.iso 100%[===============================================================>] 651.00M 11.7MB/s in 57s 2020-07-23 16:54:13 (11.3 MB/s) - ‘x86_64-boot-uek.iso’ saved [682622976/682622976] |
설치 다운받은 이미지를 USB 나 CD 로 구워서 부팅을 한다. 부팅을 하면 위와 같은 화면이 나온다. 여기서 “Install Oracle Linux 8.2.0” 를 선택해서 설치를 진행한다. 설치는 CentOS 설치 화면과 동일하다. […]
Node 설치하기
Node.js 줄여서 Node 는 브라우저에서 탑재되었던 Javascript 엔진을 독립된 애플리케이션으로 만들어 Javascript 를 이용해 애플리케이션을 작성할 수 있도록 해준다. 준비 모르긴 몰라도 Javascript 만큼이나 다이나믹하고 빠르게 변화를 수용하는 언어를 찾기는 쉽지 않다. 그러다보니 이를 지원하는 Node.js 도 다양한 버전이 존재하게 되는데 이러한 다양한 버전을 관리하기 위한 별도의 툴이 필요하게 되었던 모양이다. Node Version Manager (NVM). Node.js 의 버전을 관리하기 위한 툴로서 이를 이용하면 다양한 버전의 Node.js 를 설치하고 관리할 수 있게 된다. Node.js 설치는 NVM 을 사용해 할 것이다. NVM […]
Python – easy_install, pip 설치하는 방법
Python 에서는 easy_install, pip 를 설치하는 방법중에 하나가 ‘get-pip.py’ 스크립트를 이용하는 것인데, 다음과 같다.
1 2 |
]# wget https://bootstrap.pypa.io/get-pip.py ]# python3 get-pip.py |
wget, curl 과 같은 프로그램을 이용할 수 없을 경우에 python 프로그램을 이용할 수도 있다. python3 의 경우에는 다음과 같다.
1 |
]$ python3 -c "import urllib.request; exec(urllib.request.urlopen('https://bootstrap.pypa.io/get-pip.py').read())" [--user] |
python2 의 경우에는 다음과 같다.
1 |
]$ python -c "import urllib2; exec(urllib2.urlopen('https://bootstrap.pypa.io/get-pip.py').read())" [--user] |
한줄짜리 python 프로그램으로 get-pip.py 를 다운받고 설치를 해준다. ‘–user’ 는 사용자 홈 디렉토리를 설치 디렉토리로 삼게 한다.
Trac 설치 및 실행
현재(2018년)에 Trac 을 설치해서 사용하는 사람이 있을지 모르겠지만, 개인적으로 뭔가를 할때 제일 좋은 툴은 것 같다. 그런데, Trac 설치는 가끔 하는거라 할때마다 헤메곤 하는데 기록해두기 위해서 이 글을 작성한다. Python 2.7 Trac 은 현재 Python 2.7 에서 잘 작동한다. Python 2.7 이 설치되어 있어야 한다. 현 시점에서 CentOS 7, Ubuntu 16.04 LTS 에서 기본으로 Python 2.7 이 설치되어 있어 별도로 Python 2.7 을 설치할 필요는 없다. pip, setuptools 설치 Trac 뿐만 아니라 Python 의 라이브러리를 설치하기 위해서 pip 를 이용한다. […]
PHP7 설치하기
이 문서는 php7.2 설치 문서 입니다. 1. 준비 CentOS 가 최소설치되었다고 가정하고 시작했기 때문에 컴파일 환경을 구축해야 합니다.
1 2 3 |
yum update -y reboot yum install gcc.x86_64 gcc-c++.x86_64 wget.x86_64 bzip2-devel.x86_64 pkgconfig.x86_64 openssl-devel.x86_64 make.x86_64 man.x86_64 nasm.x86_64 gmp.x86_64 gmp-devel.x86_64 curl-devel.x86_64 libicu-devel.x86_64 libsodium-devel.x86_64 gdbm-devel.x86_64 readline-devel.x86_64 compat-readline43.x86_64 ncurses-devel.x86_64 db4-devel.x86_64 automake* autoconf* -y |
Ubuntu16.04 의 경우에는 다음과 같은 프로그램이 설치되어 있어야 합니다.
1 2 3 4 5 |
apt clean all apt update apt install build-essential libsystemd-dev pkg-config libxml2-dev libssl-dev libbz2-dev \ libcurl3 libcurl4-openssl-dev libsodium-dev libjpeg9-dev libpng-dev \ libfreetype6-dev libxpm-dev libgmp10-dev libxslt1-dev |
2.Download and Unpack 최신버전을 다운로드 받아야 합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
]# wget http://jp2.php.net/get/php-7.2.1.tar.bz2/from/this/mirror --2018-01-07 00:17:28-- http://jp2.php.net/get/php-7.2.1.tar.bz2/from/this/mirror Resolving jp2.php.net... 49.212.134.217 Connecting to jp2.php.net|49.212.134.217|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://jp2.php.net/distributions/php-7.2.1.tar.bz2 [following] --2018-01-07 00:17:29-- http://jp2.php.net/distributions/php-7.2.1.tar.bz2 Connecting to jp2.php.net|49.212.134.217|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 14980278 (14M) [application/octet-stream] Saving to: `mirror' 100%[===================================================================================>] 14,980,278 6.55M/s in 2.2s 2018-01-07 00:17:31 (6.55 MB/s) - `mirror' saved [14980278/14980278] ]# tar xvjf mirror |
3. Configure and Compile 이제 PHP에서 사용할 기능들을 결정해야 합니다. PHP에서 제공하는 기능은 아주 많지만 여기서는 다음과 같은 기능들을 사용할 것입니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
../configure --prefix=/opt/php-7.2.1 \ --with-config-file-path=/opt/php-7.2.1/etc \ --with-config-file-scan-dir=/opt/php-7.2.1/etc/conf.d \ --with-libdir=lib64 \ --enable-fpm \ --with-fpm-systemd \ --enable-sockets \ --with-gettext \ --with-mhash \ --with-gmp \ --with-gd \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-zlib-dir=/usr \ --with-freetype-dir=/usr \ --enable-bcmath \ --enable-exif \ --with-zlib \ --with-bz2 \ --enable-calendar \ --enable-mbstring \ --with-mhash \ --enable-intl \ --with-xsl \ --with-sodium \ --with-libxml-dir=/usr \ --with-curl \ --disable-debug \ --with-openssl \ --enable-mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --enable-inline-optimization \ --enable-sysvmsg \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-pcntl \ --enable-mbregex \ --with-mhash \ --enable-zip \ --with-pcre-regex |
아무런 에러없이 끝났다면 다음과 같이 컴파일을 해주고 설치해준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
]# make ]# make install Installing shared extensions: /opt/php-7.2.1/lib/php/extensions/no-debug-non-zts-20170718/ Installing PHP CLI binary: /opt/php-7.2.1/bin/ Installing PHP CLI man page: /opt/php-7.2.1/php/man/man1/ Installing PHP FPM binary: /opt/php-7.2.1/sbin/ Installing PHP FPM defconfig: /opt/php-7.2.1/etc/ Installing PHP FPM man page: /opt/php-7.2.1/php/man/man8/ Installing PHP FPM status page: /opt/php-7.2.1/php/php/fpm/ Installing phpdbg binary: /opt/php-7.2.1/bin/ Installing phpdbg man page: /opt/php-7.2.1/php/man/man1/ Installing PHP CGI binary: /opt/php-7.2.1/bin/ Installing PHP CGI man page: /opt/php-7.2.1/php/man/man1/ Installing build environment: /opt/php-7.2.1/lib/php/build/ Installing header files: /opt/php-7.2.1/include/php/ Installing helper programs: /opt/php-7.2.1/bin/ program: phpize program: php-config Installing man pages: /opt/php-7.2.1/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /opt/php-7.2.1/lib/php/ [PEAR] Archive_Tar - installed: 1.4.3 [PEAR] Console_Getopt - installed: 1.4.1 [PEAR] Structures_Graph- installed: 1.1.1 [PEAR] XML_Util - installed: 1.4.2 [PEAR] PEAR - installed: 1.10.5 Wrote PEAR system config file at: /opt/php-7.2.1/etc/pear.conf You may want to add: /opt/php-7.2.1/lib/php to your php.ini include_path /root/php-7.2.1/build/shtool install -c ext/phar/phar.phar /opt/php-7.2.1/bin ln -s -f phar.phar /opt/php-7.2.1/bin/phar Installing PDO headers: /opt/php-7.2.1/include/php/ext/pdo/ |
4. Configure to the installed php7 config-file-scan 디렉토리를 생성해 준다.
1 |
]# mkdir /opt/php-7.2.1/etc/conf.d |
[…]