네트워크 설정 파일은 /etc/network/interfaces이다.
우분투를 DHCP로 설치했다면 설정 파일의 내용은 다음과 비슷하게 되어 있다.
# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp
이를 다음처럼 변경하고 저장한다. xxx.xxx.xxx.xxx는 네트워크 환경에 맞게 수정한다.
# The primary network interface
auto enp0s3
iface enp0s3 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
dns-nameservers xxx.xxx.xxx.xxx
다음과 같이 명령하여 네트워크를 재시작한다.
systemctl restart networking.service
만약 위와 같이 해도 ...
우분투 14.04에 LESS를 설치하는 방법을 메모합니다.
Node.js 설치
apt-get install nodejs
NPM 설치
apt-get install npm
LESS 설치
npm install -g less less-plugin-clean-css
/usr/local/bin/lessc 파일 첫 줄에 다음과 같은 코드가 있습니다.
#!/usr/bin/env node
다음처럼 바꿉니다.
#!/usr/bin/env nodejs
PHP 설정은 php.ini에서 한다. Ubuntu 16.04에서 php.ini의 위치는
/etc/php/7.0/apache2/php.ini
이다. PHP 버전에 따라 7.0은 다른 숫자일 수 있다.
메모리를 늘리기 위해 수정해야 할 것은 memory_limit이다. 기본값은 128M이다. 128을 적절히 변경한다.
memory_limit = 128M
변경한 설정이 적용되도록 하려면 웹서버를 다시 시작하거나 다시 로드한다.
Apache 웹서버라면 다음과 같이 명령하여 다시 시작할 수 있고,
# service apache2 restart
다음과 같이 ...
Ubuntu 새 버전이 나오면 어떻게 업그레이드를 할까? 새로 설치하고 다시 설정하는 게 제일 좋지만, 설정할 게 많다면 바로 업그레이드를 할 수도 있다.
업그레이드는 do-release-upgrade 명령어로 한다.
do-release-upgrade -h
Usage: do-release-upgrade
Options:
-h, --help show this help message and exit
-V, ...
네트워크 설정 파일은 /etc/netplan 디렉토리 안에 있는 yaml 파일이다.
DHCP로 설치했다면, 설정 파일 내용은 다음과 비슷하게 되어 있다.
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s3:
dhcp4: true
version: 2
다음과 같이 수정하고 저장한다. IP 등은 네트워크 환경에 맞게 적절히 ...
우분투(Ubuntu)는 여러 작업의 내용을 로그(Log) 파일로 남깁니다. 예를 들어 웹서버 운영과 관련된 로그는 /var/log/apache2에 있습니다.
로그는 기본적으로 하나의 파일에 계속 추가하는 것이어서, 시간이 지날수록 파일의 크기가 커집니다. 로그 파일의 크기가 너무 커지면, 시스템이 느려지거나 다운되기도 합니다.
이러한 문제를 해결해주는 패키지가 logrotate입니다. 로그 파일이 일정 기준을 충족하면 기존 로그 파일을 다른 이름으로 변경하여 저장하고 ...
vsftpd
vsftpd(Very Secure FTP Daemon)는 유닉스와 리눅스에서 사용할 수 있는 가벼운 FTP 서버입니다. 주요 특징은 다음과 같습니다.
Virtual IP configurations
Virtual users
Standalone or inetd operation
Powerful per-user configurability
Bandwidth throttling
Per-source-IP configurability
Per-source-IP limits
IPv6
Encryption support through SSL integration
설치
vsftpd는 우분투 패키지에 포함되어 있으므로 다음과 같이 명령하여 설치할 수 있습니다.
# apt install vsftpd
방화벽을 사용 중이라면 다음과 같이 명령하여 포트를 ...
Ubuntu Server에 웹서버 Apache, 웹프로그래밍 언어 PHP, 데이터베이스 MariaDB를 설치하는 방법입니다. 웹서버 운영을 위한 최소한의 설치로, 실제로 서비스할 때는 더 많은 패키지가 필요할 수 있습니다.
설치
Apache, PHP, MariaDB를 설치합니다. php-mysql은 PHP와 MariaDB 연동을 위한 패키지입니다.
# apt install apache2 mariadb-server php php-mysql
MariaDB 설정
다음과 같이 명령하여 몇 가지 설정을 합니다.
# mysql_secure_installation
MariaDB의 root 계정 ...
네트워크 설정 파일은 /etc/netplan 디렉토리 안에 있는 yaml 파일이다.
# ll /etc/netplan
total 12
drwxr-xr-x 2 root root 4096 Apr 27 23:00 ./
drwxr-xr-x 108 root root 4096 Apr 27 23:06 ../
-rw------- 1 root root 389 Apr 27 23:00 50-cloud-init.yaml
DHCP라면 설정 파일이 다음과 비슷하게 되어 있다.
# This file is ...