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)
Configure & Install Linux Packages
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:
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:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade
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
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
Configure & Install VSFTPD
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.
Configure & Install Apache (Optional)
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:
sudo apt-get install apache2
To configure Apache you must add a line to the apache2.conf file. This is done with the following command:
sudo nano /etc/apache2/apache2.conf
You need to add the following line to the apache2.conf file:
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.
ServerName <fqdn or ip>
Then you need to check Apache’s configuration. This can be done with the following command:
If everything is ok the system will respond with Syntax OK.
sudo apache2ctl configtest
The final step for configuring Apache is to restart the service. You can do that by entering the following command:
sudo systemctl restart apache2
Configure & Install MySQL (Optional)
Another option you may want to install is MySQL. You can install MySQL by running the following command:
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.
sudo apt-get install mysql-server mysql-client
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:
after which you will be prompted for your root password. Enter the password you entered earlier.
mysql -u root -p
- Enter the following command to give yourself remote root access. (Again, do not do this on a production server.)
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.
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘<password>’; QUIT;
Configure & Install Desktop Components (Optional)
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.