Install/2-0/ServerPackages: Difference between revisions
From Convention Master Documentation
No edit summary |
(update to mysql 8 and php 8) |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
= Installing Software on the Server = | = Installing Software on the Server = | ||
'''''Note: This is not a comprehensive guide on how to set up a properly secured server for production. Please look into and take steps to harden a production server, such as setting up the firewall and proper sshd settings.''''' | |||
This section of the guide will walk you through the configuration of a server running Ubuntu Server 22.04 LTS, on which Convention Master can run. If your server is not yet installed, you can follow the official Ubuntu guide to do so: | This section of the guide will walk you through the configuration of a server running Ubuntu Server 22.04 LTS, on which Convention Master can run. If your server is not yet installed, you can follow the official Ubuntu guide to do so: | ||
Line 33: | Line 36: | ||
'''MySQL 8.0''' | '''MySQL 8.0''' | ||
Currently | Currently, MySQL 8.0.x is the recommended version for Convention Master. | ||
To install the MySQL database server software, run the following command: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install mysql-server | |||
sudo systemctl start mysql.service | |||
</syntaxhighlight> | |||
You will need to take some extra steps to get the user accounts and special settings Convention Master needs set up. | |||
Use the following command to get into the MySQL prompt | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo | sudo mysql | ||
</syntaxhighlight> | </syntaxhighlight> | ||
''' | While in the MySQL prompt type the following commands. Note: replace your_new_mysql_root_password with your own unique password that you make sure you don't forget. | ||
<syntaxhighlight lang="MySQL"> | |||
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_new_mysql_root_password'; | |||
exit; | |||
</syntaxhighlight> | |||
This will make sure you don't get locked out by the next step. If you need to get back into the MySQL prompt in the future, you will use this command "mysql -u root -p" and enter the password you just set. | |||
Next we should take some basic steps to secure the MySQL server. Run the following command to start a wizard that will walk you through some changes to your MySQL server. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo | sudo mysql_secure_installation | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* When it starts, it will ask you for your MySQL root password. This will be the same one you set above. | |||
* It will ask if you want to enable the VALIDATE PASSWORD COMPONENT - enter N | |||
* It will ask if you want to change your root password - you can say no since you already set a password | |||
* From there, you can press Y and then ENTER to accept the defaults for all the subsequent questions. This will remove some anonymous users and the test database, disable remote root logins, and load these new rules so that MySQL immediately respects the changes you have made. | |||
Once the script completes, MySQL is now installed. You will need to make some configuration changes to properly run Convention Master which will be covered in step 3.2 | |||
With MySQL configured, you can use the following command to install all the packages a standard Convention Master setup needs. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo | sudo apt install -y php8.1 php8.1-cli php8.1-curl php8.1-gd php8.1-mysql php8.1-mbstring php8.1-intl | ||
subversion ntp nano joe apache2 libapache2-mod-php8.1 html2ps | |||
htmldoc mcrypt python3-pil curl | |||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 18:02, 6 October 2023
<<Previously: 1.0 - Pre-Requisites
Installing Software on the Server
Note: This is not a comprehensive guide on how to set up a properly secured server for production. Please look into and take steps to harden a production server, such as setting up the firewall and proper sshd settings.
This section of the guide will walk you through the configuration of a server running Ubuntu Server 22.04 LTS, on which Convention Master can run. If your server is not yet installed, you can follow the official Ubuntu guide to do so:
https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-server
Note: Convention Master can run on any system meeting the Apache/PHP/MySQL requirement, but we will provide documentation only for Ubuntu. If you wish to use another operating system, such as CentOS or Windows, be aware that some of the steps in this guide may not apply, may have to be modified in order to work, or additional steps may be required. Convention Master can only guarantee official support for the Ubuntu Server OS.
Configure Server
Once your server's operating system is installed, we can begin installing the packages you will need to run Convention Master. Log in as the user you created during installation (or any user with sudo rights), and input the following commands.
sudo apt update
sudo apt dist-upgrade -y
These will ensure your server has the very latest versions of its available packages and kernel. With those done, run...
sudo reboot
...to restart the server.
MySQL 8.0 Currently, MySQL 8.0.x is the recommended version for Convention Master.
To install the MySQL database server software, run the following command:
sudo apt install mysql-server
sudo systemctl start mysql.service
You will need to take some extra steps to get the user accounts and special settings Convention Master needs set up.
Use the following command to get into the MySQL prompt
sudo mysql
While in the MySQL prompt type the following commands. Note: replace your_new_mysql_root_password with your own unique password that you make sure you don't forget.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_new_mysql_root_password';
exit;
This will make sure you don't get locked out by the next step. If you need to get back into the MySQL prompt in the future, you will use this command "mysql -u root -p" and enter the password you just set.
Next we should take some basic steps to secure the MySQL server. Run the following command to start a wizard that will walk you through some changes to your MySQL server.
sudo mysql_secure_installation
- When it starts, it will ask you for your MySQL root password. This will be the same one you set above.
- It will ask if you want to enable the VALIDATE PASSWORD COMPONENT - enter N
- It will ask if you want to change your root password - you can say no since you already set a password
- From there, you can press Y and then ENTER to accept the defaults for all the subsequent questions. This will remove some anonymous users and the test database, disable remote root logins, and load these new rules so that MySQL immediately respects the changes you have made.
Once the script completes, MySQL is now installed. You will need to make some configuration changes to properly run Convention Master which will be covered in step 3.2
With MySQL configured, you can use the following command to install all the packages a standard Convention Master setup needs.
sudo apt install -y php8.1 php8.1-cli php8.1-curl php8.1-gd php8.1-mysql php8.1-mbstring php8.1-intl
subversion ntp nano joe apache2 libapache2-mod-php8.1 html2ps
htmldoc mcrypt python3-pil curl