Tested on newly installed ubuntu desktop (version 8.04)
The dependencies stuff is very cool.
Could probably wean down the openemr-setup dependencies by removing ssh, postgresql, perl/tetex stuff (not sure needed since freeb and sql-ledger gone).
The scripts ran and installed dependency packages, but nothing else happened (openemr was not downloaded and not setup either).
Also, regarding CVS installations, there’s also daily snapshots for testers to download on the wiki (installation section).
But it would also be cool to have a script to grab the cvs, however this is most useful for testers/developers since this code is generally thought to be unstable.
The thing that’s really exciting for me though after using your scripts is for the user to type ‘sudo aptitude install openemr’ and then download automatically dependencies, the most recent production openemr version, collecting info via input prompts, then configuring it. There’d also by some configuration to the PHP and apache configuration files (don’t worry, this should be straightforward). And of course an uninstall (also simple basically drop openemr database, delete openemr directory and remove changes to apache configuration script).
Also feel free to make yourself the author of these scripts, you’ve modified them enough.
You motivated my involvement really. Well as regards being the author, I would just add my name beside yours…lol. Well You know there are two packages, the startup and the setup. you have to run the startup before the setup for it to work. Well I understand the issue of the uninstall script, I will work on that and then prolly make another .deb file for both of them. Its gonna take a while but I will get it working. The script should run as it unpacks the installer script in /usr/local and the runs it using ./usr/local/script.sh. I will take a second look at it. Thanks for testing it. Please more testersshould get involved and give suggestions so I can modify it and prolly put it on the ubuntu website so users can get it from synaptic easily. Thanks for the support.
Guess u have been busy. I have been testing the package but not as well as I would want due to the fact that my job keeps me tied down all day except during the weekend but i managed to isolate the problem. It has to do with the file permission on the files i got from you. They were just as regular files and also the ownership on then was messed up. I just didnt realize till i unpacked it and took a look at it and saw the errors. I have corrected it and would build a fully functional package this weekend. It will be up by tuesday next week and ready for use by the OpenMER community.
if u have any suggestions regarding the script please note them so I can put them in
I’d suggest focusing on one package first. I’m definitely most interested in leveraging the SETUP script to automatically install a production version of openemr. Once complete, we could then get this in the repository and ubuntu users could configure/install openemr with a simple command.
To have your installer run the script it looks like it should be in control.tar.gz with title ‘postinst’. Also, as an aside, the uninistall script is here also and titled ‘prerm’. Both these scripts require execution permissions.
The data.tar.gz is what actually gets unpackaged and placed into the file system. So I think this could actually be where the openemr release goes (ie. ./var/www/openemr ). Basically, I’d just unpackage a recent version openemr, and then re-package it into ./var/www/openemr directory to make data.tar.gz file.
To get script functional completely remove the section starting with ‘#FIRST DEAL WITH STUFF SPECFICIC…’ since this is for cvs demo stuff.
I think this will work. Then we can deal with optimizing script, dependencies, getting user inputs, configuring apache/php, uninstall, and quick docs (this will just be cut/paste from current docs). What is very cool, is that this will allow a simple upgrade mechanism in future (the upgrading is currently manually done and rather laborious).
The tldp guide is a good guide but i think we should focus more on letting it install first before we think of adding the prerm and postinst. Well there r two files so which do u want me to work on??? The one that downloads from CVS or the one that just sets up the downloaded package??? Also I was thinking of adding some lines to the setup script such that it checks for a /var/www/openemr and if it sees one, it simply runs a cvs upgrade but basically like an installation, what do you think???
The instructions above would be for the setting up of a production version (hence would include the openemr release in the debian file).
If you want to go after the CVS install instead, then I think your data.tar.gz would be empty (perhaps we could put a couple docs in there at some point). You will actually combine the “CVS downloading” portion of the startup script with the setup script and place in ‘postinst’. Hence, when you install the package you will download openemr from cvs and configure it at that time. Then when you uninstall the package you can create a script ‘prerm’ to remove everything (actually only several lines of code required in remove openemr).
Again, the production version and cvs version are two different scripts with different audiences, albeit both useful. The production version install script has a much larger audience. The cvs version install script is basically for testers, since these versions are considered unstable and not recommended in production setting. That being said, a cvs script would still be useful because the tester can quickly test out most recent version. I’d rec going after the production version script, but if your more motivated to do the cvs one, then go for that one.
Thanks for pointing it out. Well I would rather work with the production environment as it is a more stable one. Well do you have any script written out for this??? What I was suggesting was that the postint would contain download instructions for openemr combined with the setup script if I am correct about what u were saying, then the prerm would just be a script to remove openemr directory from /var/www and also all othe things unpacked by the deb file and if possible drop the database. Well do u have anything in place for this or i just take out the CVS download portion and replace it with wget http://server/openemr-3.0-1.tar.gz??? and a tar command and also copy to /home/openemr then the setup script continues from there??? If we could have a skype talk or something it would be better so we could share ideas in real time and then you can leave the rest to me so u can focus on some other aspect of the package production
Using wget to collect is a great idea to simplify things. The first goal is just to get something that works. In a final step we can place full openemr in the package (this is useful because we can take advantage of automatic MD5SUM checking). For wget, just use this for now:
wget http://opensourceemr.com/cvs/openemr-cvs.tar.gz
(I know this is the most recent cvs version, but we can easily change it to the openemr 3.0.1 version when it’s released).
Try use below script as starting point (I just quickly copy/pasted/combined stuff from original/modified openemr/contrib/util/installScripts/cvsDemoInstall with a couple more changes (i have not tested it) You could just try this script on your ubuntu to see what happens. Once you get it working then can test in package (in ‘postinst’ file) and we’ll then have our skeleton functional package (still many things to do):
# OTHER VARIABLES
setHost=“localhost” #mysql server (if not different from php, then localhost)
setLoginhost=“localhost” #php/apache server (if not different from mysql, then localhost)
setPort=“3306” #MySQL port
setDbname=“openemr” #MySQL openemr database name
setLogin=“openemr” #username to MySQL openemr database
setPass=“openemr” #password to MySQL openemr database
setRoot=“root” #MySQL server root username
setRootpass="" #MySQL server root password
setIuser=“admin” #initial user login name
setIuname=“Administrator” #initial user full name
setIgroup=“Default” #practice group name
setOpenemrWebPath=/openemr #path on browser to openemr
setInst=“1” #CONSTANT, don’t set
I did that exactly as u wrote it, it simply simplifies things and makes it straight forward. I will work on it this weekend, work has taken a great deal of my time. I will get it posted on Monday morning for download after proper testing of the package. Thanks
hey,
Sounds good. BTW, I’m a skype idiot (I feel kind of stupid that even Oprah watchers can use it, while I can’t). If we’re going into heavy detail, then just email me at brady@sparmy.com. Otherwise, our discussions here will hopefully hook others to test/help.
I’d just like to remind others that our goal of this project is to get a simple openemr install in ubuntu with following command:
sudo aptitude install openemr
(this would also provide a mechanism for auto upgrades) (Ron, you out there…)
Also, for the uninistall script, ‘prerm’ try:
rm -fr /var/www/openemr
mysqladmin -f -h localhost -u root drop openemr
Wow Finally I got it working…It actually would do something. The reason it wasnt working was due to the postinst file was missing, wat i simply did was to put the script we modifies in /usr/lib as unpacked from the debian file and wrote a simple script for postinst to enter /usr/lib and run /bin/bash/emr and boom it started downloading the package, I feel a big relief its working. I would work on other parts of it like accepting use inputs and all other things as regards hostname and other default inputs in the script. This is a big step forward for us. The link to the download is
Please Download and test it so I can release a final version by monday next week. Comments and remarks would be appreciated to be incorporated in the final release. I would also work on an rpm package for rpm based users or u can simply download this and use the alien tool to convert to rpm. Have fun all
Created a package for rpm user, download and please test it to give me feed back ASAP so we can move forward with the final release on both platforms. Thanks testers