Actions

Install/2-0/ServerPackages: Difference between revisions

From Convention Master Documentation

No edit summary
(update to mysql 8 and php 8)
 
(3 intermediate revisions by 3 users not shown)
Line 6: Line 6:
= Installing Software on the Server =
= Installing Software on the Server =


This section of the guide will walk you through the configuration of a server running Ubuntu Server 18.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:
'''''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
https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-server
Line 17: Line 20:
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.
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-get update
<syntaxhighlight lang="bash">
sudo apt-get dist-upgrade -y
    sudo apt update
    sudo apt dist-upgrade -y
</syntaxhighlight>
 


These will ensure your server has the very latest versions of its available packages and kernel. With those done, run...
These will ensure your server has the very latest versions of its available packages and kernel. With those done, run...


sudo reboot
<syntaxhighlight lang="bash">
    sudo reboot
</syntaxhighlight>
 
 
...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:
<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">
    sudo mysql
</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>
 


...to restart the server. When it comes back up, you can use the following command to install all the standard packages Convention Master needs.
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.


sudo apt-get install -y php7.4 php7.4-curl php7.4-gd php7.4-mysql php7.4-mbstring
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.  
subversion ntp nano joe apache2 libapache2-mod-php7.4 bind9 bind9utils samba html2ps
<syntaxhighlight lang="bash">
htmldoc mysql-client mysql-server mcrypt python3-pil curl
    sudo mysql_secure_installation
</syntaxhighlight>




'''PHP 7.1:''' Convention Master's PHP support tracks that of Zend themselves, and as such PHP 7.1 will be supported until the end of 2019. If installing on PHP 7.1, you will need to add an additional package to the list above:
* 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.


php-sodium
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.


'''PHP 7.3:''' You may have noticed that we are installing PHP 7.2. At the time of writing (Convention Master 10.0), the software has not been tested on PHP 7.3, as Ioncube Encoder was not available in a final version before the previous CM release. Support for PHP 7.3 will be added in an upcoming release.
<syntaxhighlight lang="bash">
    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>

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