Setting up HyperFileSQL and SCM on a Linux Server

Setting up HyperFileSQL and SCM on a Linux Server

In part one you setup a Linux Cloud Server on Rackspace, and configured it with Apache and FTP. In part two, it is time to install the HyperFileSQL Client/Server, so you can use it to host HyperFile databases and create an SCM (Source Control Manager) database in the Cloud.

Installing HyperFileSQL

Step one is to get the Linux install package for HyperFileSQL. It is included on the original CDs, but since I have downloaded the latest update patches, I used that instead. One of the patches was “WX170PACKUSHFSQLCS078g.exe” that is the HyperFileSQL install. When you run it, it will ask you for a directory to extract the setup to.

After extracting, the installer will run, you can cancel out of the install since you are not installing it locally. In the directory that you extracted the setup into, there will be two folders, Linux4 and Linux44_64. The server you built is a 64 bit server so that is the install folder you need. That folder, contains 3 files, manta_install64 (the install program), mantainstall.zip (the install package) and a read me file. To say the documentation in the Read me file is sparse, would be an understatement!

The next step is to get the install onto the Cloud Server. The easiest way to do that, is to use the FTP you setup in the last article to transfer it to the server. So fire up your favorite FTP client, connect to the server and transfer the install directory to the server.

Once the files are transferred, use the Rackspace Cloud Control Panel to connect to the serer via a terminal window. Since the home directory of the FTP user you set up is the root web document directory, that is where the folder was copied. You can switch to that directory with the following command

cd /var/www/html/Linux44_64

You have to give the file permission to be executed with this command.

chmod +x manta_install64

The next step is to run the install. I struggled with this step for a while, as I had never tried to run an executable when logged in as root. Generally you never need to, most of your installs will come from Yum, like Apache and VSFTP did, and most of your maintenance task are handled via Bash Scripts. Fortunately Stephen Hodgman came to my rescue and told me that root does not attempt to run programs in the current directory so you have to explicitly reference the current directory. So to run the install the command is

./manta_install64

That ./ is what references the current directory. Thanks again Stephen!!!

That will bring up a license agreement screen, and for those of us that haven’t been dealing with text screens in a long time it is a little tricky to navigate.

You will notice the cursor is at the top of the license text, simulating a scroll bar  you must scroll through all the license text before the “I accept” button can be selected. This requires a number of down arrows, but eventually the “I accept” will be selected. Press Enter to accept the license agreement, and the next screen will be requesting the install location. Take the defaults here by pressing the tab key until the cursor is in the “Ok” button and then pressing the Enter key.

The next screen sets the server name, port and the user used to run the service. Set the name as you wish and take the defaults for the others, then tab to the “Ok” button and press the Enter key.

The server will now be configured and ran. Once completed you will get a window telling you the default admin user has been setup without a password, Pressing the Enter key will clear this window and return you to the terminal.

You will change the password shortly but first you need to open up port 4900 on the firewall so that a connection can be made to the HyperFileSQL server. Remember in the first article you created a script called myfirewall to apply the iptable rules, that’s comes in handy now, all you need to do is add a few more lines to it. Edit the file with VI with the following command.

vi /sbin/myfirewall

And add the following lines to enable port 4900, so a connection can be made to HyperFileSQL server.

# HyperFileSQL 
iptables -t filter -A INPUT -p tcp --dport 4900 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 4900 -j ACCEPT

And apply the new rules by executing this command

/sbin/myfirewall

One last step, you should clean up the install directory since you don’t want it left in what will eventually be your website folders. So use the following command to remove the directory.

rm -rf /var/www/html/Linux44_64

Connecting to the Server

You should now be able to connect to the server. On your development machine run the HyperFileSQL Control Center. You can get to it either from the WinDev group on the windows start menu, or by running WinDev and chosing HyperFileSQL Control Center from the Tools menu. Chose the Radio Button for New Connection and fill in the Server, port, and user information, at this point there is no password. Click the green check mark to make the connection.

This will make the connection to the database and bring up the status screen below

Now its time to change the admin password. Click on the “Users and groups” tab, select the Admin user, and press the “Edit” button. This will bring up an edit screen for the user where you can set the password.

Create a SCM Database

Now that you have a HyperFileSQL server in the cloud, you can setup an SCM database on the server, and share it with a remote team of developers. Connecting to multiple SCM databases is a little tricky, there is a webinar on wxlive.us that discusses the use of multiple SCMs. Run WinDev and chose “SCM Administrator” from the SCM menu. Then from the File menu of the administrator chose “Create a new SCM Database”. Chose the “Creation in HyperFileSQL Client/Server mode” radio button and fill in the server name, login name and password. Leave the database as SCM and the port as 4900, unless you changed the port when you installed the HyperFileSQL server.

Now for a little bad news. There appears to be an issue with the process that sets up the group and rights for the SCM database. It generates the following error. I have submitted the issue to pcSoft. Note: pcSoft support has replied, this is not a Linux issue, but an issue with the SCM program on the Windows machine and a patch is available from support.

The good news is that the SCM database does get created, the only issue is the SCM users group does not get created. But you are able to create it manually and everything will work fine. To manually create the group go back to the HyperFileSQL Control Center, and click on the “Users and groups” tab. Click on the “New” button on the groups and add a new group called “SCM Users” and click the green check mark to save.

To setup the rights for the group, click on the rights tab, select the “SCM Users” group from the drop down and give the group “Rights to see the users and the groups” and press the “Apply” button to save the changes.

Next click on the Database tab, to see the databases that are on the server. You will see the SCM database in the tree list of databases. When you click on the database, the right hand pane will change into a tabbed interface for managing the database. Click on the Rights tab and chose the “SCM Users” Group. Give the group the following rights:

  • Rights to add new records to a data file
  • Rights to lock the files or the file records
  • Rights to modify the integrity rules on a data file
  • Rights to connect to the server (encrypted and unencrypted connection)
  • Rights to read the file records
  • Rights to modify the file records
  • Rights to delete the file records

Click apply to save the changes.

Now its time to add a user to the SCM. This is where watching the webinar about using multiple SCMs is important. If at all possible you should use the same user and password for all the SCMs that you connect to, as it will make it a little easier to deal with. Click on the server in the tree control on the left pane, which will change the right pane back to the maintenance of the server. Click on the “Users and groups” tab, and click the “Add” button to add the user. Fill in the required information, and add the user to the “SCM Users” group by selecting it and pressing the Arrow button to move it the the “Users Groups” list. Click the green check mark to save the record.

You can now add a project to the SCM. Open one of your projects, then from the project menu, chose project description, then the SCM tab. Chose the “Use the SCM” radio button, then press the “Parameters” button and chose “Add the project to a SCM database”

When the wizard comes up, fill in the server, database, port, user name and password and click on the wizard next arrow.

The next screen allows you to configure the directory in the SCM database that the project will be stored in. When done, click the next button.

The next screen allows you to select the Elements to add. When done click the next button.

Next is dependencies. Click the next button.

This will bring you to the final screen of the wizard and it is ready to add the project to the SCM database, click the green check mark.

The project is now added to the SCM database and you are presented with a screen giving you some tips on the use of the SCM. You can close the screen and you will be back in the WinDev IDE.

You have now added a project to the SCM, congratulations!

Use the HyperFileSQL Server for the data of an application

The server can also be used to store databases that you want your application to communicate with over the cloud, and you will also be connecting to the server from you WebDev sites once the server is completely configured.  Before you start using it for application data, you should adjust the cache setting of the server. From the HyperFileSQL Control Center, chose the Configuration tab, and then the Caches radio button. This setting controls how much Ram of the server can be used to cache the indexes of the databases. Recommended setting are shown based on the configuration of your server. Set the size to what is appropriate for your use. I am setting mine low since I will only use the HyperFileSQL Server for SCM and testing. Once done click Apply, to save your changes.

To fully test the server and get an idea of what it takes to move a classic database to the cloud you can modify one of the example apps provided with WinDev. There are two methods to move a HyperFile Classic database to your Server, when you change the connection in the Analysis it will give you the opportunity to upload the database at that time, or from the HyperFileSQL Control Center, on the databases tab, there is a button to “Import a HyperFileSQL Classic database”. So open up WinDev, and open the “Sales Management” Example. Then from the Project menu, chose “Load the Analysis”. The from the Analysis menu, chose “Connections”. Since there are no connections defined, a wizard will popup to define a connection.

You are creating a connection to a HyperFileSQL Client/Server so click the next button and specify the server name and port.

Click the next button, and specify the user name and password to connect to the server. You can create several users on your HyperFileSQL server and give them different permissions, to different databases, for now just use the Admin user.

Click the Next button, and the wizard will take a few minutes to communicate with the server to get a list of databases available. Since the only database you have at this point is the SCM that is what will be displayed in the drop down. You are creating a new database, so type its name (“SalesManagement”) into the drop down and press the Next button.

Now you are given a chance to Name the connection and add a description. Change as you like, then press the Next button.

Now that a connection has been defined, the real magic begins. You are asked if you want to associate some of the files of the Analysis with this new connection. Answer “Yes”

Then you are given the opportunity to select which files, select all of them and then press the Next button.

The next question wants to know if you would like to copy the existing files to the Server, since that was the purpose of this exercise, click “Copy now”

Now your given a choice of which files to copy to the server, select them all and press the Next button.

The next screen lets you know that your have completed the wizard, so if you click the green check, you will “Make it So”.

The analysis will be changed and the files will be copied to the server. Once its completed you will be returned the to Analysis and will see that the files now show as being HFSQL C/S files.

That’s all there is to it, if you run the application now, it will be using the data from your shinny new Cloud Server!!! The first time you run the application there will be a few additional prompts that come up to configure the Hot Modification of the database files. Just answer those as you wish.

You will notice that the application is a little slower at times because it is pulling the data from the cloud, but everything will function as expected. Note: Andy Stapleton of Cowboy Computing Solutions has a set of file manager classes that helps speed up applications that will be accessing data over the cloud. 

If you want to verify that you really are editing the database located on the server, simply edit a record.

Then use the HyperFileSQL Control Center to view that same record.

Part 2 Conclusion

You have now configured a HyperFileSQL server in the cloud that you can use to serve data to your WD applications and later on, you will configure WB to use that same server. You have also setup a SCM database on that server so that you can share your projects with a development team.

Be sure to save another image of the server incase you want to roll back to this point for any reason.

Still to come: Installing WebDev and adding a couple of sites to the server. I will also be doing an article on setting up PostgreSQL on the server. And if I get enough request, I may also consider doing articles on installing mySQL, PHP, WordPress, and SSH on the server.

6 thoughts on “Setting up HyperFileSQL and SCM on a Linux Server

  1. Note: pcSoft support has replied concerning the issue with adding the SCM group. This is not a Linux issue, but an issue with the SCM program on the Windows machine and a patch is available from support.

    Like

    1. This series of articles tells you how to set it up and some of the pit falls. Can’t really help beyond that without specific issues / questions.

      I am always available for consulting if you really need help with something

      Like

  2. Hi Pete, I managed to install a HyperFile SQL server on linux, no big deal, it works ok with desktop applications, buy my real need is Web applications, I installed the WebDev Server but I cannot play with it, the setup created a webdevadmin user in linux, but I do not know how this user works with Webdev, can you advice ?

    Like

    1. There is a couple of additional articles on the Blog concerning installing Webdev and publishing a site on Linux that should help you out

      Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s