{"id":1618,"date":"2021-11-30T12:30:00","date_gmt":"2021-11-30T18:30:00","guid":{"rendered":"https:\/\/www.linuxcloudvps.com\/blog\/?p=1618"},"modified":"2021-11-30T06:59:06","modified_gmt":"2021-11-30T12:59:06","slug":"how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack","status":"publish","type":"post","link":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/","title":{"rendered":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack"},"content":{"rendered":"\n<p>OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions. OpenEMR provides a fully integrated Workflow Management inside healthcare facilities. Any healthcare facility would be able to capture and control patient data using the following features in OpenEMR.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>CMS Reporting<\/li><li>Lab Integration<\/li><li>Clinical Decision Rules<\/li><li>Advanced Scheduling<\/li><li>E-Prescribing<\/li><li>Advanced Security<\/li><li>Multilingual Support<\/li><\/ul>\n\n\n\n<p>OpenEMR runs on many platforms, including Linux machines. In this tutorial, we will show you how to install OpenEMR on Ubuntu 20.04 with LAMP Stack.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>An Ubuntu 20.04 VPS<\/li><li>root SSH access enabled or a regular user with sudo privileges<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1. Update the System<\/h2>\n\n\n\n<p>Log in to your Ubuntu 20.04 VPS with SSH as root or as a regular user with sudo privileges<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh SSH_User@IP_Address -p Port_number<\/pre>\n\n\n\n<p>Remember to replace &#8220;SSH_User&#8221; with a user that has sudo privileges, or root. Additionally, replace &#8220;IP_Address&#8221; and &#8220;Port_Number&#8221; with your server\u2019s respective IP address and SSH port.<\/p>\n\n\n\n<p>You can check whether you have the proper Ubuntu version installed on your server with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ lsb_release -a<\/pre>\n\n\n\n<p>You should get this output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">No LSB modules are available.&lt;br&gt;Distributor ID: Ubuntu&lt;br&gt;Description: Ubuntu 20.04.3 LTS&lt;br&gt;Release: 20.04&lt;br&gt;Codename: focal<\/pre>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"488\" height=\"107\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"installing openemr on ubuntu 20.04 with lamp stack\" data-id=\"1622\" data-full-url=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-openemr-on-ubuntu-20.04-with-lamp-stack.png\" data-link=\"https:\/\/www.linuxcloudvps.com\/blog\/?attachment_id=1622\" class=\"wp-image-1622\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-openemr-on-ubuntu-20.04-with-lamp-stack.png 488w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-openemr-on-ubuntu-20.04-with-lamp-stack-470x103.png 470w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Install Apache<\/h2>\n\n\n\n<p>To install Apache on an Ubuntu server, we can run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install apache2<\/pre>\n\n\n\n<p>Now, let&#8217;s first create the document root for OpenEMR. You can create a document root anywhere, just make sure you match it with the one in your virtual host configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo mkdir -p \/var\/www\/html\/yourdomain<\/pre>\n\n\n\n<p>After creating the document root, we will create an apache virtual host. Let&#8217;s assume that we are going to use <code>yourdomain.com<\/code>, please change it to your actual domain name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/apache2\/sites-available\/yourdomain.com.conf<\/pre>\n\n\n\n<p>Insert these into the virtual host configuration file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;VirtualHost *:80&gt;\nServerAdmin webmaster@yourdomain.com\nDocumentRoot &quot;\/var\/www\/html\/yourdomain\/&quot;\nServerName yourdomain.com\nServerAlias www.yourdomain.com\nErrorLog ${APACHE_LOG_DIR}\/yourdomain.com_error.log\nCustomLog ${APACHE_LOG_DIR}\/yourdomain.com_access.log combined\n\n&lt;Directory &quot;\/var\/www\/html\/yourdomain\/&quot;&gt;\nDirectoryIndex index.php index.html\nOptions FollowSymLinks\nAllowOverride FileInfo\nRequire all granted\n&lt;\/Directory&gt;\n\n&lt;Directory &quot;\/var\/www\/html\/yourdomain\/sites&quot;&gt;\nAllowOverride None\n&lt;\/Directory&gt;\n\n&lt;Directory &quot;\/var\/www\/html\/yourdomain\/sites\/*\/documents&quot;&gt;\nRequire all denied\n&lt;\/Directory&gt;\n\n&lt;\/VirtualHost&gt;<\/pre>\n\n\n\n<p>Save the file then exit. Now, since Apache mod_rewrite is disabled by default in Ubuntu, we need to enable it and restart apache to load the module.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo a2enmod mod_rewrite&lt;br&gt;$ sudo systemctl restart apache2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Install MariaDB<\/h2>\n\n\n\n<p>Next, we will install MariaDB server from the repository. To do this, simply run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install mariadb-server<\/pre>\n\n\n\n<p>Once installed, we can proceed with creating a new database and its user for our Magento website.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo mysql<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&amp;gt; CREATE USER &#039;openemr&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;m0d1fyth15&#039;;&lt;br&gt;mysql&amp;gt; CREATE DATABASE openemr;&lt;br&gt;mysql&amp;gt; GRANT ALL PRIVILEGES ON openemr.* TO &#039;openemr&#039;@&#039;localhost&#039;;&lt;br&gt;mysql&amp;gt; FLUSH PRIVILEGES;&lt;br&gt;mysql&amp;gt; \\q<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Install PHP<\/h2>\n\n\n\n<p>The most recent OpenEMR requires at least PHP 7.3 to run. Ubuntu 20.04 comes with PHP 7.4 in its repositories as the default PHP version. It means that we do not need to specify the version when installing PHP 7.4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install php-{common,curl,gd,imagick,intl,json,mbstring,mysql,pear,xml,zip} libapache2-mod-php<\/pre>\n\n\n\n<p>Next, we need to modify the default PHP settings to meet OpenEMR requirements. Let&#8217;s run the commands below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo sed -i &#039;s\/;max_input_vars = 1000\/max_input_vars = 3000\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/upload_max_filesize = 2M\/upload_max_filesize = 64M\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/post_max_size = 8M\/post_max_size = 64M\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/max_input_time = 60\/max_input_time = -1\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/max_execution_time = 30\/max_execution_time = 90\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/memory_limit = 128M\/memory_limit = 256M\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini\n$ sudo sed -i &#039;s\/;mysqli.allow_local_infile = On\/mysqli.allow_local_infile = On\/g&#039; \/etc\/php\/7.4\/apache2\/php.ini<\/pre>\n\n\n\n<p>For the changes to take effect, we need to restart apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart apache2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5. Install OpenEMR<\/h2>\n\n\n\n<p>Before proceeding to the installation, we need to go to the document root we created earlier then download OpenEMR file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cd \/var\/www\/html\/yourdomain<\/pre>\n\n\n\n<p>Now, download the installation file. At the time of writing this blog post, the latest version of OpenEMR is 6.0.0. You can check the latest stable version at <a href=\"https:\/\/www.open-emr.org\/wiki\/index.php\/OpenEMR_Downloads\" target=\"_blank\" rel=\"noreferrer noopener\">OpenEMR&#8217;s official website.<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo wget https:\/\/sourceforge.net\/projects\/openemr\/files\/OpenEMR%20Current\/6.0.0\/openemr-6.0.0.tar.gz\/download -O openemr-6.0.0.tar.gz<\/pre>\n\n\n\n<p>Let&#8217;s extract the downloaded file then change the permissions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo tar -xzvf openemr-6.0.0.tar.gz --strip-components 1&lt;br&gt;$ sudo chown -R www-data. \/var\/www\/html\/yourdomain<\/pre>\n\n\n\n<p>Now, open your web browser and go to http:\/\/yourdomain.com to start installing OpenEMR.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"928\" height=\"663\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"installation of openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1623\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-openemr-on-ubuntu-20.04-with-lamp-stack.png 928w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-openemr-on-ubuntu-20.04-with-lamp-stack-420x300.png 420w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-openemr-on-ubuntu-20.04-with-lamp-stack-768x549.png 768w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/figure>\n\n\n\n<p>Click Proceed to Step 1 blue button to continue<\/p>\n\n\n\n<p>In this step, you will be asked to choose whether to create a new database or use the existing one. We created a database for OpenEMR after installing MariaDB in the previous step, so we will choose the second option &#8220;<em>I have already created the database<\/em>&#8221; then click on Proceed to Step 2 button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"928\" height=\"470\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"setting up openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1624\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-openemr-on-ubuntu-20.04-with-lamp-stack.png 928w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-470x238.png 470w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-768x389.png 768w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/figure>\n\n\n\n<p>In Step 2 of the installation, you will be asked to fill in the database details you created earlier. You would also need to create an initial user login name and password. When making an initial user password, make sure it contains <em>12 characters or more<\/em>.<\/p>\n\n\n\n<p>Once filled, click on Create DB and User button to continue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"926\" height=\"884\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"how to set up openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1625\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-openemr-on-ubuntu-20.04-with-lamp-stack.png 926w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-openemr-on-ubuntu-20.04-with-lamp-stack-314x300.png 314w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-openemr-on-ubuntu-20.04-with-lamp-stack-768x733.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Once the database is imported, you will be brought to the next step. In this page, you will see the initial user name and password, please remember or create a note of it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"925\" height=\"522\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuration-of-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"configuration of openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1626\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuration-of-openemr-on-ubuntu-20.04-with-lamp-stack.png 925w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuration-of-openemr-on-ubuntu-20.04-with-lamp-stack-470x265.png 470w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuration-of-openemr-on-ubuntu-20.04-with-lamp-stack-768x433.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Click Proceed to Step 4 to continue<\/p>\n\n\n\n<p>In this step, the OpenEMR installation script will check the PHP configuration. You will see that the PHP requirements are met, we modified the PHP settings after installing PHP.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"922\" height=\"669\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-configure-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"how to configure openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1627\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-configure-openemr-on-ubuntu-20.04-with-lamp-stack.png 922w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-configure-openemr-on-ubuntu-20.04-with-lamp-stack-413x300.png 413w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-configure-openemr-on-ubuntu-20.04-with-lamp-stack-768x557.png 768w\" sizes=\"(max-width: 922px) 100vw, 922px\" \/><\/figure>\n\n\n\n<p>Now, let&#8217;s proceed to the next step<\/p>\n\n\n\n<p>In Step 5, the installation script will check our Apache virtual host for OpenEMR website. Since we already configured it when creating the virtual host, we can click on the Proceed to Select a Theme button to continue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"925\" height=\"663\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"configuring openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1628\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-openemr-on-ubuntu-20.04-with-lamp-stack.png 925w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-openemr-on-ubuntu-20.04-with-lamp-stack-419x300.png 419w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-openemr-on-ubuntu-20.04-with-lamp-stack-768x550.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>In the 6th step of OpenEMR installation, you can select a theme. By clicking on the &#8216;Show More Themes&#8217; tickbox, it will show you more themes to select. Select a theme you like to proceed to the final step.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"936\" height=\"543\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/openemr-on-ubuntu-20.04-with-lamp-stack-configuration.png\" alt=\"openemr on ubuntu 20.04 with lamp stack configuration\" class=\"wp-image-1629\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/openemr-on-ubuntu-20.04-with-lamp-stack-configuration.png 936w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/openemr-on-ubuntu-20.04-with-lamp-stack-configuration-470x273.png 470w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/openemr-on-ubuntu-20.04-with-lamp-stack-configuration-768x446.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/figure>\n\n\n\n<p>As seen in the image below, we have successfully installed OpenEMR. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"926\" height=\"887\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-and-installing-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"setting up and installing openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1630\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-and-installing-openemr-on-ubuntu-20.04-with-lamp-stack.png 926w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-and-installing-openemr-on-ubuntu-20.04-with-lamp-stack-313x300.png 313w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/setting-up-and-installing-openemr-on-ubuntu-20.04-with-lamp-stack-768x736.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>The OpenEMR developer recommends we restart Apache before opening our newly installed OpenEMR website.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart apache2<\/pre>\n\n\n\n<p>Once Apache is restarted, we can click on the Start button in the final step to open our website.<\/p>\n\n\n\n<p>Now, there will be a pop-up message asking you to register the OpenEMR installation by submitting your email address.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"549\" height=\"590\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-and-configuring-openemr-on-ubuntu-20.04-with-lamp-stack.png\" alt=\"installing and configuring openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1631\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-and-configuring-openemr-on-ubuntu-20.04-with-lamp-stack.png 549w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/installing-and-configuring-openemr-on-ubuntu-20.04-with-lamp-stack-279x300.png 279w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/figure><\/div>\n\n\n\n<p>Log in to your OpenEMR website using the credentials you created in step 3<\/p>\n\n\n\n<p>Once logged in, you will be brought to OpenEMR dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"970\" height=\"278\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-and-setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-970x278.png\" alt=\"configuring and setting up openemr on ubuntu 20.04 with lamp stack\" class=\"wp-image-1632\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-and-setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-970x278.png 970w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-and-setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-470x134.png 470w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-and-setting-up-openemr-on-ubuntu-20.04-with-lamp-stack-768x220.png 768w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/configuring-and-setting-up-openemr-on-ubuntu-20.04-with-lamp-stack.png 1024w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Post Installation<\/h3>\n\n\n\n<p>To secure the installation, we need to change some of the file permissions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo chmod 644 \/var\/www\/html\/yourdomain\/library\/sqlconf.php\n$ sudo chmod 600 \/var\/www\/html\/yourdomain\/{acl_upgrade.php,setup.php,sql_upgrade.php,ippf_upgrade.php}<\/pre>\n\n\n\n<p>Of course, you don\u2019t have to do any of this if you use our <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Managed Ubuntu VPS<\/a>, in which case you can simply ask our expert Linux admins to set up this for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p>PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions. OpenEMR provides a fully integrated Workflow Management inside healthcare facilities. Any healthcare facility would be able to capture and control patient data using the following features in OpenEMR. CMS Reporting Lab Integration Clinical Decision Rules &#8230; <a title=\"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack\" class=\"read-more\" href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\" aria-label=\"More on How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":1619,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,208],"tags":[231,230,47,210],"class_list":["post-1618","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-lamp-stack","tag-openemr","tag-ubuntu","tag-ubuntu-20-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog<\/title>\n<meta name=\"description\" content=\"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog\" \/>\n<meta property=\"og:description\" content=\"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxCloudVPS Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/LinuxCloudVPS\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-30T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:site\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a\"},\"headline\":\"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack\",\"datePublished\":\"2021-11-30T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\"},\"wordCount\":924,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg\",\"keywords\":[\"LAMP stack\",\"openEMR\",\"ubuntu\",\"ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\",\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\",\"name\":\"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg\",\"datePublished\":\"2021-11-30T18:30:00+00:00\",\"description\":\"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage\",\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg\",\"contentUrl\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install openEMR on Ubuntu 20.04 with a LAMP stack\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.linuxcloudvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#website\",\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/\",\"name\":\"LinuxCloudVPS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxcloudvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#organization\",\"name\":\"LinuxCloudVPS\",\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png\",\"contentUrl\":\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png\",\"width\":217,\"height\":25,\"caption\":\"LinuxCloudVPS\"},\"image\":{\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/www.facebook.com\/LinuxCloudVPS\",\"https:\/\/x.com\/LinuxCloudVPS\",\"http:\/\/www.linkedin.com\/company\/linuxcloudvps-com\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/www.linuxcloudvps.com\/\"],\"url\":\"https:\/\/www.linuxcloudvps.com\/blog\/author\/r0s3admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog","description":"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/","og_locale":"en_US","og_type":"article","og_title":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog","og_description":"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.","og_url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/","og_site_name":"LinuxCloudVPS Blog","article_publisher":"http:\/\/www.facebook.com\/LinuxCloudVPS","article_published_time":"2021-11-30T18:30:00+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@LinuxCloudVPS","twitter_site":"@LinuxCloudVPS","twitter_misc":{"Written by":"admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#article","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/"},"author":{"name":"admin","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a"},"headline":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack","datePublished":"2021-11-30T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/"},"wordCount":924,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg","keywords":["LAMP stack","openEMR","ubuntu","ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/","name":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack | LinuxCloudVPS Blog","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg","datePublished":"2021-11-30T18:30:00+00:00","description":"OpenEMR is a popular open-source software for the healthcare industry. It offers electronic health records and medical practice management solutions.","breadcrumb":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#primaryimage","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-openemr-on-ubuntu-20.04-with-a-lamp-stack.jpg","width":742,"height":372,"caption":"how to install openEMR on Ubuntu 20.04 with a LAMP stack"},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-openemr-on-ubuntu-20-04-with-a-lamp-stack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.linuxcloudvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install OpenEMR on Ubuntu 20.04 with a LAMP Stack"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website","url":"https:\/\/www.linuxcloudvps.com\/blog\/","name":"LinuxCloudVPS","description":"","publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxcloudvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization","name":"LinuxCloudVPS","url":"https:\/\/www.linuxcloudvps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","width":217,"height":25,"caption":"LinuxCloudVPS"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/LinuxCloudVPS","https:\/\/x.com\/LinuxCloudVPS","http:\/\/www.linkedin.com\/company\/linuxcloudvps-com"]},{"@type":"Person","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.linuxcloudvps.com\/"],"url":"https:\/\/www.linuxcloudvps.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/1618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/comments?post=1618"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/1618\/revisions"}],"predecessor-version":[{"id":1650,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/1618\/revisions\/1650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media\/1619"}],"wp:attachment":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media?parent=1618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/categories?post=1618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/tags?post=1618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}