Ubuntu PHP7.3 에서 PHP7.4 으로 안전하게 업그레이드 하기
1. repository 최신데이타 받기 2.설치전 업데이트 3.php7.4 설치 4.php7.4 util 설치 5.php 새번전 등록 6.php7.3 비활성화 7.php7.4 활성화 8.apache2 restart 9.버전 확인
1. repository 최신데이타 받기 2.설치전 업데이트 3.php7.4 설치 4.php7.4 util 설치 5.php 새번전 등록 6.php7.3 비활성화 7.php7.4 활성화 8.apache2 restart 9.버전 확인
Ubuntu ftp 디렉토리 / 접속계정 세팅 1.디렉토리 생성 2.계정 추가 3.계정 비번 새로 변경 4.계정 생성 확인 5.디렉토리 계정 권한으로 세팅 6.기타 설정 Ubuntu SSL 7.SSL 설치 일반 FTP 는 암호화가 되지 않은 패킷이 오가는 등의 보안 문제가 있으니vsftpd 의 SFTP + SSL/TLS 로 서비스를 구성해 봅니다. 아래 설치 없이 기존 설치되어 있는 SSL/TLS 를… Read More »
samba 설치된 컴에 mount 연결 하기 명령어로 네트워크 컴퓨터 조사
1. 파일 열기 닫기 파일열기 : vi info.php 파일 저장하고 닫기 (esc 버튼) : qw! 저장없이 닫기 (esc 버튼) : q! 2. 파일 편집 (esc 버튼) 입력/수정 모드 진입 : i 또는 a 단어 삭제 : dw 실행 취소 : u 한줄 삭제 : dd 복사 : yy 붙여넣기 : p 3. 위치이동 (esc 버튼) 파일 맨… Read More »
Ubuntu 20.04.1 로 업데이이트 다음 명령어 단계에서 진행 되지 않으면 업데이트 후 진행 합니다.
1 2 3 |
do-release-upgrade |
1 2 3 4 |
Checking for a new Ubuntu release Please install all available updates for your release before upgrading. |
Ubuntu 20.04.1
1 2 3 |
sudo apt-get update |
1 2 3 |
sudo apt-get upgrade -y |
1 2 3 |
sudo apt-get dist-upgrade |
1 2 3 |
sudo do-release-upgrade |
Y 로 할 경우 SSH 1022 포트를 추가 하라고 나옵니다. 방화벽에 추가한 다음 진행. 완료 후 재부팅이 버전 Ubuntu 20.04.1 을 확인할 수 있다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-48-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Tue 06 Oct 2020 01:20:49 PM KST System load: 0.31 Processes: 179 Usage of /: 56.5% of 25.27GB Users logged in: 0 Memory usage: 64% IPv4 address for eth0: 111.222.222.222 Swap usage: 0% 0 updates can be installed immediately. 0 of these updates are security updates |
비고> Continue N 으로 할 경우 아래와… Read More »
sudo apt update sudo apt install mysql-server sudo mysql_secure_installation
1 2 3 4 5 |
sudo apt update sudo apt install mysql-server sudo mysql_secure_installation |
sudo 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 62 63 64 65 66 67 68 |
root@localhost:/etc/apache2# sudo mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin? Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 50 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL 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? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : n ... skipping. By default, MySQL 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? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : n ... skipping. All done! |
Check authentication method for MySQL users
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 |
root@localhost:/etc/apache2# sudo mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> SELECT user,host,authentication_string,plugin,host FROM mysql.user; +------------------+-----------+-------------------------------------------+-----------------------+-----------+ | user | host | authentication_string | plugin | host | +------------------+-----------+-------------------------------------------+-----------------------+-----------+ | root | localhost | | auth_socket | localhost | | mysql.session | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | mysql.sys | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | debian-sys-maint | localhost | *C93D3360F51BE0E6E42E58C4D7F4853973596949 | mysql_native_password | localhost | +------------------+-----------+-------------------------------------------+-----------------------+-----------+ 4 rows in set (0.00 sec) mysql> mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'StrongPassword'; Query OK, 0 rows affected (0.00 sec) mysql> SELECT user,authentication_string,plugin,host FROM mysql.user; +------------------+-------------------------------------------+-----------------------+-----------+ | user | authentication_string | plugin | host | +------------------+-------------------------------------------+-----------------------+-----------+ | root | *E57EB53ADCB799E5C107333FBBF5429597A509AC | mysql_native_password | % | | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | debian-sys-maint | *C93D3360F51BE0E6E42E58C4D7F4853973596949 | mysql_native_password | localhost | +------------------+-------------------------------------------+-----------------------+-----------+ 4 rows in set (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) |
#주석처리 #bind-address=127.0.0.0 vi /etc/mysql/mysql.conf.d/mysqld.cnf
1 2 3 |
#bind-address = 127.0.0.1 |
ufw allow 연결 설정 Or IPtable Port open
1 2 3 |
ufw allow from myIP(111.222.333.222) to any port 3306 |
1 2 3 |
iptables -A INPUT -p tcp -s myIP(111.222.333.222) --dport 3306 -j ACCEPT |
Mysql WorkBench
간단하게 현재 사용중인 우분투의 버전을 확인 lsb_release -a
1 2 3 4 5 6 7 8 |
root@localhost:/etc/apache2# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic |
cat /etc/*release
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
root@localhost:/etc/apache2# cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.1 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic |
설치된 리눅스(우분투)가 32비트인지 64비트인지 확인 uname -m
1 2 3 4 |
root@locahost:/etc/apache2# uname -m x86_64 |
apache 가 정상적으로 응답하지 않는 현상도 발생
1 2 3 4 5 6 7 |
::1 - - [26/Mar/2020:16:10:30 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:31 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:32 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:33 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:35 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" |
해결책 : /etc/apache2/apache2.conf
1 2 3 4 5 |
SetEnvIf Remote_Addr "::1" loopback SetEnvIf Remote_Addr "127\.0\.0\.1" loopback CustomLog ${APACHE_LOG_DIR}/access_log combined env=!loopback |
참조 : https://cwiki.apache.org/confluence/display/HTTPD/InternalDummyConnection https://allthatlinux.com/dokuwiki/doku.php?id=access_log%EC%97%90_options_http_1.0_%EA%B0%80_%EA%B8%B0%EB%A1%9D%EB%90%98%EB%8A%94_%EC%9D%B4%EC%9C%A0
1 2 3 |
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/by-hash/SHA256/86d06dec5cec67943ee6e7c12ecb473588920e74747b6126d12fbf679ccfb18a Hash Sum mismatch |
1 2 3 4 |
sudo rm -rf /var/lib/apt/lists/* sudo apt-get update |
참조 : https://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error
[wp-svg-icons icon=”pencil” wrap=”i”] Register Microsoft key and feed
1 2 3 4 |
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb |
[wp-svg-icons icon=”arrow-right” wrap=”i”]Install the .NET SDK
1 2 3 |
sudo add-apt-repository universe |
1 2 3 |
'universe' distribution component is already enabled for all sources. |
[wp-svg-icons icon=”pushpin” wrap=”i”]위 에러시
1 2 3 4 5 |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" 안되면 sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" |
계속진행
1 2 3 4 5 6 |
sudo apt-get update sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install dotnet-sdk-3.0 |
[wp-svg-icons icon=”tv” wrap=”i”]Hello World
1 2 3 4 5 6 7 |
cd /var/www dotnet new console -o HelloWorld cd HelloWorld dotnet run => Hello World! |
1 2 3 4 5 6 7 |
# 제거 # 3.0 sudo apt-get remove dotnet-sdk-3.0 #2.3 sudo apt-get remove dotnet-sdk-2.2 |