우분투 apm 설치
DB CAFE
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
sudo apt update && sudo apt upgrade
1. Apache2 웹서버 설치 1-1. Apache2 웹서버 패키지를 설치합니다.
$ sudo apt install apache2
/etc/apache2/apache2.conf 파일을 수정 <Directory /var/www/>
Options Indexes FollowSymLinks AllowOverride None Require all granted
</Directory>
-- 버추얼 호스트 설정 /etc/apache2/sites-available/www.conf <VirtualHost *:80>
ServerName dm1563420045833.clserver.co.kr DocumentRoot /home/www <Directory /home/www> Options MultiViews AllowOverride All Order allow,deny Allow from all Require all granted </Directory>
</VirtualHost>
해당 conf 파일에 대해서 /etc/apache2/sites-enabled 에 심볼릭 링크를 생성
- cd /etc/apache2/sites-enabled
- ln -s ../sites-available/www.conf .
2.방어벽 프로그램 ufw 설정
-- 방화벽 미사용
sudo ufw enable
-- 방화벽 기본 입/출입 설정 sudo ufw default deny incoming sudo ufw default allow outgoing
-- ssh 허용 sudo ufw allow ssh -- apache 허용 sudo ufw app info "Apache" sudo ufw app info "Apache Secure" sudo ufw app info "Apache Full" sudo ufw allow in "Apache Full"
-- 방화벽 설정 내용 확인 sudo ufw status numbered -- 방화벽 미사용 sudo ufw disable
3.Mysql 설치
MySQL 기본 설치시 리모트에서는 접속 불가.
/etc/mysql/mysql.conf.d/mysqld.conf 파일 수정 (maria-db는 /etc/mysql/mariadb.conf.d/50-server.cnf )
bind-address = 0.0.0.0; # 127.0.0.1 주석 처리 service mysql restart
mysql> grant all privileges on *.* to 'root'@'%' identified by 'Ddskjdksd12#@' with grant option; mysql> flush privileges;
4.php 설치
sudo apt install php php-mysql
$ sudo nano /var/www/html/info.php <?php phpinfo(); ?>
localhost/info.php