설치환경
OS : Ubuntu 18.04 LTS 64bit
system package 설치
sudo apt-get install apache2 mysql-server php php-mysql libapache2-mod-php php-xml php-mbstring
# Media Wiki 설치파일 다운
cd /tmp # 다운폴더이동
wget https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz #파일다운
# 압축풀기 & 이동
tar -xvzf /tmp/mediawiki-*.tar.gz
sudo mkdir /var/lib/mediawiki
sudo mv mediawiki-*/* /var/lib/mediawiki
tar -xvzf /tmp/mediawiki-*.tar.gz
sudo mkdir /var/lib/mediawiki
sudo mv mediawiki-*/* /var/lib/mediawiki
$ sudo mysql -u root -p
> Enter password: [root password]
$ sudo mysql -u root -p
Enter password: [root password]
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.28-0ubuntu0.18.04.4 (Ubuntu)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates.
Other names may be trademarks of their respectiveowners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
# User & Database 생성
mysql> CREATE USER '[User_name]'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED'
mysql> quit
$ sudo mysql -u root # mysql 로그인
$ mysql > CREATE DATABASE [DB_name] # DB생성
$ mysql > use sa2z # DB선택
$ sudo mysql -u root # mysql 로그인
$ mysql > CREATE DATABASE [DB_name] # DB생성
$ mysql > use [DB_name] # DB선택
# 권한부여
mysql> GRANT ALL ON [DB_name].* TO '[User_name]'@'localhost';
Query OK, 0 rows affected (0.01 sec)
mysql>quit;