본문 바로가기

반응형

Server/Ubuntu

(15)
[Ubuntu] Apache2 가상 호스트(서브도메인) 생성 스크립트. Apache 가상 호스트를 사용하여 Ubuntu에서 하위 도메인을 만드는 스크립트입니다. #!/bin/bash # Check if Apache is installed if [ ! -f /usr/sbin/apache2 ]; then echo "Apache is not installed. Please install Apache and try again." exit 1 fi # Get the subdomain name echo -n "Enter the subdomain name (e.g. subdomain.example.com): " read subdomain # Check if the subdomain is valid if [ -z "$subdomain" ]; then echo "Invalid subdoma..
[Ubuntu] 사용자 생성 / ssh접속권한 / ftp권한부여 스크립트 Ubuntu에서 새 사용자를 만들고 SSH 액세스 권한을 설정하고 FTP 액세스 권한을 설정하는 스크립트입니다. #!/bin/bash # Create a new user useradd -m -s /bin/bash -G sudo USERNAME # Set the password for the new user echo "USERNAME:PASSWORD" | chpasswd # Set SSH access rights mkdir /home/USERNAME/.ssh touch /home/USERNAME/.ssh/authorized_keys chmod 700 /home/USERNAME/.ssh chmod 600 /home/USERNAME/.ssh/authorized_keys chown -R USERNAME:USER..
MySQL Replication 설정 (Master Slave) 시스템 환경 (Master / Slave) OS : Ubuntu 20.10 x64 mysql : 5.7.33 IP : Master(167.179.93.128), Slave(167.179.71.47) MySQL Replication Master 설정 my.cnf수정 root@masterDB:~# sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf 마스터서버 설정에서 제일 중요한 부분 server-id는 server-id = 1 log-bin=mysql-bin [mysqld] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock datadir = /var/lib/mysql log-error = /va..
Ubuntu 20 + Apache2 + Tomcat + JAVA11 설정 우선 우분투 업데이트 확인 sudo apt update ubuntu@tokyoaj:~$ sudo apt update 아파치 설치 sudo apt-get install -y apache2 ubuntu@tokyoaj:~$ sudo apt-get install -y apache2 자버설치 sudo apt install -y openjdk-11-jre-headless ubuntu@tokyoaj:~$ java Command 'java' not found, but can be installed with: sudo apt install openjdk-11-jre-headless # version 11.0.11+9-0ubuntu2~20.04, or sudo apt install default-jre # version ..
MySQL 5.7.33 계정생성 / 스키마생성 시스템환경 OS : Ubuntu 20.10 x64 mysql : 5.7.33 1. mysql -u root -p 명령어로 MySQL에 접속합니다. root@vultr:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.33 MySQL Community Server (GPL) Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliat..
Ubuntu 20.10 x64 + MySQL 5.7.33 외부접속 설정 1. 관리자 권한으로 mysqld.cnf를 수정합니다. root@vultr:~# sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf 2. bind-address = 0.0.0.0으로 변경합니다. [mysqld] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock datadir = /var/lib/mysql log-error = /var/log/mysql/error.log # By default we only accept connections from localhost bind-address = 0.0.0.0 # Disabling symbolic-links is recommended to prev..
Ubuntu 20.10 x64 + MySQL 5.7.33 MySQL을 설치하고 업데이트하는데 필요한 레포지토리 설정을 위한 패키기를 다운로드합니다. 파일 관리를 위해 폴더 생성 생략해도 상관없습니다. ^.^ root@masterDB:~# pwd /root root@masterDB:~# mkdir down root@masterDB:~# ls down snap root@masterDB:~# cd down root@masterDB:~/down# pwd /root/down 1. 다운로드 sudo wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb root@masterDB:~/down# sudo wget wget https://dev.mysql.com/get/mysql-apt-config_0.8...

반응형