<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu|dog</title>
	<atom:link href="https://ubuntudog.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://ubuntudog.com/</link>
	<description>Knowledge is power</description>
	<lastBuildDate>Fri, 20 Dec 2024 22:24:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>

<image>
	<url>https://media.ubuntudog.com/2019/11/cropped-favicon-32x32.png</url>
	<title>ubuntu|dog</title>
	<link>https://ubuntudog.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Generate API Reference documentation</title>
		<link>https://ubuntudog.com/generate-api-reference-documentation/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Thu, 22 Dec 2022 02:12:28 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=273</guid>

					<description><![CDATA[<p>Follow those steps to generate API Reference documentation from a JSON file.</p>
<p>The post <a href="https://ubuntudog.com/generate-api-reference-documentation/">Generate API Reference documentation</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Follow those steps to generate API Reference documentation from a JSON file.</p>



<ol class="wp-block-list">
<li>Download latest API reference as JSON file from desired platform</li>



<li>Convert it to yaml for easier modificatoin and convert it back to json file</li>



<li>Download Swagger UI https://github.com/swagger-api/swagger-ui/releases</li>



<li>Copy the contents of the /dist folder to your server and modify index and js file</li>
</ol>
<p>The post <a href="https://ubuntudog.com/generate-api-reference-documentation/">Generate API Reference documentation</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Enable HTTP/2 in Apache on Ubuntu</title>
		<link>https://ubuntudog.com/enable-http-2-in-apache-on-ubuntu/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Fri, 09 Oct 2020 13:08:15 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=243</guid>

					<description><![CDATA[<p>First of all make sure that the following 3 requirement is fullfilled: A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode. Also you need at least Apache version 2.4.24 If you run PHP in Apache via mod_php, ... <a title="Enable HTTP/2 in Apache on Ubuntu" class="read-more" href="https://ubuntudog.com/enable-http-2-in-apache-on-ubuntu/" aria-label="Read more about Enable HTTP/2 in Apache on Ubuntu">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/enable-http-2-in-apache-on-ubuntu/">Enable HTTP/2 in Apache on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>First of all make sure that the following 3 requirement is fullfilled:</p>



<ul class="wp-block-list"><li>A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.</li></ul>



<ul class="wp-block-list"><li>Also you need at least Apache version 2.4.24</li></ul>



<ul class="wp-block-list"><li>If you run PHP in Apache via mod_php, you need to switch to FPM. That is not a bad thing. FPM is newer and faster.</li></ul>



<h2 class="wp-block-heading">Now lets do the configuratoin for HTTP/2</h2>



<p id="block-4a1bfe2f-bf6c-47ae-814b-d4946cd02dc9">Switching Apache’s PHP Module from MPM Prefork to Event<br>Run the following commands:</p>



<pre class="wp-block-preformatted">sudo apt-get install php7.2-fpm
sudo a2enmod proxy_fcgi
sudo a2enconf php7.2-fpm
sudo a2dismod php7.2
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart</pre>



<h2 class="wp-block-heading">Installing and Enabling HTTP/2 in Apache</h2>



<p>Enable the module mod_http2:</p>



<pre class="wp-block-preformatted">sudo a2enmod http2<br>sudo service apache2 restart</pre>



<p>Enable the HTTP/2 protocol by adding the following to <em>/etc/apache2/apache2.conf:</em></p>



<pre class="wp-block-preformatted">Protocols h2 http/1.1</pre>



<h2 class="wp-block-heading">Verify that HTTP/2 is Working</h2>



<p>Cloudflare put together a <a href="https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/">comprehensive list</a> of ways you can check a website for HTTP/2 support. The easiest to use are probably Chrome Dev Tools (network view, add the Protocol column) or the <a href="https://tools.keycdn.com/http2-test" target="_blank" rel="noreferrer noopener">online test from KeyCDN</a>.</p>
<p>The post <a href="https://ubuntudog.com/enable-http-2-in-apache-on-ubuntu/">Enable HTTP/2 in Apache on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Chroot VSFTPD user on a webserver and change port of VSFTPD</title>
		<link>https://ubuntudog.com/chroot-vsftpd-user-on-a-webserver-and-change-port-of-vsftpd/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Thu, 19 Dec 2019 16:04:25 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=235</guid>

					<description><![CDATA[<p>First of all make sure to change the name of your VSFTP configuration file: sudo mv /etc/vsftpd.conf /etc/vsftpd.conf_orig sudo nano /etc/vsftpd.conf Now paste below code in vsftpd.conf file: listen_port=4021 listen=NO listen_ipv6=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES connect_from_port_20=NO chroot_local_user=YES secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=NO pasv_enable=Yes pasv_min_port=10000 pasv_max_port=10100 allow_writeable_chroot=YES Restart VSFTPD service and it ... <a title="Chroot VSFTPD user on a webserver and change port of VSFTPD" class="read-more" href="https://ubuntudog.com/chroot-vsftpd-user-on-a-webserver-and-change-port-of-vsftpd/" aria-label="Read more about Chroot VSFTPD user on a webserver and change port of VSFTPD">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/chroot-vsftpd-user-on-a-webserver-and-change-port-of-vsftpd/">Chroot VSFTPD user on a webserver and change port of VSFTPD</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>First of all make sure to change the name of your VSFTP configuration file:<br></p>



<pre class="wp-block-preformatted"> sudo mv /etc/vsftpd.conf /etc/vsftpd.conf_orig 
 sudo nano /etc/vsftpd.conf</pre>



<p><br>Now paste below code in vsftpd.conf file:</p>



<pre class="wp-block-preformatted">listen_port=4021<br>
listen=NO<br>
listen_ipv6=YES<br>
anonymous_enable=NO<br>
local_enable=YES<br>
write_enable=YES<br>
local_umask=022<br>
dirmessage_enable=YES<br>
use_localtime=YES<br>
xferlog_enable=YES<br>
connect_from_port_20=YES <br>
connect_from_port_20=NO<br>
chroot_local_user=YES<br>
secure_chroot_dir=/var/run/vsftpd/empty<br>
pam_service_name=vsftpd<br>
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem<br>
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key<br>
ssl_enable=NO<br>
pasv_enable=Yes<br>
pasv_min_port=10000<br>
pasv_max_port=10100<br>
allow_writeable_chroot=YES</pre>



<p>Restart VSFTPD service and it will start to listen on <strong>port 4021</strong></p>



<pre class="wp-block-preformatted">service vsftpd restart</pre>



<p>Now create sftp group:</p>



<pre class="wp-block-preformatted">groupadd sftp</pre>



<p>Modify /etc/ssh/sshd_config file to disable users that are part of sftp group to login by a ssh client.</p>



<pre class="wp-block-preformatted">nano /etc/ssh/sshd_config</pre>



<p>Add the following line in the end of the file</p>



<pre class="wp-block-preformatted">Match group sftp
ChrootDirectory /home
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp</pre>



<p>Restart the SSH server</p>



<pre class="wp-block-preformatted">service ssh restart</pre>



<p>Now let&#8217;s create a user and give it a password</p>



<pre class="wp-block-preformatted">useradd myftpuser

passwd  myftpuser</pre>



<p>Change a home folder of your &#8220;myftpuser&#8221; user:</p>



<pre class="wp-block-preformatted">usermod -d /var/www/myftpuser/www myftpuser</pre>



<p>Root must be owner of the path /var/www/myftpuser/:</p>



<pre class="wp-block-preformatted">chown root:root /var/www/myftpuser/</pre>



<p>Add user to sftp and www-data group:</p>



<pre class="wp-block-preformatted">usermod  myftpuser -G sftp, www-data</pre>



<p>Check groups of your newly created user:</p>



<pre class="wp-block-preformatted">groups  myftpuser  </pre>



<p>Groups www-data and sftp should be listed.</p>



<p>Make www-data owner of the web folder there all of your files will be stored:</p>



<pre class="wp-block-preformatted">chown www-data:www-data /var/www/myftpuser/www/ </pre>



<p>Last but not least try to ssh into your myftpuser account. You should not be able to login.<br><br>The next step is try login to your FTP but don&#8217;t forget to use port: 4021 that we specified above.</p>



<p>Also do not forget to allow port 4021 in your firewall. I use ufw firewall so the following command will allow port 4021:</p>



<pre class="wp-block-preformatted"> ufw allow 4021</pre>



<p></p>
<p>The post <a href="https://ubuntudog.com/chroot-vsftpd-user-on-a-webserver-and-change-port-of-vsftpd/">Chroot VSFTPD user on a webserver and change port of VSFTPD</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Password protect directories / folders with nginx</title>
		<link>https://ubuntudog.com/password-protect-directories-folders-with-nginx/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Mon, 09 Dec 2019 21:05:49 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=218</guid>

					<description><![CDATA[<p>Overview On an Apache server, it&#8217;s possible to password protect a directory using .htaccess and .htpasswd files. However, .htaccess files are not supported on Nginx. You can still password protect your directories, but you need to use a basic_auth.conf file instead. Creating the file Log into your server via SSH. Navigate to your user&#8217;s directory. ... <a title="Password protect directories / folders with nginx" class="read-more" href="https://ubuntudog.com/password-protect-directories-folders-with-nginx/" aria-label="Read more about Password protect directories / folders with nginx">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/password-protect-directories-folders-with-nginx/">Password protect directories / folders with nginx</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Overview</h2>
<p>On an Apache server, it&#8217;s possible to password protect a directory using .htaccess and .htpasswd files. However, .htaccess files are not supported on Nginx.</p>
<p>You can still password protect your directories, but you need to use a basic_auth.conf file instead.</p>
<h2>Creating the file</h2>
<ol>
<li>Log into your server via SSH.</li>
<li>Navigate to your user&#8217;s directory.</li>
<li>Make sure you have a /home/username/nginx/example.com directory.This doesn&#8217;t exist by default; you must create it by running the following:
<pre>sudo mkdir -p nginx/example.com</pre>
</li>
<li>In this /home/username/nginx/example.com directory, add a file named &#8216;<strong>basic_auth.conf</strong>&#8216; with the following:
<pre>location / {
        auth_basic "Restricted";
        auth_basic_user_file /home/username/nginx/example.com/.htpasswd;
}</pre>
<p>* The auth_basic parameter is just the title of the prompt the user sees when visiting this directory.<br />
* The auth_basic_user_file parameter specifies where the password file is. Note how its path is set to the /nginx directory.</p>
<p>In this example, the &#8216;location&#8217; directive password protects the entire domain since it&#8217;s pointing to &#8216;/&#8217;.<br />
If you want a subdirectory to be password protected, change the &#8216;location&#8217; directive as follows:</p>
<pre>location /subdirectory/</pre>
</li>
<li>Run the following to create the <strong>.htpasswd</strong> file:
<pre>sudo htpasswd -c /home/username/nginx/example.com/.htpasswd LOGIN</pre>
<p>* LOGIN is the username you want to be used to authenticate in the login prompt.</li>
<li>After typing that command, enter a password and confirm it when prompted:
<pre>New password: 

Re-type new password:</pre>
<p>Adding password for user LOGIN</li>
<li>Reload the nginx config file.
<pre>sudo service nginx reload</pre>
</li>
<li>In your browser, load the directory your /home/username/nginx/example.com/basic_auth.conf points to. *In the example above, this would be your domain&#8217;s root directory since the &#8216;location&#8217; directive points to /.</li>
<li>Enter a user/password when prompted to log in.<br />
* In this example, your username is LOGIN and the password is the one you created above.</li>
</ol>
<p>See also:</p>
<ul>
<li><a href="https://ubuntudog.com/update-timezone-in-ubuntu/">How to update timezone in Ubuntu</a></li>
<li><a href="https://ubuntudog.com/how-to-install-php-opcache/">How to install opcache in Ubuntu</a></li>
</ul>
<p>The post <a href="https://ubuntudog.com/password-protect-directories-folders-with-nginx/">Password protect directories / folders with nginx</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to install PHP opcache</title>
		<link>https://ubuntudog.com/how-to-install-php-opcache/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Sun, 08 Dec 2019 15:16:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=214</guid>

					<description><![CDATA[<p>OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. CMS frameworks such as WordPress, Joomla and Drupal, use a complex code and consume many processes. Several website speed enhancement plugins are available, heavily featured within the yield of ... <a title="How to install PHP opcache" class="read-more" href="https://ubuntudog.com/how-to-install-php-opcache/" aria-label="Read more about How to install PHP opcache">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/how-to-install-php-opcache/">How to install PHP opcache</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.</p>
<p>CMS frameworks such as WordPress, Joomla and Drupal, use a complex code and consume many processes. Several website speed enhancement plugins are available, heavily featured within the yield of a typical search engine recommendation. Most of them do not explain how to enable opcode caching server-side – thankfully, it’s simple to implement.</p>
<p>A cursory search for ways to speed up websites will yield plugins and bolt on that only address part of the requirement. The Power Users amongst us need to know how to enable functionality server-side. This short guide will cover off the basics to get you started with OPcache on Ubuntu 18.04 with PHP 7.3 but approach is more or less the same for all Ubuntu versions.</p>
<p>For more detailed runtime options, take a look at the php.net site which has a page of all the <a href="https://www.php.net/manual/en/opcache.configuration.php">runtime options available</a>.</p>
<p>To get OPcache set up requires some changes in the php.ini file on your server.</p>
<p>Open php.ini in your favourite text editor<br />
To get started open your <strong>php.ini</strong> file. Depending on your configuration, this will be in one of two locations:</p>
<pre><strong>APACHE </strong>
sudo nano /etc/php/7.3/apache2/php.ini</pre>
<p>Or</p>
<pre><strong>NGINX </strong>
sudo nano /etc/php/7.3/fpm/php.ini</pre>
<p><strong>Enable OPcache</strong><br />
To enable the OPcache, change to the following lines of your php.ini file:</p>
<pre>;opcache.enable=0</pre>
<p>Change to:</p>
<pre>opcache.enable=1</pre>
<p>Note: Remember to uncomment this line and other configuration lines (remove the “;”) as well as change the “0″ to “1″ Otherwise your change won’t take effect.</p>
<p>Modify the amount of RAM the OPcache will use<br />
With OPcache, there is a trade-off between speed and the amount of RAM used. The more RAM you are willing to dedicate to storing opcode, the more opcode that can be stored. There is a diminishing return at some point, because some code will execute rarely, or your code base might not be that big. It is worth playing with this setting to see where you get the best performance-versus-RAM trade-off. This setting is in megabytes.</p>
<pre>;opcache.memory_consumption=64</pre>
<p>Change to:</p>
<pre>opcache.memory_consumption=128</pre>
<p>Boost the number of scripts that can be cached<br />
OPcache has a strange setting that requires you to not only adjust the amount of RAM but also define the number of scripts that can be cached. You have the option of tuning this parameter for your own application too, especially if you find that your hit rate is not close to 100 percent.</p>
<pre>;opcache.max_accelerated_files=2000</pre>
<p>Change to:</p>
<pre>opcache.max_accelerated_files=4000</pre>
<p>Change the revalidate frequency<br />
To make sure that the OPcache notices when you change your PHP code, you can set the revalidate frequency. Basically, this will tell the cache how often to check the timestamp on the files. This is measured in seconds.</p>
<pre>;opcache_revalidate_freq = 2</pre>
<p>Change to:</p>
<pre>opcache_revalidate_freq = 240</pre>
<p>Verify that the PHP OPcache mod is enabled<br />
Believe it or not, that converts most of the settings you will need to get started. PHP7 has its own module system (since 5.4), so make sure that OPcache is enabled.</p>
<pre>sudo phpenmod opcache</pre>
<p>Restart PHP<br />
You should now be all set to start using PHP 7’s OPcache. You just need to restart the appropriate service to get it going.</p>
<p>APACHE WEB SERVERS</p>
<pre>sudo service apache2 restart</pre>
<p>NGINX WEB SERVERS</p>
<pre>sudo service nginx restart</pre>
<p>The post <a href="https://ubuntudog.com/how-to-install-php-opcache/">How to install PHP opcache</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Update timezone in Ubuntu</title>
		<link>https://ubuntudog.com/update-timezone-in-ubuntu/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Sun, 08 Dec 2019 00:33:25 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=210</guid>

					<description><![CDATA[<p>To check your current timezone, run: date Fri Jan 25 02:12:14 UTC 2020 Above we can see the timezone is UTC (Coordinated Universal Time). UTC is the default time zone. To avoid timezone confusion and the complexities of adjusting clocks for daylight saving time in accordance with regional custom, it is often recommended that all ... <a title="Update timezone in Ubuntu" class="read-more" href="https://ubuntudog.com/update-timezone-in-ubuntu/" aria-label="Read more about Update timezone in Ubuntu">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/update-timezone-in-ubuntu/">Update timezone in Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>To check your current timezone, run:</p>
<pre>date</pre>
<p>Fri Jan 25 02:12:14 UTC 2020<br />
Above we can see the timezone is UTC (Coordinated Universal Time).</p>
<p>UTC is the default time zone. To avoid timezone confusion and the complexities of adjusting clocks for daylight saving time in accordance with regional custom, it is often recommended that all servers use UTC.</p>
<p>If your site or application requires a different system timezone, start by listing the available options:</p>
<pre>timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa</pre>
<p>Now its time to set your time zone. Mine timezone is Europe/Stockholm</p>
<pre>sudo timedatectl set-timezone Europe/Stockholm</pre>
<p>Now check if the timezone has been set correctly.</p>
<pre>date</pre>
<p>We can see the timezone has changed to CET, which correct for Stockholm.</p>
<p>The post <a href="https://ubuntudog.com/update-timezone-in-ubuntu/">Update timezone in Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Howto disable or enable apache2 autostart on Ubuntu</title>
		<link>https://ubuntudog.com/howto-disable-apache2-autostart-on-ubuntu/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Thu, 05 Dec 2019 02:37:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=207</guid>

					<description><![CDATA[<p>Folder /etc/init.d/ contains all the init scripts for different boot up services like for example nginx, apache, mysql, etc. There is a program that makes those services simple to enable or disable from the start up. If you need to disable apache2 from start up, type: sudo update-rc.d apache2 disable To enable apache2 at start ... <a title="Howto disable or enable apache2 autostart on Ubuntu" class="read-more" href="https://ubuntudog.com/howto-disable-apache2-autostart-on-ubuntu/" aria-label="Read more about Howto disable or enable apache2 autostart on Ubuntu">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/howto-disable-apache2-autostart-on-ubuntu/">Howto disable or enable apache2 autostart on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Folder <strong>/etc/init.d/</strong> contains all the init scripts for different boot up services like for example nginx, apache, mysql, etc.</p>
<p>There is a program that makes those services simple to enable or disable from the start up.</p>
<p>If you need to <strong>disable apache2 from start up</strong>, type:<br />
<code>sudo update-rc.d apache2 disable</code></p>
<p>To <strong>enable apache2 at start up</strong>, type:<br />
<code>sudo update-rc.d apache2 enable</code></p>
<p>The post <a href="https://ubuntudog.com/howto-disable-apache2-autostart-on-ubuntu/">Howto disable or enable apache2 autostart on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Manually Upgrade phpMyAdmin</title>
		<link>https://ubuntudog.com/how-to-manually-upgrade-phpmyadmin/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Sat, 30 Nov 2019 00:28:49 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=202</guid>

					<description><![CDATA[<p>Since the release of Ubuntu 18.04 and other Linux distros, many people have been having compatibility issues with PHP 7.2 and phpMyAdmin 4.6. In this article we will manually download and install the latest version of phpMyAdmin to resolve these issues. 1. Back up phpMyAdmin You should back up your current phpMyAdmin folder by renaming it. sudo ... <a title="How to Manually Upgrade phpMyAdmin" class="read-more" href="https://ubuntudog.com/how-to-manually-upgrade-phpmyadmin/" aria-label="Read more about How to Manually Upgrade phpMyAdmin">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/how-to-manually-upgrade-phpmyadmin/">How to Manually Upgrade phpMyAdmin</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Since the release of Ubuntu 18.04 and other Linux distros, many people have been having compatibility issues with PHP 7.2 and phpMyAdmin 4.6. In this article we will manually download and install the latest version of phpMyAdmin to resolve these issues.</p>
<h2 id="1-back-up-phpmyadmin">1. Back up phpMyAdmin</h2>
<p>You should back up your current phpMyAdmin folder by renaming it.</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">mv</span> /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak</code></pre>
<p>Create a new phpMyAdmin folder</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">mkdir</span> /usr/share/phpmyadmin/</code></pre>
<p>Change to directory</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">cd</span> /usr/share/phpmyadmin/</code></pre>
<h2 id="2-download-and-extract-phpmyadmin">2. Download and Extract phpMyAdmin</h2>
<p>Visit the <a href="https://www.phpmyadmin.net/downloads/" target="_blank" rel="noopener noreferrer">phpMyAdmin download page</a> and look for the .tar.gz URL and download it using <code>wget</code>. In this guide we are using version 4.9.1, released Sept 2019. If a later version is now available, make sure to change the commands below to match (and let me know in the comments so I can update the guide 😉).</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">wget</span> https://files.phpmyadmin.net/phpMyAdmin/4.9.1/phpMyAdmin-4.9.1-all-languages.tar.gz</code></pre>
<p>Now extract</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">tar</span> xzf phpMyAdmin-4.9.1-all-languages.tar.gz</code></pre>
<p>Once extracted, list folder</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">ls</span></code></pre>
<p>You should see a new folder <code>phpMyAdmin-4.9.1-all-languages</code></p>
<p>We want to move the contents of this folder to <code>/usr/share/phpmyadmin</code></p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">mv</span> phpMyAdmin-4.9.1-all-languages/* /usr/share/phpmyadmin</code></pre>
<p>You can now log back into phpMyAdmin and check the current version. You may also see two errors:</p>
<h2 id="3-edit-vendor-config-php">3. Edit vendor_config.php</h2>
<p>If you are seeing an error <em>The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.</em></p>
<p>Open <code>vendor_config.php</code></p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">nano</span> /usr/share/phpmyadmin/libraries/vendor_config.php</code></pre>
<p>Press <code>CTRL</code> + <code>W</code> and search for <code>TEMP_DIR</code></p>
<p>Change line  to</p>
<div class="pre-label">/usr/share/phpmyadmin/libraries/vendor_config.php</div>
<pre class="prettyprint"><code>define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');</code></pre>
<p>You may also see an error <em>The configuration file now needs a secret passphrase (blowfish_secret). </em>The blowfish secret is used by phpMyAdmin for cookie authentication. <img decoding="async" class="wp-image-2977 alignnone" src="https://devanswers.co/wp-content/uploads/2018/06/blowfish_secret.png" alt="Blowfish secret" width="20" height="18" /></p>
<p>Press <code>CTRL</code> + <code>W</code> and search for <code>CONFIG_DIR</code></p>
<p>Change line to</p>
<div class="pre-label">/usr/share/phpmyadmin/libraries/vendor_config.php</div>
<pre class="prettyprint"><code>define('CONFIG_DIR', '/etc/phpmyadmin/');</code></pre>
<p>phpMyAdmin will now generate its own blowfish secret based on the install directory.</p>
<p>Save file and exit. (Press <code>CTRL</code> + <code>X</code>, press <code>Y</code> and then press <code>ENTER</code>)</p>
<p>Now log back in to phpMyAdmin and ensure the errors are gone.</p>
<p>&nbsp;</p>
<h2 id="4-cleanup">4. Cleanup</h2>
<p>You can now delete the tar.gz file and the empty folder.</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">rm</span> /usr/share/phpmyadmin/phpMyAdmin-4.9.1-all-languages.tar.gz</code></pre>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">rm</span> -rf /usr/share/phpmyadmin/phpMyAdmin-4.9.1-all-languages</code></pre>
<p>And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.</p>
<pre class="prettyprint language-bash"><code class=" language-bash"><span class="token function">sudo</span> <span class="token function">rm</span> -rf /usr/share/phpmyadmin.bak</code></pre>
<p>Hurrah!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://ubuntudog.com/how-to-manually-upgrade-phpmyadmin/">How to Manually Upgrade phpMyAdmin</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to upgrade to PHP 7.3 on Ubuntu</title>
		<link>https://ubuntudog.com/how-to-upgrade-to-php-7-3-on-ubuntu/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Fri, 29 Nov 2019 22:55:42 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=198</guid>

					<description><![CDATA[<p>PHP 7.3 has a lot of performance advantages compared to 7.2 and co among other bug fixes. Since performance is one of my main reason why I wanted to upgrade to PHP 7.3 on my Ubuntu server I am going to share how you can upgrade to PHP 7.3 on Ubuntu. My machine run Ubuntu ... <a title="How to upgrade to PHP 7.3 on Ubuntu" class="read-more" href="https://ubuntudog.com/how-to-upgrade-to-php-7-3-on-ubuntu/" aria-label="Read more about How to upgrade to PHP 7.3 on Ubuntu">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/how-to-upgrade-to-php-7-3-on-ubuntu/">How to upgrade to PHP 7.3 on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>PHP 7.3 has a lot of performance advantages compared to 7.2 and co among other bug fixes. Since performance is one of my main reason why I wanted to upgrade to PHP 7.3 on my Ubuntu server I am going to share how you can upgrade to PHP 7.3 on Ubuntu. My machine run Ubuntu 18.04 but I have performed this upgrade even on lower versions like Ubuntu 16.04 without any problems.</p>
<p>Let&#8217;s get started.</p>
<h3>WARNING</h3>
<p>Because PHP 7.3 is not yet officially released, there can be several bugs and other kind of issues since once again its not official yet. I highly recommend you not upgrade your production servers to PHP 7.3 yet.</p>
<h2>1. Add <code>ondrej/php</code> PPA</h2>
<p>We are going to use PHP PPA by Ondrej. He has published PHP 7.3 on all supported Ubuntu versions.</p>
<h5>Commands</h5>
<pre><code>sudo add-apt-repository ppa:ondrej/php # Press enter to confirm.
sudo apt-get update</code></pre>
<h2>2. Write down current PHP packages</h2>
<p>If you are upgrading PHP from an earlier version, it&#8217;s important to make sure you ensure you have the same PHP extensions installed. PHP 7.2 onwards no longer include <code>mcrypt</code> extension. Other than that, PHP 7.3 includes all extensions that were in PHP 7.1 and 7.2. <code>dpkg -l | grep php | tee packages.txt</code> Above command will list all packages installed in your system that has <em>php</em> in its name, and write them to a file called <code>packages.txt</code> in your current working directory. You can easily refer this file to install the same PHP 7.3 package counter parts.</p>
<h2>3. Install PHP 7.3</h2>
<p>Now to the juicy part!</p>
<h3>PHP 7.3 core</h3>
<pre>sudo apt install php7.3 php7.3-common php7.3-cli</pre>
<p>This will install PHP 7.3 core extensions and PHP 7.3 CLI.</p>
<h3>PHP 7.3 extensions</h3>
<p>You can now install the remaining packages as necessary. If you are setting up a new setup, or have no clear idea which packages to install, I highly recommend installing the following packages from the command below. If you are upgrading, look at the <code>packages.txt</code> file to see your current list.</p>
<pre>sudo apt-get install php7.3-curl php7.3-gd php7.3-intl php7.3-bcmath php7.3-imap php7.3-json php7.3-mysql php7.3-oauth php7.3-readline php7.3-bz2 php7.3-mbstring php7.3-opcache php7.3-readline php7.3-xml php7.3-zip</pre>
<h3>PHP 7.3 for web server</h3>
<p>With all these packages in place, you might also need to integrate PHP with your web server. If you are using Nginx, or Apache with mod_event, you will need to install <code>php7.3-fpm</code> package. If you are using PHP as an embedded Apache module, you will need <code>libapache2-mod-php7.3</code> package. For Apache, you can run <code>apachectl -V</code> to see your current MPM, whether its <code>prefork</code> or <code>event</code>.</p>
<h5>Nginx and Apache with <code>event</code> MPM</h5>
<pre>apt install php7.3-fpm</pre>
<h5>Apache with <code>prefork</code> MPM</h5>
<pre>apt install libapache2-mod-php7.3</pre>
<h5>Activate php7.3 Apache module</h5>
<pre>sudo a2enmod php7.3</pre>
<h5>Issue update and upgrade command</h5>
<pre>sudo apt-get update</pre>
<pre>sudo apt-get upgrade</pre>
<p>The post <a href="https://ubuntudog.com/how-to-upgrade-to-php-7-3-on-ubuntu/">How to upgrade to PHP 7.3 on Ubuntu</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to remove GUI Desktop from Ubuntu 16.04 or 18.04</title>
		<link>https://ubuntudog.com/how-to-remove-gui-desktop-from-ubuntu-16-04-or-18-04/</link>
		
		<dc:creator><![CDATA[dean]]></dc:creator>
		<pubDate>Fri, 29 Nov 2019 20:47:32 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://ubuntudog.com/?p=196</guid>

					<description><![CDATA[<p>I installed Ubuntu Server with Desktop support that I almost never use. Also using GUI is both resource damanding and can be a security issue. This is why I decided to completely remove it from my server. This is how to do it. sudo apt-get -y purge ubuntu-desktop sudo apt-get -y purge unity gnome-shell lightdm ... <a title="How to remove GUI Desktop from Ubuntu 16.04 or 18.04" class="read-more" href="https://ubuntudog.com/how-to-remove-gui-desktop-from-ubuntu-16-04-or-18-04/" aria-label="Read more about How to remove GUI Desktop from Ubuntu 16.04 or 18.04">Read more</a></p>
<p>The post <a href="https://ubuntudog.com/how-to-remove-gui-desktop-from-ubuntu-16-04-or-18-04/">How to remove GUI Desktop from Ubuntu 16.04 or 18.04</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I installed Ubuntu Server with Desktop support that I almost never use. Also using GUI is both resource damanding and can be a security issue. This is why I decided to completely remove it from my server.</p>
<p>This is how to do it.</p>
<pre>sudo apt-get -y purge ubuntu-desktop
sudo apt-get -y purge unity gnome-shell lightdm
sudo apt-get -y remove ubuntu-desktop
sudo apt purge ubuntu-desktop -y &amp;&amp; sudo apt autoremove -y &amp;&amp; sudo apt autoclean
sudo apt-get -y clean
sudo apt-get -y autoremove
sudo apt-get -f install</pre>
<p>However if you need to install it again just run the following command:</p>
<pre>sudo apt-get install ubuntu-desktop</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://ubuntudog.com/how-to-remove-gui-desktop-from-ubuntu-16-04-or-18-04/">How to remove GUI Desktop from Ubuntu 16.04 or 18.04</a> appeared first on <a href="https://ubuntudog.com">ubuntu|dog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
