---
# System prepended metadata

title: Configuring the System
tags: [article, ' domjudge']

---

---
title: Configuring the System
tags: article, domjudge
---

# Configuring the System


### MySQL
```
sudo vim /etc/mysql/my.cnf
```
於最下面加上以下內容(此設定需依照題目要求而做更改)：
> [mysql]
> max_connections = 1000
> max_allowed_packet = 20MB
> innodb_log_file_size = 90MB

```
sudo /etc/init.d/mysql restart
```

---

### PHP
(替換php版本為實際安裝版本)
```
sudo vim /etc/php/7.2/apache2/php.ini
```
修改這幾項內容 (此設定需依照題目要求而做更改)：
> max_file_uploads = 100
> upload_max_filesize = 128M
> post_max_size = 128M
> memory_limit = 512M


- 設定時區
```
sudo vim /etc/php/7.2/apache2/php.ini
```
> 修改文件內容：`;date.timezone =` -> `date.timezone = "Asia/Taipei"`
> 
> ![](https://i.imgur.com/P8iFLGt.png)


```
sudo systemctl restart apache2
```