tag:blogger.com,1999:blog-13816250081802706102024-02-03T01:56:41.578+02:00Ordinary life"Freely accessing knowledge is an essential human right. Knowledge is the foundation for human potential, freedom and opportunity and everyone should have access to knowledge for free, without any restriction or limitation." [www.linuxbabe.com] foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1381625008180270610.post-1781033072537104502020-12-26T00:58:00.021+02:002020-12-28T14:25:56.985+02:00Installation of MySQL(MariaDB) and phpMyAdmin on Ubuntu LTS focal (20.04)<p style="text-align: justify;"><span style="font-family: trebuchet;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: trebuchet;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLFXM6cokIfQz_AZKJNuekWqOh6GDsqIESqdvowlJEyjti3IAS97_ZEL4st1hH8iTd4rszawTXv5Yjd0v7qWx7m-P4zZfLw0GrfNmrpk1P-F5J8H0gfgNJ5TJz7gmk3M5sKbDdPt4Wp3As/s818/screen-2020-12-27-14-19-19.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="573" data-original-width="818" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLFXM6cokIfQz_AZKJNuekWqOh6GDsqIESqdvowlJEyjti3IAS97_ZEL4st1hH8iTd4rszawTXv5Yjd0v7qWx7m-P4zZfLw0GrfNmrpk1P-F5J8H0gfgNJ5TJz7gmk3M5sKbDdPt4Wp3As/w640-h448/screen-2020-12-27-14-19-19.png" width="640" /></a></span></div><span style="font-family: trebuchet;"><span></span></span><p></p><p style="text-align: justify;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span>Coming back again, "ten years after", trying to cope with this </span><span lang="en">incredible mess that has resulted from the -admittedly- very good effort</span> <span>of MySQL (and MariaDB) developers to make our databases more secure. Towards this aim, they decided not to allow -at all- the remote login of root user and therefore, "</span><i><span>the root </span><span><span>MySQL</span> (</span></i><span><i><span>MariaDB</span>) user is set to authenticate using the <code>auth_socket</code> plugin by default rather than with a password</i>" [1], although at the beginning of the process of securing the db (step 7 below), the sudoer is asked to provide a new password for root user in order to perform subsequent security operations. </span></span></span></span></p><p style="text-align: justify;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span>And even if <i>"</i></span><span><i>this allows for some greater security and usability in many cases, but
it can also complicate things when you need to allow an external program -like phpMyAdmin- to access the user"</i> [1], it appears that this "complication", in case of phpMyAdmin, is easily resolved by a) giving a (strong) password for <b>phpmyadmin</b> user in step 4 below, rather than letting dbconfig-common to randomly generate one, without success b) performing MySQL securing operations (step 7 below) after installing and configuring phpMyAdmin and c) creating a new superuser to access phpMyAdmin web interface, instead of root (step 8).</span></span></span></span></p><p style="text-align: justify;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span><u>However, there is no problem to install MariaDB and phpMyAdmin following the instructions in links [<a href="https://www.linuxbabe.com/ubuntu/install-lamp-stack-ubuntu-20-04-server-desktop">3</a>] and [<a href="https://www.linuxbabe.com/ubuntu/install-phpmyadmin-apache-lamp-ubuntu-20-04">4</a>] respectively.</u><br /></span></span></span></span></p><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span>In what follows, it is assumed that sudoer' s name is <b>usbuntu</b> and machine's hostname is <b>host</b> <b> </b></span></span></span></span></p><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>1. Install apache2:</b></span></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span style="color: #0b5394;"><b>usbuntu@host$</b></span> sudo apt install apache2</span></span></span></span></blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>2. Install MySQL: <br /></b></span></span></span></span><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b>usbuntu@host$ </b></span></span>sudo apt install mysql-server</span></span></span></span></blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>3. Install php and php-mysql module:</b></span></span></span></span><p><span style="font-size: small;"><span style="font-family: verdana;"></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b>usbuntu@host$ </b></span></span>sudo apt install php php-mysql</span></span></span></span></blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>4. Install phpMyAdmin </b></span><span><b><span><b>and</b> during installation configure phpMyAdmin as follows:</span></b> </span></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b>usbuntu@host$ </b></span></span>sudo apt install phpmyadmin php-mbstring</span></span></span></span></blockquote><div class="separator" style="clear: both; text-align: center;"><span style="font-size: small;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-4_rFHAQlDavy8-wL6_h2Q87chjQlmBllAATGaT8NnkNdAbJjS-HX1SR41plj86IcDaO0HnaIKQ3wIDT1YiiWsUV6g7lcG7mtGljnOngoxnTTfpgQOIMiy1ELirFJI0RIHdw41eNZtYB/s687/pasted_image.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="239" data-original-width="687" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-4_rFHAQlDavy8-wL6_h2Q87chjQlmBllAATGaT8NnkNdAbJjS-HX1SR41plj86IcDaO0HnaIKQ3wIDT1YiiWsUV6g7lcG7mtGljnOngoxnTTfpgQOIMiy1ELirFJI0RIHdw41eNZtYB/w588-h204/pasted_image.png" width="588" /></a></span></span></div><div class="separator" style="clear: both; text-align: center;"><span style="font-size: small;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzaCCY-jgEJUsjRbjD-7Pas8gHeV1O5S9L7-JLyH6zW5N_sXnIM-etaQ_YqJY1LLxfbzxTGuhpNaWZIbD_M7OIVoyk2reIIDeQkIGg-QT-Hzv8NLqKh3L3YhL7YjZ0JaziLH_igpX7cVF/s686/pasted_image001.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="345" data-original-width="686" height="293" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzaCCY-jgEJUsjRbjD-7Pas8gHeV1O5S9L7-JLyH6zW5N_sXnIM-etaQ_YqJY1LLxfbzxTGuhpNaWZIbD_M7OIVoyk2reIIDeQkIGg-QT-Hzv8NLqKh3L3YhL7YjZ0JaziLH_igpX7cVF/w585-h293/pasted_image001.png" width="585" /></a></span></span></div><span style="font-size: small;"><span style="font-family: verdana;"><br /> </span></span><div class="separator" style="clear: both; text-align: center;"><span style="font-size: small;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFfzqFNhnamC9UoMV4LW77j3Hwe-IO1o2ae1m96168khs0MFHTyFBli7Cp0DJ9Xdo2inLZ6DI25sxmZN19fQb7LcpfznbKZFl9IK4qO3e3pxiwq26iddVFaNU5pm0CkgmUQ74qOgz0uSAb/s688/pasted_image002.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="201" data-original-width="688" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFfzqFNhnamC9UoMV4LW77j3Hwe-IO1o2ae1m96168khs0MFHTyFBli7Cp0DJ9Xdo2inLZ6DI25sxmZN19fQb7LcpfznbKZFl9IK4qO3e3pxiwq26iddVFaNU5pm0CkgmUQ74qOgz0uSAb/w592-h172/pasted_image002.png" width="592" /></a></span></span></div><div class="separator" style="clear: both; text-align: center;"><span style="font-size: small;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9qNNaj6lNGwxp_QiNzzPx9zHjjSDGwb63z19I4vXff4oH_3eFuK6yUr68WxDhD_40L_L2V-BIkUoHCWUqAm0owB687tKv7Tpd7m2OeL4q6oB6LWVhb7e8EFK9Rc8CMxhp-SqVemTsWjNm/s336/pasted_image003.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="181" data-original-width="336" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9qNNaj6lNGwxp_QiNzzPx9zHjjSDGwb63z19I4vXff4oH_3eFuK6yUr68WxDhD_40L_L2V-BIkUoHCWUqAm0owB687tKv7Tpd7m2OeL4q6oB6LWVhb7e8EFK9Rc8CMxhp-SqVemTsWjNm/w320-h171/pasted_image003.png" width="320" /></a></span></span></div><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>5. Append the line</b><br /></span></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span>Include /etc/phpmyadmin/apache.conf </span></span></span></blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b> to</b> <span>/etc/apache2/apache2.conf </span><b>:</b></span></span></span></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b><span><span><span style="color: #0b5394;"><b>usbuntu@host$</b></span></span></span></b><span><span><span style="color: #0b5394;"><span style="color: black;"> </span></span></span></span><span style="color: black;">sudo vi </span></span></span></span><span>/etc/apache2/apache2.conf</span></span></span></span></p><p><span style="font-size: small;"><span style="font-family: verdana;"><span><span><b>6. Restart apache2</b><br /></span></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b><span><span><span style="color: #0b5394;"><b>usbuntu@host$</b></span></span></span></b></span></span></span> sudo systemctl restart apache2</span></span></span></blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span><b>7. Secure mysql (<span style="color: #990000;">Attention</span>: there is no way to return to shell prompt unless you provide password below and I think -didn't check it- unless you answer all questions afterwards)</b><br /></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b><span><span><span style="color: #0b5394;"><b>usbuntu@host$ </b></span></span></span></b></span></span></span>sudo mysql_secure_installation </span></span></span></blockquote><blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span>VALIDATE PASSWORD COMPONENT can be used to test passwords<br />and improve security. It checks the strength of password<br />and allows the users to set only those passwords which are<br />secure enough. Would you like to setup VALIDATE PASSWORD component? <br /></span></span></span></p></blockquote><blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Press y|Y for Yes, any other key for No: <span style="color: #990000;"><b>y</b></span></span></span></span> </p></blockquote><blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: </span><span style="color: #990000;"><b><span>1</span> <span style="color: black;">(although 2 is more secure)</span></b></span><br /></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span>Please set the password for root here.</span></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span>New password: <span style="color: #990000;"><b>********</b></span></span></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span>Re-enter new password: <span style="color: #990000;"><b>******** </b></span></span></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span><br />Estimated strength of the password: 100 </span></span></span></p></blockquote><blockquote style="text-align: left;"><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : <span><span style="color: #990000;"><b>y</b></span></span> <br /></span></span></span></p></blockquote><blockquote style="text-align: left;"><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Remove anonymous users? (Press y|Y for Yes, any other key for No) : <span><span style="color: #990000;"><b>y</b></span></span></span></span></span></p></blockquote><blockquote style="text-align: left;"><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Disallow root login remotely? (Press y|Y for Yes, any other key for No) : <span><span style="color: #990000;"><b>y</b></span></span> <br /></span></span></span></p></blockquote><blockquote style="text-align: left;"><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Remove test database and access to it? (Press y|Y for Yes, any other key for No) : <span><span style="color: #990000;"><b>y</b></span></span></span></span></span></p></blockquote><blockquote style="text-align: left;"><p><span style="font-size: small;"><span style="font-family: verdana;"><span>Reload privilege tables now? (Press y|Y for Yes, any other key for No) : <span><span style="color: #990000;"><b>y</b></span></span></span></span></span></p></blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"><span><b>8. Create new superuser (i.e. supuser) -with full privileges- to connect to phpMyAdmin (replace <span style="color: #990000;">give_strong_password_here</span></b> <b>with the password of your choice)</b><br /></span></span></span></p><blockquote><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><span style="color: #0b5394;"><b><span><span><span style="color: #0b5394;"><b>usbuntu@host$ </b></span></span></span></b></span></span></span>sudo mysql<br /><b><span style="color: #38761d;">mysql></span></b> CREATE USER 'supuser'@'localhost' IDENTIFIED WITH mysql_native_password BY '<span style="color: #990000;">give_strong_password_here</span>';<br /><b><span style="color: #38761d;">mysql> </span></b>GRANT ALL PRIVILEGES ON *.* TO 'supuser'@'localhost' WITH GRANT OPTION;<br /><b><span style="color: #38761d;">mysql> </span></b>quit</span></span></span></blockquote><div style="text-align: justify;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><i> </i></span></span></span></span></span></div><div style="text-align: justify;"><span style="font-size: small;"><span style="font-family: verdana;"><span><span><span><i>"You should now be able to access the phpMyAdmin web interface by
visiting your server’s domain name or public IP address followed by <code>/phpmyadmin</code>. e.g. <span style="font-size: medium;"><span style="font-family: verdana;"><code>http://example.com/phpmyadmin</code> or </span></span></i><span style="font-size: medium;"><span style="font-family: verdana;"><code><i>http://192.168.1.10/phpmyadmin"</i>[2] or http://localhost/phpmyadmin or </code><code><code>http://127.0.0.1/phpmyadmin, using credentials </code></code><code><code><b>supuser</b> and </code></code></span></span></span></span><span style="font-size: medium;"><span style="font-family: verdana;"><code><span><span><b><span style="color: #990000;">give_strong_password_here</span></b></span></span></code></span></span></span></span></span></div><div style="text-align: justify;"><span style="font-size: medium;"><span style="font-family: verdana;"> </span></span></div><div style="text-align: justify;"><h3><span style="font-size: small;"><span style="font-family: verdana;">Versions</span></span></h3></div><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span><b>Ubuntu LTS focal (20.04) <br /></b></span></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;"><span><b>MySQL Server version</b>: 8.0.22-0ubuntu0.20.04.3 - (Ubuntu)<br /><b>Apache version:</b> 2.4.41 (Ubuntu)<br /><b>PHP version:</b> 7.4.3 <br /><b>phpMyAdmin version:</b> 4.9.5deb2 </span><br /></span></span></p><h3 style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;">Links</span></span></h3><div style="text-align: left;"><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;">[1] <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-20-04">How To Install and Secure phpMyAdmin on Ubuntu 20.04</a></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;">[2] <a href="https://devanswers.co/install-secure-phpmyadmin-apache-ubuntu-20-04/">How To Install & Secure phpMyAdmin for Apache on Ubuntu 20.04</a></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;">[<a href="https://www.linuxbabe.com/ubuntu/install-lamp-stack-ubuntu-20-04-server-desktop">3</a>] <a href="https://www.linuxbabe.com/ubuntu/install-lamp-stack-ubuntu-20-04-server-desktop">How to Install LAMP Stack on Ubuntu 20.04 Server/Desktop</a></span></span></p><p style="text-align: left;"><span style="font-size: small;"><span style="font-family: verdana;">[<a href="https://www.linuxbabe.com/ubuntu/install-phpmyadmin-apache-lamp-ubuntu-20-04">4</a>] <a href="https://www.linuxbabe.com/ubuntu/install-phpmyadmin-apache-lamp-ubuntu-20-04">How to Install phpMyAdmin with Apache (LAMP) on Ubuntu 20.04</a></span></span></p><p style="text-align: left;"> </p><p style="text-align: left;"> </p></div><blockquote><p><span style="font-size: small;"><span style="font-family: verdana;"> </span></span></p></blockquote><p></p><br /><p></p><p><span style="font-family: arial;"><br /></span></p><p></p><p><br /><br /></p><p></p><p><br /></p><br /><br />foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com0tag:blogger.com,1999:blog-1381625008180270610.post-70966884648948242132011-08-14T17:00:00.009+03:002011-08-15T18:58:01.083+03:00Installation of the latest eclipse Java EE IDE in (K)Ubuntu 11.04 x64<span style="font-size: medium; font-weight: 600;">Prerequests</span><br />
<ul><li>Java JRE (ubuntu packages sun-java6-jre or openjdk-6-jre).</li>
<li>Current Ubuntu repositories package (<span style="color: red;">eclipse 3.5 (galileo)</span>), which will be purged after installation/configuration of the latest eclipse. If it is not present install it using the command:<br />
<blockquote>sudo apt-get install eclipse</blockquote></li>
</ul><span style="font-size: medium; font-weight: 600;">Download</span><br />
<ul><li><a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/R/eclipse-jee-indigo-linux-gtk-x86_64.tar.gz"><span style="color: blue; text-decoration: underline;">The latest eclipse version</span></a> (currently eclipse 3.7 (indigo) <span style="color: red;">eclipse-jee-indigo-linux-gtk-x86_64.tar.gz</span>).</li>
</ul><br />
<span style="font-size: medium; font-weight: 600;">Installation/Configuration</span><br />
<ul><li>To (temporally) install the latest version (placed for example in <span style="color: red;">~/Downloads</span>) at <span style="color: red;">/usr/lib/eclipse_indigo/eclipse</span>, open a terminal and give the commands:<br />
<blockquote>cd /usr/lib<br />
sudo mkdir eclipse_indigo<br />
cd eclipse_indigo<br />
sudo tar zxvf ~/Downloads/eclipse-jee-indigo-linux-gtk-x86_64.tar.gz</blockquote></li>
<li>Keep the current (executable) script:<br />
<blockquote>sudo cp /usr/bin/eclipse /usr/bin/eclipse.curr</blockquote></li>
<li>Purge ubuntu eclipse:<br />
<blockquote>sudo apt-get purge eclipse <br />
sudo apt-get autoremove </blockquote></li>
<li>Move (as root) the latest eclipse from <span style="color: red;">/usr/lib/eclipse_indigo/eclipse</span> to <span style="color: red;">/usr/lib</span>:<br />
<blockquote>sudo rm -r /usr/lib/eclipse<br />
sudo mv /usr/lib/eclipse_indigo/eclipse /usr/lib<br />
sudo rmdir /usr/lib/eclipse_indigo</blockquote></li>
<li style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">Move back (as root) the executable <span style="color: red;">/usr/bin/eclipse</span>:<br />
<blockquote>sudo mv /usr/bin/eclipse.curr /usr/bin/eclipse </blockquote></li>
<li style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">Open as root the file <span style="color: red;">/usr/bin/eclipse </span>and change all occurrences of galileo to indigo.</li>
<li style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">Copy <span style="color: red;">/usr/lib/eclipse/eclipse.ini</span> to <span style="color: red;">/etc</span><br />
<blockquote>sudo rm /etc/eclipse.ini <br />
sudo cp /usr/lib/eclipse/eclipse.ini /etc</blockquote></li>
<li>As root create the file <span style="color: red;">/usr/share/applications/eclipse.desktop</span> to make a new (kde) menu entry:<br />
<blockquote>[Desktop Entry]<br />
Comment[en_US]=<br />
Comment=<br />
Exec=/usr/bin/eclipse<br />
GenericName[en_US]=Eclipse 3.7 (Indigo)<br />
GenericName=Eclipse 3.7 (Indigo)<br />
Icon=/usr/lib/eclipse/icon.xpm<br />
MimeType=<br />
Name[en_US]=eclipse<br />
Name=eclipse<br />
Path=<br />
StartupNotify=true<br />
Terminal=false<br />
TerminalOptions=<br />
Type=Application<br />
X-DBUS-ServiceName=<br />
X-DBUS-StartupType=<br />
X-KDE-SubstituteUID=false<br />
X-KDE-Username=<br />
X-Ubuntu-Gettext-Domain=desktop_kdebase </blockquote>If this entry is placed in "<span style="color: #073763;">Lost & Found</span>" menu category, move it to "<span style="color: #073763;">Development</span>", using the <span style="color: #073763;">KDE Menu Editor</span>.</li>
</ul><br />
<span style="font-size: medium; font-weight: 600;">Relevant Links</span><br />
<ul><li>See <a href="http://crlog.info/2011/06/30/upgrading-eclipse-on-ubuntu-from-3-5-to-3-7-indigo-works-for-other-versions-too/" title="3.5 to 3.7 Configuration">here</a> and <a href="http://ubuntuforums.org/showpost.php?p=10987881&postcount=4" title="eclipse 3.5 to 3.7">here</a>.</li>
</ul>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com8tag:blogger.com,1999:blog-1381625008180270610.post-64972433830443863952011-08-14T15:13:00.034+03:002011-09-29T20:59:21.481+03:00Installation of latest Liferay IDE (using eclipse-postgreSQL+postgis) in (K)ubuntu 11.04 x64<h3>Prerequests</h3><ul><li>Java JRE (ubuntu packages <span style="color: red;">sun-java6-jre </span>or <span style="color: red;">openjdk-6-jre</span>).</li>
<li>Latest eclipse (click <a href="http://foo-gr.blogspot.com/2011/08/installation-of-latest-eclipse-in.html">here</a> for installation instructions)</li>
<li>PostgreSQL 9 (click <a href="http://foo-gr.blogspot.com/2011/08/installation-of-latest-postgis-enabled.html" title="PostrgreSQL (K)Ubuntu x64">here</a> for installation instructions).</li>
</ul><h3>Downloads </h3><ul><li><a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/" title="liferay-portal-tomcat 6.0.6">The latest liferay portal tomcat version </a>(which now is <span style="color: red;">liferay-portal-tomcat-6.0.6-20110225.zip</span>).</li>
<li><a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/" title="liferay-plugins-sdk 6.0.6">The latest liferay plugins sdk</a> (for the time being is <span style="color: red;">liferay-plugins-sdk-6.0.6-20110225.zip</span>).</li>
<li><a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/" title="liferay-portal-sql 6.0.6">The latest liferay portal sql files</a> (currently <span style="color: red;">liferay-portal-sql-6.0.6-20110225.zip</span>)</li>
<li><a href="http://jdbc.postgresql.org/download.html" title="PostgreSQL jdbc driver">The latest PostgreSQL jdbc driver</a> (currently <span style="color: red;">postgresql-9.0-801.jdbc4.jar</span>).</li>
</ul><h3>Installation</h3>Assuming that <br />
<ul><li>liferay portal and plugins sdk will be installed in<span style="color: red;"> home directory </span><span style="color: black;">and</span></li>
<li>downloded files are placed in <span style="color: red;">~/Downloads</span> </li>
</ul>open a terminal and give the commands:<br />
<blockquote>cd<br />
unzip Downloads/liferay-portal-tomcat-6.0.6-20110225.zip<br />
mkdir liferay-plugins-sdk-6.0.6<br />
cd liferay-plugins-sdk-6.0.6<br />
unzip ../Downloads/liferay-plugins-sdk-6.0.6-20110225.zip</blockquote><h3>Problems</h3>For eclipse/Liferay to be able to correctly locate PostgreSql/postgis jdbcs:<br />
<blockquote>cp ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar.1<br />
cp ~/Downloads/postgresql-9.0-801.jdbc4.jar ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/postgresql.jar<br />
sudo cp /opt/PostgreSQL/9.0/PostGIS/java/jdbc/postgis* ~/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext</blockquote><h3>Next Steps</h3>To set PostgreSQL as the default database of Liferay:<br />
<ul><li dir="ltr">Extract the file <span style="color: red;">create-minimal-postgresql.sql</span> from the downloaded <span style="color: red;"> liferay-portal-sql-6.0.6-20110225.zip</span>,</li>
<li dir="ltr">create database<span style="color: red;"> lportal </span>using the command</li>
<blockquote>psql -f create-minimal-postgresql.sql -U <user_name></blockquote><li dir="ltr"> and follow the instructions of <a href="http://www.liferay.com/community/wiki/-/wiki/Main/Database+Configuration#section-Database+Configuration-Liferay+6.0">this link</a> to configure Liferay.</li>
</ul>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com0tag:blogger.com,1999:blog-1381625008180270610.post-21051737714664815532011-08-12T19:58:00.007+03:002011-08-15T19:00:15.023+03:00Installation of the latest (postgis enabled) PostgreSQL in (K)Ubuntu 11.04 x64<div xmlns="http://www.w3.org/1999/xhtml"><span style="font-size: large;"><b>Download</b></span><br />
<a href="http://www.enterprisedb.com/products-services-training/pgdownload">Latest version of PostgreSQL Graphical Installer</a> (for the time being is postgresql-9.0.4-1-linux-x64.bin)<br />
<br />
<span style="font-size: large;"><b>Installation</b></span> <br />
<ul><li>To install PostgreSQL at <span style="color: red;">/opt</span> directory, call the <span style="color: #073763;">Graphical Installer</span>:</li>
<blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">sudo chmod 0755 postgresql-9.0.4-1-linux-x64.bin</span></div><div style="-qt-block-indent: 1;"><span style="color: red;">sudo ./postgresql-9.0.4-1-linux-x64.bin</span></div></blockquote></ul><ul><li>Optionally, install postgis-1.5, using the <span style="color: #073763;">Application Stack Builder</span> before closing <span style="color: #073763;">Graphical Installer</span>. Otherwise, you may install it later, by calling the <span style="color: #073763;">Application Stack Builder</span> entry in your (kde/gnome) menu (after resolving the corresponding problems (see below)).</li>
</ul><br />
<span style="font-size: large;"><b>Configuration </b></span><br />
Edit <span style="color: red;">~/.profile</span> and append the line<br />
<br />
<blockquote><span style="color: red;">source /opt/PostgreSQL/9.0/pg_env.sh</span></blockquote>at the end, to update $PATH and set other env variables (you have to logout/login, for this change to take effect).<br />
<br />
<span style="font-size: large;"><b>Problems</b></span><span style="font-size: large;"> </span><br />
<ul><li>Execution of </li>
<blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">/opt/PostgreSQL/9.0/stackbuilder/bin/stackbuilder </span></div></blockquote><div style="-qt-block-indent: 1;">executable failed, with a number of messages for missing libraries. The following links to (installed) libraries had to be set:</div><blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">sudo ln -sf /usr/lib/x86_64-linux-gnu/libtiff.so.4.3.3 /usr/lib/x86_64-linux-gnu/libtiff.so.3</span></div></blockquote><blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">sudo ln -sf /lib/x86_64-linux-gnu/libexpat.so.1.5.2 /lib/x86_64-linux-gnu/libexpat.so.0</span></div></blockquote><div style="-qt-block-indent: 1;">Depending on your current installation, other links to libraries (or the libraries themselves) may be missing as well. You have to locate those libraries (and if they miss, to install them) and make the corresponding links. </div></ul><ul><li>To be able to run stackbuilder from the (kde) menu entry, edit (as root) the file</li>
<blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">/usr/share/applications/pg-stackbuilder-9_0.desktop</span> </div></blockquote><div style="-qt-block-indent: 1;">and change the line </div><blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">Exec=/opt/PostgreSQL/9.0/scripts/launchstackbuilder.sh </span></div></blockquote><div style="-qt-block-indent: 1;">to </div><blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">Exec=kdesudo /opt/PostgreSQL/9.0/scripts/runstackbuilder.sh</span> </div></blockquote></ul><ul><li>To correct the (postgis related) problem of "$libdir/postgis-1.5.so not found", execute the command:</li>
<blockquote><div style="-qt-block-indent: 1;"><span style="color: red;">sudo ln -sf /opt/PostgreSQL/9.0/lib/postgis-1.5.so /opt/PostgreSQL/9.0/lib/postgresql/postgis-1.5.so</span></div></blockquote></ul></div>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com5tag:blogger.com,1999:blog-1381625008180270610.post-52771399613467480572010-04-01T16:32:00.004+03:002010-04-02T10:27:26.610+03:00Keyboard layout configuration for Lubuntu 10.04 Beta1<div>For a (permanent) usa/greek keyboard configuration, using alt+shift for language switching:</div><div><ul><li>sudo vi /usr/lib/X11/xorg.conf.d/05-evdev.conf</li><li>and modify</li></ul><div></div><div></div><div></div><blockquote><div>Section "InputClass"</div><div> Identifier "evdev keyboard catchall"</div><div> MatchIsKeyboard "on"</div><div> MatchDevicePath "/dev/input/event*"</div><div> Driver "evdev"</div><div>EndSection</div></blockquote><div> to</div><div><div></div><div></div><blockquote><div>Section "InputClass"</div><div> Identifier "evdev keyboard catchall"</div><div> MatchIsKeyboard "on"</div><div> MatchDevicePath "/dev/input/event*"</div><div> Driver "evdev"</div><div><span class="Apple-style-span" style="color:#CC0000;"> Option "XkbLayout" "us,gr"</span></div><div><span class="Apple-style-span" style="color:#CC0000;"> Option "XKbOptions" "grp:alt_shift_toggle"</span></div><div>EndSection</div></blockquote><div>Change <span class="Apple-style-span" style="color:#990000;">gr</span> above to your language symbols, to get the proper keyboard layout.</div><div></div></div></div>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com13tag:blogger.com,1999:blog-1381625008180270610.post-84263249860581294922009-09-22T17:54:00.003+03:002009-09-22T18:02:48.190+03:00How to expand a WinXP virtual disk in Virtual Box(Thanx to user "gushy" in <a href="http://forums.virtualbox.org/viewtopic.php?t=585#wrap">this thread</a>) do the following:<br /><ul><li> Create a new disk using Virtual Disk Manager (in VirtualBox goto File -> Virtual Disk Manager)</li><li> download <a href="http://www.sysresccd.org/Download" class="postlink">System Rescue CD</a></li><li> set your current VM to have the new disk image as it's second hard disk and the System Rescue CD iso file as it's CD</li><li> boot the vm from the CD</li><li> at the command prompt type startx</li><li> when X Windows starts, type gparted in the terminal that is open on screen</li><li> in gparted select the windows partition and choose copy</li><li> select the second hard disk</li><li> right click on the representation of the disk and click paste</li><li> gparted will prompt you for the size of the disk, drag the slider to the max size</li><li> click apply</li><li> wait .......</li><li> when it's done right click on the disk and choose Manage Flags, and select Boot</li><li> exit gparted and power off the VM</li><li> change the VM settings to only have one disk (the new bigger disk) and deselect the iso as the CD.</li><li> boot the VM into your windows install on it's new bigger disk!</li></ul><br /><strong></strong>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com0tag:blogger.com,1999:blog-1381625008180270610.post-30427739216114635592009-05-15T12:18:00.001+03:002009-05-15T12:19:48.077+03:00Word to latex free windows converterfoo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com0tag:blogger.com,1999:blog-1381625008180270610.post-25135053309337426732009-05-09T13:06:00.009+03:002009-09-18T12:30:53.730+03:00Remote login using x11vnc for Hoary (Xubuntu) Server<span style="font-weight: bold;">Installation of x11vnc server (port 5900) to the remote desktop (RD) PC</span> (tested using KRDC)<br /><ul><li>Install x11vnc and set VNC password for security, as it is described <a href="http://foo-gr.blogspot.com/2009/05/remote-login-using-x11vnc-for-jaunty.html">here</a>.<br /></li><li>Enable remote desktop login: open with sudo the file<br /><blockquote>/etc/gdm/gdm.conf</blockquote> find and change the following lines of [xdmcp] section to be:<br /><blockquote>[xdmcp]<br />Enable=true<br />MaxPending=4<br />MaxWait=15<br />DisplaysPerHost=2<br />Port=177<br />Willing=/etc/gdm/Xwilling<br /></blockquote></li><li> Turn on VNC server after each reboot: open with sudo the file <blockquote>/etc/gdm/Init/Default</blockquote> and append the line:<br /><blockquote> /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd<br /></blockquote> before <blockquote>exit 0</blockquote>line. This way you can login to the remote PC, without loosing your login session each time you disconnect your VNC client. Thus, the next time(s) that you will connect with your VNC client again, you will see your RD session (until you logout -or reboot- the remote PC).<br /></li><br /><li>Turn up VNC server after each login: open with sudo the file <blockquote>/etc/gdm/PreSession/Default</blockquote> and append the line:<br /><blockquote> /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd<br /></blockquote> before <blockquote>exit 0</blockquote>line. This is a <a href="http://ubuntuforums.org/showpost.php?p=6132263&postcount=13">workaround</a> to the known problem of gdm, which kills x11vnc server after login. Note however that, in order to login to remote PC using this workaround, you have to connect twice with your VNC client: <ul><li>the first one to give login and passwd and </li><li>the second to use your remote Xubuntu Desktop.</li></ul><br /></li><li>Restart gdm:<blockquote>sudo /etc/init.d/gdm restart</blockquote></li></ul>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com2tag:blogger.com,1999:blog-1381625008180270610.post-76357379183134830032009-05-08T18:27:00.016+03:002009-09-02T12:23:54.750+03:00Remote login using x11vnc for Jaunty Kubuntu<span style="font-weight: bold;">Installation-configuration of x11vnc server (port 5900) to the remote desktop (RD) PC (tested using KRDC)<br /></span><ul><li>Install x11vnc:<blockquote>$sudo apt-get install x11vnc</blockquote></li><li>Set VNC password for security (password is saved by default in ~/.vnc/):<blockquote>$x11vnc -storepasswd</blockquote></li><li>Enable remote desktop login: open with sudo the file<br /><blockquote>/etc/kde4/kdm/kdmrc</blockquote> find and change the following lines of [Xdmcp] section to be:<br /><blockquote>[Xdmcp]<br />#Enable=false<br />KeyFile=/etc/kde4/kdm/kdmkeys<br />Willing=/etc/kde4/kdm/Xwilling<br /></blockquote></li><br /><li> Turn on VNC server after each reboot: open with sudo the file <blockquote>/etc/kde4/kdm/Xsetup</blockquote> and append the line (see also the 4th comment(σχόλια) of "Ed" for a better solution):<br /><blockquote> /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd<br /></blockquote>This way you can login to the remote PC, without loosing your login session each time you disconnect your VNC client. Thus, the next time(s) that you will connect with your VNC client again, you will see your RD session (until you logout -or reboot- the remote PC).<br /></li><br /><li>Restart kdm:<blockquote>sudo /etc/init.d/kdm restart</blockquote> or (better?) reboot remote PC.<br /></li><br /></ul>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com7tag:blogger.com,1999:blog-1381625008180270610.post-59439389933483879902009-02-17T12:21:00.008+02:002009-03-02T13:41:44.564+02:00Wine fonts totally messed up?The <a href="http://www.nakamura-gebiet.de/screenshot_from_2008-12-09_at_14:22:59.png">problem</a> relates to incompatibilities between <a href="http://www.nvidia.com/object/unix.html">Nvidia drivers</a> for linux and card GeForce4 MX440 (and probably others). Solution comes from <a href="http://bbs.archlinux.org/viewtopic.php?id=60565">arch linux</a> geeks.foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com0tag:blogger.com,1999:blog-1381625008180270610.post-42928331518202730282008-07-19T03:31:00.012+03:002009-03-30T14:22:58.587+03:00Visual Studio C++ and MEX 2007b in x64 WinXPTo use VS C++ free compilers with Matlab 2007b MEX in x64 WinXP machines:<br /><ul><li>Install VS C++ free components<br /></li></ul><ol><ol><li>Download vcsetup.exe for <a href="http://www.microsoft.com/express/download/#webInstall">Visual Studio C++ 2008 Express Edition</a></li><li>Run it to install the free Visual Studio C++ components (ignoring the optional ones).</li><li>Download setup.exe of <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&displaylang=en"><span style="font-size:100%;">Windows SDK for Windows Server 2008 and .NET Framework 3.5</span></a></li><li><span style="font-size:100%;">Run it to install Windows SDK.</span></li></ol></ol><ul><li><span style="font-size:100%;">Let Matlab know where Windows SDK resides:</span></li></ul><ol><ol><li><span style="font-size:100%;">Set environment variable <span style="font-style: italic; color: rgb(204, 0, 0);">MSSDK</span> to <span style="color: rgb(204, 0, 0);">C:\Program Files\Microsoft SDKs\Windows\v6.0A</span></span></li><li>Run <span style="color: rgb(204, 0, 0);">cmd</span> and <span style="color: rgb(204, 0, 0);">mex -setup</span> in it (alternatively, open matlab and give <span style="color: rgb(204, 0, 0);">mex -setup</span> in the matlab command prompt).</li></ol><ul><li>Answer <span style="font-weight: bold;">'no'</span> to the suggestion of mex to automatically locate compilers,<br /></li></ul><ul><li>choose <span style="color: rgb(204, 0, 0);">Microsoft Visual C++ 2005</span> in the list that appears,<br /></li><li>answer <span style="font-weight: bold;">'no'</span> to the suggestion for the default path of VS C++ and then,</li><li> give <span style="color: rgb(204, 0, 0);">C:\Program Files\Microsoft SDKs\Windows\v6.0A</span> as the new path for VS C++.</li></ul></ol><ul><li>To compile mex files:<br /></li></ul><span style="font-size:100%;"><span style="font-style: italic;"></span></span><ol><ol><li>Navigate with Win Explorer to <span style="color: rgb(204, 0, 0);">C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin</span> and double click <span style="color: rgb(204, 0, 0);">Visual Studio 2008 x64 Win64 Command Prompt</span><br /></li><li> In that terminal, navigate (using command cd) to the directories where YOUR C/C++ code is located and make the <span style="font-weight: bold; color: rgb(204, 0, 0);">mexw64</span> file(s).<a href="http://www.microsoft.com/express/download/#webInstall"><br /></a></li></ol></ol>foo_grhttp://www.blogger.com/profile/15109575658305650067noreply@blogger.com3