# Install Apache, MariaDB, PHP73 on CentOS 7

#### Installation done on OVH VPS (last time augustus 2019)

**Add normal user to work under**

```bash
useradd max
passwd max
vi /etc/sudoers 
max ALL=(ALL:ALL) ALL
```

**ssh, change port for security**

```shell
vi /etc/ssh/sshd_config (change port 22 to 1122)
service sshd restart
semanage port -a -t ssh_port_t -p tcp 1122
sudo firewall-cmd --list-all
sudo firewall-cmd --permanent --zone=public --add-port=1122/tcp
```

**Install MariaDB**

```shell
sudo yum -y install mariadb-server mariadb
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
mysql_secure_installation
```

**Install Apache**

```shell
sudo yum -y install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
```

**Cinfigure Firewall**

```shell
sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
```

**Install PHP7.3**

```shell
sudo rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum update
sudo yum-config-manager --enable remi-php73
```

Optional, fix issue ‘Loaded plugins: fastestmirror’; this message appears when installing PHP7.3 and installation is not executed.

```shell
sudo /etc/yum/pluginconf.d/fastestmirror.conf 
and change enabled=1 -> enabled=0
sudo yum -y install php php-opcache
sudo systemctl restart httpd.service
```

Add max (user) to groups

```shell
sudo usermod -a -G root max
sudo usermod -a -G apache max
```

Install Python plus Libraries for maxtrack (runtracker)

```shell
sudo yum -y install python-pip
pip install flask
pip install stravalib
pip install TinyDB
```

xxx

xxx