Resources for Setting Up New Server
Upcloud and A2hosting are two fantastic VPS hosting.

SETTING UP NEW SERVER ON A2 HOSTING

This is for CentOS 7 on A2server
A2 hosting was chosen because of:
Best VPS Hosting Providers
WebsiteSetup

1. Setting up LAMP stack

How to install Apache, PHP 7.3 and MySQL on CentOS 7.6 (LAMP)
HowtoForge

2. Accessing your account:

Accessing your account

3. Back-up data (document from A2), also should see Khoi’s document on OE:

1
tar cvpzf /backups/backup-$(date +\%Y\%m\%d).tgz --exclude=/proc --exclude=/lost+found --exclude=/backups --exclude=/dev --exclude=/sys --exclude=/boot/grub --exclude=/etc/fstab --exclude=/etc/sysconfig/network-scripts/ --exclude=/etc/udev/rules.d/70-persistent-net.rules --exclude=/home/some_other_folders
Copied!

4. Install EPEL repository on CentOS 7:

How to install the EPEL repository on CentOS

5. Change timezone on Linux shell:

How to change the time zone in the Linux shell

6. Set default text Editor:

How to set the default text editor in Linux

7. Obtaining free SSL certificate (from Let’sEncrypt):

8. Setting up owner of /var/www/html folders, to easy update website:

Owner of /var/www/html and subfolders - CentOS

9. Creating groups, users; Assigning passwords:

10. Force using https access using .htaccess:

11. Configure PHP to read .htaccess file on a CentOS 7 server

We need to modify the httpd.conf file:
1
vi /etc/httpd/conf/httpd.conf
Copied!
In this file: after <Directory "/var/www/html">, modify AllowOverride None to AllowOverride Options.
Save the file (hit Esc, type :wq and then Enter)
Restart httpd service:
1
systemctl restart httpd
Copied!

12. Dreamweaver:

13. Setting up firewall for CentOS 7:

14. MySQL/MariaDB

15. Installing phpMyAdmin

16. Working with tar files

17. Setting up multiple websites with multiple domains on the same server

1
<VirtualHost XX.XX.XX.XX:80>
2
DocumentRoot /var/www/html/site2.com
3
ServerName server.site2.com
4
ServerAlias site2.com www.site2.com
5
</VirtualHost>
Copied!
      After that use “/usr/local/sbin/certbot --apache -d example.com -d www.example.com” . The content of site2.com.conf file will be automatically changed. Here is example of the content of site2.com.conf after running the “certbot-auto…”
1
<VirtualHost XX.XX.XX.XX:80>
2
DocumentRoot /var/www/html/site2.com
3
ServerName server.site2.com
4
ServerAlias site2.com www.site2.com
5
</VirtualHost>
6
<IfModule mod_ssl.c>
7
<VirtualHost XX.XX.XX.XX:443>
8
DocumentRoot /var/www/html/site2.com
9
ServerName server.site2.com
10
ServerAlias site2.com www.site2.com
11
SSLCertificateFile /etc/letsencrypt/live/site2.com/cert.pem
12
SSLCertificateKeyFile /etc/letsencrypt/live/site2.com/privkey.pem
13
Include /etc/letsencrypt/options-ssl-apache.conf
14
SSLCertificateChainFile /etc/letsencrypt/live/site2.com/chain.pem
15
</VirtualHost>
16
</IfModule>
Copied!

18. Working with WordPress

19. Setting up Booked Scheduler

Last modified 8mo ago