Blogs

Howto Install KDE 4.0 (Stable) in Ubuntu Gutsy

KDE 4.0 is the innovative Free Software desktop containing lots of applications for every day use as well as for specific purposes.Plasma is a new desktop shell developed for KDE 4, providing an intuitive interface to interact with the desktop and applications.The Konqueror web browser integrates the web with the desktop. The Dolphin file manager, the Okular document reader and the System Settings control center complete the basic desktop set.

Full Story

Easy Drupal maintenance and upgrades

Since Drupal has been coming out with rapid updates, mainly due to security fixes, it's quite cumbersome to have to keep it up to date. However, with the below setup and the script to help with the maintenance, it was a breeze with the last update. The script has been used to upgrade from 5.5 to 5.6 release.

Note: The script does not currently have any checks (extreme alpha stage) and my Drupal installation is not a standard install so usage may vary. Make sure you understand the script prior to running it. Usual disclaimer applies. You will also need root level access to shell to run the script as it is set to change ownership of files and folders using the "chown" command.

My current Drupal install are based on symbolic links for easy maintenance and upgrades. The layout is as below:

/var/www/html, /var/www/html/site_files, /var/www/html/sites are all symbolically linked to the /var/www/drupal-5.x, /var/www/drupal_files, /var/www/drupal_sites respectively where /var/www/html is the web root.

Document Root = /var/www/html            -> /var/www/drupal-5.x
Files Folder  = /var/www/html/site_files -> /var/www/drupal_files
Sites Folder  = /var/www/html/sites      -> /var/www/drupal_sites

Also, any customization to the .htaccess is on top of the default Drupal code. So the script will automatically prepend the data to the upgraded .htaccess file. Since, I also have the gallery module, the .htaccess file is also set to be writable by apache.

Don't forget to set your site in "maintenance mode" with the default theme, and disable all modules prior to the upgrade. Although, I've done some updates with all modules available without any issues. Also, my custom theme resides in the sites folder and stays untouched with the update.

Place the script in "/var/www" (just outside your document root) and run the update via:

# sh ./update_drupal.sh 5.x

Once completed, run update.php to update any changes to the database. Set site back to production mode, re-applying any customization as necessary.

Debian / Ubuntu command notes for packages and service maintenance ...

APT-GET

  • Clean up non-existent data
    # apt-get autoclean
  • Update list
    # apt-get update
  • Install/update a package
    # apt-get install <pkg>
  • review dist-upgrade prior:
    # apt-get -Vsu -o Debug::pkgProblemResolver=yes dist-upgrade
  • Apply updates
    # apt-get -Vu upgrade
  • Upgrade all dependencies
    # apt-get -Vu dist-upgrade
  • Search cache
    # apt-cache search <pkg>
  • Remove and purge packages
    # apt-get --purge remove <pkg>

DPKG

  • Install/Update package
    # dpkg -i <pgk>
  • Check listing of installed packages
    # dpkg -l *<pkg>*
  • file belongs to
    # dpkg --search /path/to/file
  • List of file in package
    #dpkg -L <pkg>
  • Info about package
    # dpkg -s <pkg>

SERVICES

  • Manage services at init levels.
    # sysv-rc-conf
    # update-rc.d

Trac and SVN install / configuration notes...

The below notes is specifically for centos-4.6 :

Installation:

# rpm -ivh  http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
# yum install httpd subversion mod_python mod_dav_svn
# yum --enablerepo=rpmforge install trac

Instantiating svn:

# mkdir /var/www/svn
# svnadmin create /var/www/svn/project

Initial svn import:

# mkdir -p /tmp/newsvn/{trunk,tags,branches}
# svn import /tmp/newsvn file:///var/www/svn/project -m "Initial import"
# chown -R apache /var/www/svn/project
# chmod -R go-rwx /var/www/svn/project

Instantiating trac:

# mkdir /var/www/trac
# trac-admin /var/www/trac/project initenv
# mkdir /var/www/{.python-eggs,passwd}
# htpasswd -c /var/www/passwd/.htpasswd <adminuser>
# touch /var/www/passwd/svnauthz
# chgrp -R apache /var/www/trac/project
# chown -R apache /var/www/trac/project/{attachments,db,log,plugins}
# chown -R apache /var/www/{.python-eggs,passwd}
# chmod -R o-rwx /var/www/{trac/project,.python-eggs,passwd}
# chmod g+w /var/www/trac/project/conf/trac.ini

Install trac plugins:

# wget http://peak.telecommunity.com/dist/ez_setup.py
# python ez_setup.py
# easy_install http://svn.edgewall.com/repos/trac/sandbox/webadmin/
# easy_install http://trac-hacks.org/svn/accountmanagerplugin/0.10
# easy_install http://trac-hacks.org/svn/svnauthzadminplugin/0.10

trac.ini conf setup:

[trac]
default_charset=UTF-8
authz_file = /var/www/passwd/svnauthz

[components]
acct_mgr.admin.accountmanageradminpage = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.web_ui.loginmodule = enabled
trac.web.auth.loginmodule = disabled
webadmin.* = enabled
svnauthz.* = enabled

[account-manager]
password_file = /var/www/passwd/.htpasswd
password_store = HtPasswdStore

Apache trac conf setup:

Alias /trac /var/www/trac
<Location /trac>
        SetHandler mod_python
        PythonInterpreter main_interpreter
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnvParentDir /var/www/trac
        PythonOption TracUriRoot /trac
        SetEnv PYTHON_EGG_CACHE /var/www/.python-eggs
</Location>
#<Location /trac/*/login>
#        AuthType Basic
#        AuthName 'Trac Server'
#        AuthUserFile /var/www/passwd/.htpasswd
#        Require valid-user
#</Location>

Apache subversion conf setup:

<Location /svn>
   DAV svn
   SVNParentPath /var/www/svn

   # Limit write permission to list of valid users.
   # <LimitExcept GET PROPFIND OPTIONS REPORT>
      # Require SSL connection for password protection.
      # SSLRequireSSL

      AuthType Basic
      AuthName 'Authorization Realm'
      # Trac .htpasswd file used so users will be the same for both
      AuthUserFile /var/www/passwd/.htpasswd
      Require valid-user
      AuthzSVNAccessFile /var/www/passwd/svnauthz
   #</LimitExcept>
</Location>

Trac privileges:

# trac-admin /var/www/trac/project permission add admins TRAC_ADMIN
# trac-admin /var/www/trac/project permission add <adminuser> admins
# trac-admin /var/www/trac/projectname permission remove anonymous TICKET_CREATE TICKET_MODIFY etc...
# track-admin /var/www/trac/project permission add devs BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW        \
              MILESTONE_CREATE MILESTONE_VIEW REPORT_CREATE REPORT_MODIFY REPORT_SQL_VIEW REPORT_VIEW  \  
              ROADMAP_VIEW SEARCH_VIEW TICKET_APPEND TICKET_CHGPROP TICKET_CREATE TICKET_MODIFY \
              TICKET_VIEW TIMELINE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_VIEW

Login as the admin user and setup Trac plugins, permissions etc...

ssh on multiple servers Using cluster ssh

Cluster SSH opens terminal windows with connections to specified hosts and an administration console. Any text typed into the administration console is replicated to all other connected and active windows. This tool is intended for, but not limited to, cluster administration where the same configuration or commands must be run on each node within the cluster. Performing these commands all at once via this tool ensures all nodes are kept in sync.

Full Story

Saving Power on Intel Hardware Using Powertop

PowerTOP is a Linux tool that finds the software component(s) that make your laptop use more power than necessary while it is idle. As of Linux kernel version 2.6.21, the kernel no longer has a fixed 1000Hz timer tick. This will (in theory) give a huge power savings because the CPU stays in low power mode for longer periods of time during system idle.

Full Story

Can't locate Sys/Hostname/Long.pm (Resolved)

I was getting the below error in my mail error log files:

spamd[10632]: Can't locate Sys/Hostname/Long.pm in @INC (@
INC contains: ../lib /usr/share/perl5 /etc/perl /usr/local/lib/perl/5.8.7 /usr/l
ocal/share/perl/5.8.7 /usr/lib/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/
local/lib/site_perl) at /usr/share/perl5/Mail/SPF/Query.pm

Apparently a bug in ubuntu dapper, where libmail-spf-query-perl depends on libsys-hostname-long-perl.

Doing an `apt-get install libsys-hostname-long-perl` resolved the issue.

How to setup Apache Tomcat 5.5 on Debian Etch

Apache Tomcat is a web container, or application server developed at the Apache Software Foundation (ASF). Tomcat
implements the servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, providing an environment for Java code to run in cooperation with a web server. It adds tools for configuration and management but can also be configured by editing configuration files that are normally XML-formatted. Tomcat includes its own internal HTTP server.

Full Story

IPBlock - Graphical IP Blocker

iplist allows users with no or basic knowledge of iptables to filter (e.g. to block) network traffic based on (automatically updated) lists. These lists have various formats and are sorted by different categories (e.g. countries,
adware, corporations).

Full Story

FreeNX Server and Client Installation in Debian Etch

FreeNX is a system that allows you to access your desktop from another machine over the internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client.

Full Story

Syndicate content
Comment