Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:linux_migration [2010/08/04 10:52]
smayr
systems:linux_migration [2018/05/02 11:41] (current)
smayr [Test Page]
Line 4: Line 4:
  
 These are the basic steps to perform: These are the basic steps to perform:
 +
 === Setup Operating System === === Setup Operating System ===
  
Line 11: Line 12:
 alias ll='ls -la' alias ll='ls -la'
 </code> </code>
 +
 ==== OpenSUSE ==== ==== OpenSUSE ====
   * Install required packages:   * Install required packages:
Line 91: Line 93:
     * ''joomlausr'' for ''auditiva_joomla15_es'' (Auditiva website, Spanish).     * ''joomlausr'' for ''auditiva_joomla15_es'' (Auditiva website, Spanish).
     * ''joomlausr'' for ''auditiva_joomla15_en'' (Auditiva website, English).     * ''joomlausr'' for ''auditiva_joomla15_en'' (Auditiva website, English).
 +
 +
 === Setup Apache === === Setup Apache ===
  
-  * Test webpage with PHP support: +==== Test Page ==== 
-    * Create ''test.php'' in directory ''/var/www''. It should have this content: <code php><?php phpinfo(); ?></code> +Test webpage with PHP support: 
-    * Point browser to ''http://localhost/test.php'' or ''http://192.168.0.x/test.php'' (where x is the IP address of the new server). +  * Create ''test.php'' in directory ''/var/www''. It should have this content: <code php><?php phpinfo(); ?></code> 
-  Setup virtual hosts for apache: +  * Point browser to ''http://localhost/test.php'' or ''http://192.168.0.x/test.php'' (where x is the IP address of the new server). 
-    Create virtual host for ''audina.net'' Create or edit file ''default'' in ''/etc/apache2/sites-available'': <code>+ 
 +==== Virtual Hosts ==== 
 +Setup virtual hosts for apache
 + 
 +Create virtual host for ''audina.net'' Create or edit file ''default'' in ''/etc/apache2/sites-available'':  
 +<code apache>
 <VirtualHost *:80> <VirtualHost *:80>
         ServerAdmin webmaster@localhost         ServerAdmin webmaster@localhost
Line 141: Line 150:
 </code> </code>
  
-    * Create virtual host for ''auditiva.us'' Create file ''auditiva'' in ''/etc/apache2/sites-available'': <code>+Create virtual host for ''auditiva.us'' Create file ''auditiva'' in ''/etc/apache2/sites-available'':  
 +<code apache>
 <VirtualHost *:80> <VirtualHost *:80>
         ServerAdmin webmaster@localhost         ServerAdmin webmaster@localhost
Line 186: Line 196:
 </VirtualHost> </VirtualHost>
 </code> </code>
-    * Verify that ''AllowOverride None'' is commented out (add a ''#'' in front) for websites to take advantage of ''.htaccess'' overrides. + 
-      * Check that overrides work on these URLs: +Verify that ''AllowOverride None'' is commented out (add a ''#'' in front) for websites to take advantage of ''.htaccess'' overrides. 
-        * http://www.audina.net/techman +    * Check that overrides work on these URLs: 
-        * http://www.audina.net/downloads/audigence +      * http://www.audina.net/techman 
-    Create link to file ''/etc/apache2/sites-available/auditiva'': <code> +      * http://www.audina.net/downloads/audigence 
-cd /etc/apache2/sites-enabled + 
-ln -s ../sites-available/auditiva 001-auditiva+Create link to file ''/etc/apache2/sites-available/auditiva'':  
 +<code bash
 +cd /etc/apache2/sites-enabled 
 +ln -s ../sites-available/auditiva 001-auditiva
 </code> </code>
 +
 === Setup Samba === === Setup Samba ===
  
Line 205: Line 219:
     * To get an smbpasswd-like output, try: <code> % pdbedit -w -L </code>       * To get an smbpasswd-like output, try: <code> % pdbedit -w -L </code>  
     * ''tdbsam'' database file is located in ''/var/lib/samba''     * ''tdbsam'' database file is located in ''/var/lib/samba''
 +
 === Setup Joomla === === Setup Joomla ===
  
Line 298: Line 313:
  
 </code> </code>
 +
 === Setup Subversion === === Setup Subversion ===
 +
 ==== Install and Configure ==== ==== Install and Configure ====
   * Source information: http://odyniec.net/articles/ubuntu-subversion-server   * Source information: http://odyniec.net/articles/ubuntu-subversion-server
Line 413: Line 430:
 % ufw status verbose % ufw status verbose
 </code> </code>
 +
 ==== Restore Repository ==== ==== Restore Repository ====
   * Create repository container directory: <code> % mkdir /data/repos </code>   * Create repository container directory: <code> % mkdir /data/repos </code>
Line 431: Line 449:
   * Load backup into new repository: <code> % svnadmin load /data/repos/myproj1 < /data/backup/repo-myproj1.svn_dump </code>   * Load backup into new repository: <code> % svnadmin load /data/repos/myproj1 < /data/backup/repo-myproj1.svn_dump </code>
   * More details: http://www.petefreitag.com/item/665.cfm   * More details: http://www.petefreitag.com/item/665.cfm
 +
 +
 === Setup IP Address === === Setup IP Address ===
  
   * Setup correct hostname: <code> % hostname <newhostname> </code>   * Setup correct hostname: <code> % hostname <newhostname> </code>
   * Restore IP address to the final one.  Edit file ''/etc/network/interfaces'':<code bash>   * Restore IP address to the final one.  Edit file ''/etc/network/interfaces'':<code bash>
 +#----------------------------------------
 # Configure Loopback device (lo) # Configure Loopback device (lo)
-#auto lo +#---------------------------------------- 
-#iface lo inet loopback+auto lo 
 +iface lo inet loopback
  
 +#----------------------------------------
 # Configure Ethernic NIC (eth0) # Configure Ethernic NIC (eth0)
-auto eth0+#---------------------------------------- 
 +# use dhcp assigned ip address 
 +#auto eth0
 #iface eth0 inet dhcp #iface eth0 inet dhcp
 +
 +# use static ip address
 +auto eth0
 iface eth0 inet static iface eth0 inet static
 address 192.168.0.2 address 192.168.0.2
Line 461: Line 489:
 </code> </code>
   * The option “defaults” puts a link to start the specified service in run levels 2, 3, 4 and 5 (and puts a link to stop the service into 0, 1 and 6).   * The option “defaults” puts a link to start the specified service in run levels 2, 3, 4 and 5 (and puts a link to stop the service into 0, 1 and 6).
 +
 === Setup Firewall === === Setup Firewall ===
  
Line 467: Line 496:
 % ufw status verbose % ufw status verbose
 </code> </code>
-  *  Add rule to open needed ports (web, ssh, samba): <code>+  *  Add rule to open needed ports (web, ssh, samba, subversion): <code>
 % ufw allow to 192.168.0.2  port 80 % ufw allow to 192.168.0.2  port 80
 % ufw allow to 192.168.0.2  port 22 % ufw allow to 192.168.0.2  port 22
-#% ufw allow to 192.168.0.2  port 137/udp from 192.168.0.0/24 
-#% ufw allow to 192.168.0.2  port 138/udp from 192.168.0.0/24 
 % ufw allow to 192.168.0.2  port 139 from 192.168.0.0/24 % ufw allow to 192.168.0.2  port 139 from 192.168.0.0/24
 % ufw allow to 192.168.0.2  port 445 from 192.168.0.0/24 % ufw allow to 192.168.0.2  port 445 from 192.168.0.0/24
 +% ufw allow to 192.168.0.2  port 3690 from 192.168.0.0/24
 </code> or better yet, create a script to run at boot time:<code> </code> or better yet, create a script to run at boot time:<code>
 # turn on ufw # turn on ufw
Line 483: Line 511:
 # allow our ssh port # allow our ssh port
 #ufw allow 5555 #ufw allow 5555
 +#----------------------------
 # local # local
 +#----------------------------
 +# http
 ufw allow to 192.168.0.2  port 80 ufw allow to 192.168.0.2  port 80
 +# ssh
 ufw allow to 192.168.0.2  port 22 ufw allow to 192.168.0.2  port 22
 +# samba
 +#ufw allow to 192.168.0.2  port 137/udp from 192.168.0.0/24
 +#ufw allow to 192.168.0.2  port 138/udp from 192.168.0.0/24
 ufw allow to 192.168.0.2  port 139 from 192.168.0.0/24 ufw allow to 192.168.0.2  port 139 from 192.168.0.0/24
 +#
 ufw allow to 192.168.0.2  port 445 from 192.168.0.0/24 ufw allow to 192.168.0.2  port 445 from 192.168.0.0/24
 +# subversion
 +ufw allow to 192.168.0.2  port 3690 from 192.168.0.0/24
 # deny everything else # deny everything else
 ufw default deny ufw default deny
Line 497: Line 535:
   * Install GUI for ''uwf'' firewall (optional): <code>% apt-get install gufw </code>   * Install GUI for ''uwf'' firewall (optional): <code>% apt-get install gufw </code>
     * It shows up in the GUI under System > Administration > Firewall Configuration.     * It shows up in the GUI under System > Administration > Firewall Configuration.
 +
 +== Ubuntu 14.04 Migration ==
 +
 +=== Patches to Apply After Installation ===
 +Some software packages (eg. [[https://matomo.org|Piwik/Matomo]], Piwigo) generate this error: ''pclzip.lib.php : Missing zlib extensions'' To fix it, add this code to each file using ''gzopen'' (a function deprecated in favor of ''gzopen64'' in Ubuntu 14.04).
 +<code php>
 +<?php
 +
 +/**
 + * On ubuntu in some cases, there is a bug that gzopen does not exist and one must use gzopen64 instead
 + * Credit goes to the piwik team for this.
 + * See more: http://www.thomasmonaco.com/pclzip-lib-php-missing-zlib-extensions/
 + */
 +if (!function_exists('gzopen')
 +    && function_exists('gzopen64')) {
 +    function gzopen($filename , $mode = 'r', $use_include_path = 0 )
 +    {
 +        return gzopen64($filename , $mode, $use_include_path);
 +    }
 +}
 +
 +?>
 +</code>