This is the second in a series of posts about setting up and configuring an Azure virtual machine for use as a development box for Embarcadero’s RADStudio 10.2 Tokyo. In this blog post I will explain the steps necessary for properly configuring your new Linux virtual machine for use with RADStudio linux development.
For the first post in this series please visit Setup an Azure VM for RadStudio 10.2 Linux Development (Part 1)
[intense_heading tag=”h3″ margin_top=”16px”]Configure & Install Linux Packages[/intense_heading]
The first step in configuring your Ubuntu VM is to login to it with your favorite SSH client. On a Linux or Mac OS X machine this is easy. Simply open a terminal window and enter the following command: [intense_code type=”block”]ssh <admin_user>@<ip_address>[/intense_code] where <admin_user> is the name of the administrator user you specified while creating your Azure VM and <ip_address> is the virtual machine’s public IP address you recorded as the last step of Part 1.
You will then be prompted to accept the key for the connection. (Depending on your SSH client this will only happen once and be saved, or you may be prompted each time you connect.) Simply answer YES to this prompt and you will be prompted to enter your password. Enter your password and you will be logged in to your virtual machine’s command prompt.
The next step is to ensure that your virtual machine’s operating system is up to date. To do so, enter the following commands into your SSH session: [intense_code type=”block”]sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade[/intense_code]
The first command, sudo apt-get update, downloads the latest information from the repositories and updates the os package list to make sure you are using the newest packages available. The second command, sudo apt-get upgrade, installs the newest versions of the packages on your virtual machine. And the third command, sudo apt-get dist-upgrade, ensures that all package dependencies are met by either installing new ones, or removing ones that are not needed.
Next you will install packages that are needed by RADStudio 10.2 Tokyo. To do so enter the following commands[intense_code type=”block”]sudo apt-get install joe wget p7zip-full curl
sudo apt-get install openssh-server
sudo apt-get install build-essential
sudo apt-get install zlib1g-dev
sudo apt-get install libcurl4-gnutls-dev[/intense_code]
[intense_heading tag=”h3″ margin_top=”16px”]Configure & Install VSFTPD[/intense_heading]
You are going to need an FTP server to transfer files (such as PAServer) from your local machine to your Linux VM. There is an excellent write up about how to do this over at DigitalOcean.com titled How To Set Up vsftpd for a User’s Directory on Ubuntu 16.04. Check it out.
[intense_heading tag=”h3″ margin_top=”16px”]Configure & Install Apache (Optional)[/intense_heading]
If you are planning on creating Apache server modules with RADStudio then you will need to install and configure Apache. Installing Apache is accomplished with the following command:[intense_code type=”block”]sudo apt-get install apache2[/intense_code]
To configure Apache you must add a line to the apache2.conf file. This is done with the following command:[intense_code type=”block”]sudo nano /etc/apache2/apache2.conf[/intense_code]
You need to add the following line to the apache2.conf file: [intense_code type=”block”]ServerName <fqdn or ip>[/intense_code] where <fqdn or ip> is the fully-qualified domain name of the server, ie. www.domain.com, or the public ip address of the virtual machine.
Then you need to check Apache’s configuration. This can be done with the following command: [intense_code type=”block”]sudo apache2ctl configtest[/intense_code]If everything is ok the system will respond with Syntax OK.
The final step for configuring Apache is to restart the service. You can do that by entering the following command:[intense_code type=”block”]sudo systemctl restart apache2[/intense_code]
[intense_heading tag=”h3″ margin_top=”16px”]Configure & Install MySQL (Optional)[/intense_heading]
Another option you may want to install is MySQL. You can install MySQL by running the following command: [intense_code type=”block”]sudo apt-get install mysql-server mysql-client[/intense_code] This will install the necessary packages that are needed to allow development with MySQL as the database back end. After the packages install you will be prompted to enter and confirm the password for the root database user. Make sure you record the password you enter somewhere as you will need it later.
After MySQL is installed you will most likely want to give yourself access to it remotely. While not recommended for production machines, you can give yourself remote root access by performing the following steps.
- Start the MySQL client by entering the following command: [intense_code type=”block”]mysql -u root -p[/intense_code] after which you will be prompted for your root password. Enter the password you entered earlier.
- Enter the following command to give yourself remote root access. (Again, do not do this on a production server.) [intense_code type=”block”]GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘<password>’;
QUIT;[/intense_code] replacing <password> with your desired root remote access password. Alternatively you can also replace the % with your local IP address to grant access only from your computer.
[intense_heading tag=”h3″ margin_top=”16px”]Configure & Install Desktop Components (Optional)[/intense_heading]
I recommend installing desktop components and a VNC server on your Ubuntu development server. The reason I recommend this is it will make it easier to test and debug your software on your Linux box. You can easily login to it using a VNC client which will allow you to see your file system easier and allow you to open multiple terminal windows. The desktop I installed is XFCE4. It is a lightweight desktop that works well over VNC. Again I would recommend you check out the excellent writeup over at DigitalOcean.com titled How to Install and Configure VNC on Ubuntu 16.04.
That’s it for this post. Stay tuned, in the next and final post, I will show you how to configure the Azure firewall to allow you to remotely access the server for development purposes. I will also show you how to install InterBase 2017 Developer Edition and PAServer. And finally I will show you how to connect the RADStudio IDE to your development machine and configure it for use with your new server.