Ubuntu Server / 메모

MariaDB / 포트 변경

MariaDB의 기본 접속 포트는 3306입니다. 이를 다른 포트로 변경하고 싶다면 /etc/mysql/mariadb.conf.d/50-server.cnf를 수정합니다.

port = 3306

을 찾아서 원하는 포트로 변경한 후 저장합니다. 그리고 MariaDB를 재시작합니다.

service mysql restart

MariaDB / Can't connect to MySQL server on ... (10061)

다음과 같은 에러를 만났다면...

Can't connect to MySQL server on ... (10061)

/etc/mysql/mariadb.conf.d/50-server.cnf에 있는

bind-address = 127.0.0.1

를 주석처리하거나 삭제한다. 그리고 MariaDB를 재시작한다.

service mysql restart

서비스 목록 출력

모든 서비스 목록 출력

service --status-all

+는 실행 중, -는 실행 중이 아닌 서비스

 [ - ]  acpid
 [ + ]  apache-htcacheclean
 [ + ]  apache2
 [ + ]  apparmor
 [ + ]  apport
 [ + ]  atd
 [ + ]  clamav-daemon
 [ + ]  clamav-freshclam
 [ - ]  console-setup.sh
 [ + ]  cron
 [ - ]  cryptdisks
 [ - ]  cryptdisks-early
 [ + ]  dbus
 [ + ]  ebtables

실행 중인 서비스 목록 출력

service --status-all | grep +

같은 카테고리의 다른 글

Ubuntu / 시간대(time zone) 설정하는 방법

Ubuntu / 시간대(time zone) 설정하는 방법

현재 서버의 시간대 확인 현재 서버에 설정된 시간대는 date 명령어로 확인할 수 있다. root@jb-dev-01:~# date Mon Dec 3 17:03:06 UTC 2018 시간대 설정 방법 1 - dpkg-reconfigure tzdata 시간대를 설정하고 싶다면 다음과 같이 명령한다. dpkg-reconfigure tzdata 한국이라면 Asia를 선택하고 Seoul을 선택합니다. 시간대 설정 방법 2 - tzselect tzselect 명령으로 설정할 수 있다. 번호를 입력하여 시간대를 정한다. root@ubuntu-1804-server:~# tzselect Please identify ...

Ubuntu Server / Apache, PHP, MariaDB 설치하는 방법

Ubuntu Server / Apache, PHP, MariaDB 설치하는 방법

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 계정 비밀번호를 입력하라고 ...

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

우분투 16.04에서 phpMyAdmin을 패키지로 설치했을 때, 기본 설정은 모든 IP에서 접속 가능입니다. 만약 특정 IP에서만 접속 가능하게 하려면 /etc/apache2/conf-available/phpmyadmin.conf에 다음 코드를 추가합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all Allow from xxx.xxx.xxx.xxx </Directory> xxx.xxx.xxx.xxx는 접속하려는 IP로 바꿉니다. 여러 IP를 설정하고 싶을 때는 띄어쓰기로 구분합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all ...

Ubuntu 20.04 / 글꼴 설치하는 방법

Ubuntu 20.04 / 글꼴 설치하는 방법

Ubuntu 20.04 Desktop 설치하려는 글꼴을 더블 클릭하거나, 글꼴 선택 후 엔터키를 누르거나, 마우스 우클릭 후 를 클릭합니다. 상단에 있는 를 클릭합니다. 설치가 완료되면 으로 바뀝니다. 글꼴이 잘 설치되었는지 확인합니다.

Ubuntu 18.04 / 해상도 변경하는 방법

Ubuntu 18.04 / 해상도 변경하는 방법

Ubuntu 18.04 Desktop에서 해상도 변경하는 방법입니다. 바탕화면에서 마우스 우클릭을 합니다. 를 클릭합니다. 왼쪽 메뉴에서 를 클릭합니다. 왼쪽 메뉴에서 를 클릭하고, 오른쪽에서 해상도를 선택합니다. 오른쪽 위의 버튼을 클릭합니다. 를 클릭합니다.

Ubuntu Server / root 계정으로 로그인하는 방법, root 계정으로 ssh 접속하는 방법

Ubuntu Server / root 계정으로 로그인하는 방법, root 계정으로 ssh 접속하는 방법

Ubuntu는 설치할 때 일반 사용자 계정만 만듭니다. 관리자 권한이 필요할 때는 sudo를 이용하죠. 그런데 공부를 위해 혼자만 사용하거나, 여러 가지 이유로 보안에 문제가 없는 경우 root 계정으로 로그인해서 작업하는 게 편합니다. root 계정으로 로그인 하는 방법 일반 사용자 계정으로 로그인합니다. 다음과 같이 명령하여 root 계정의 비밀번호를 만들면 root 계정으로 로그인할 수 있습니다. sudo passwd ...

Ubuntu / Webmin / 설치하는 방법

Ubuntu / Webmin / 설치하는 방법

Webmin은 웹브라우저를 통해 시스템 관리를 하는 툴이다. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a ...

Ubuntu Server / vsftpd로 FTP 서버 구축하기

Ubuntu Server / vsftpd로 FTP 서버 구축하기

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 방화벽을 사용 중이라면 다음과 같이 명령하여 포트를 열어줍니다. ufw ...

Ubuntu Server / Let’s Encrypt 무료 SSL 인증서 발급 받기

Ubuntu Server / Let’s Encrypt 무료 SSL 인증서 발급 받기

Ubuntu Server에서 Apache Web Server를 사용하는 경우 Let’s Encrypt 인증서 발급 받는 방법이다. Apache용 Certbot 설치 Ubuntu Server 20.04, Ubuntu Server 22.04 sudo snap install core sudo snap refresh core snap install --classic certbot ln -s /snap/bin/certbot /usr/bin/certbot Ubuntu Server 18.04 apt install software-properties-common add-apt-repository universe add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install certbot python3-certbot-apache Ubuntu Server 16.04 add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install python-certbot-apache 인증서 ...

Ubuntu Server / 메모

Ubuntu Server / 메모

MariaDB / 포트 변경 MariaDB의 기본 접속 포트는 3306입니다. 이를 다른 포트로 변경하고 싶다면 /etc/mysql/mariadb.conf.d/50-server.cnf를 수정합니다. port = 3306 을 찾아서 원하는 포트로 변경한 후 저장합니다. 그리고 MariaDB를 재시작합니다. service mysql restart MariaDB / Can't connect to MySQL server on ... (10061) 다음과 같은 에러를 만났다면... Can't connect to MySQL server on ... (10061) /etc/mysql/mariadb.conf.d/50-server.cnf에 있는 bind-address = 127.0.0.1 를 ...