Blogs

Setup CUPS (Common UNIX Printing System) Server and Client in Debian

The Common UNIX Printing SystemTM, or CUPS, is the software you use to print from applications like the web browser you are using to read this page. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.

Full Story

Mount a remote file system through ssh Using sshfs

If you want to access a remote file system through ssh you need to install sshfs.sshfs is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there’s nothing to do. On the client side mounting the file system is as easy as logging into the server with ssh.

Full Story

Settingup an FTP Server on Ubuntu with ProFTPD

ProFTPD is a proven, high-performance, scalable FTP server written from scratch, with a focus toward simplicity, security,and ease of configuration. Naturally, ProFTPD powers some of the largest sites on the Internet. It features a very Apache-like configuration syntax, modules, and a highly customizable server infrastructure, including support for multiple ‘virtual’ FTP servers, anonymous FTP, and permission-based directory visibility.

Full Story

nsis rpm for redhat 4 (update 5)

Recently built an rpm for a client that needed to install nsis-2.29 on several redhat boxes. nsis-2.28 for centos/fedora is readily available at repo.calcforge.org .

I downloaded the centos source rpm and rebuilt it for redhat4 as described below:

PHP4 (dso) and PHP5 (fcgi) with apache2 on CentOS-4.5

I've had php4 running with apache2 for a while now and wanted to get php5 also simultaneously running. There are other ways to do this, but I opted with getting php5 to run as fastcgi and keep php4 as apache2 module so they can co-exist together.

This was done on CentOS release 4.5 with ISPConfig Control Panel on a dedicated hosting scenario. If you're looking to share the server with others then you might want to set up with suphp/SuExec for security purposes.

Howto Boot debian in text mode instead of graphical mode (GUI)

You can prevent automatic running of the GUI when you boot your debian machine by disabling your login manager be it KDM, GDM or XDM from running at boot time. To disable the login manager from automatically running at boot up.

Full Story

Ubuntu Linux + Apache2 + Virtual Hosts + Syslog Server

Central Log Management System is a simple web based logging system which allows logging all syslog messages from various Network Devices, Unix, Linux, Solaris and Windows Servers. This allows the visibility of logs from all these devices in one single interface.

Full Story

Upgrading php on DirectAdmin Servers

Download the source tar.gz file from php.net and place it in "/usr/local/directadmin/customapache"

Edit the "/usr/local/directadmin/customapache/build" file and change the version of php to the version that was downloaded.

Then run:

# cd /usr/local/directadmin/customapache/
# ./build clean
# ./build update
# ./build all

Restart apache when finished.

Sending files as mail attachments via the shell

This article shows how to send e-mails from a shell script, including file attachments. It lists different ways (uuencode, MIME), and explains the advantages and disadvantages of each.

There are other great articles and tips on shell scripts at the site!!

Drupal-4.7.7 Upgrade Notes...

I run the site on the open-source Drupal CMS and recently updated to the latest 4.7.7 version. The site has quite a few customizations and is not a standard install.

The html document root is a symbolic link to the actual drupal gunzipped folder and all other relevant custom modules are also just symbolically linked from the modules folder to keep the updates as simple as possible.

I also use the "bluemarine" theme which has been customized and named as "linuxweblog", so updates don't necessarily override my custom theme.

Pre-Update Preparation:

  1. Backup database and site files.
  2. Login to website as the administrator.
  3. Disable the "Tag Cloud" block as it has some custom php.

Update:

  1. `cd /var/www/`
  2. Download from http://drupal.org/project/releases
  3. Untar the gzip package.
  4. `rm html` -- remove the symbolic link.
  5. `ln -s drupal-* html` -- link to the newly extracted folder.
  6. `cd html`
  7. Edit the "sites/default/settings.php" file
    • Add the correct database, username and password to $db_url
    • Edit the $base_url without trailing slash to http://www.linuxweblog.com
  8. Go to linuxweblog.com/update.php and run the update.

Post-Update Customizations

  1. `cp -a themes/bluemarine themes/linuxweblog
  2. Copy or merge node.tpl.php, page.tpl.php and style.css to the linuxweblog theme folder.
  3. Merge .htaccess file and bring over the old customizations.
  4. `cp -a ../drupal-old-*/{robots.txt,favicon.ico} .`
  5. `ln -s ../site_files/ site_files` -- create the symbolic links to where the cache and other static files are placed.
  6. `ln -s site_files/cache/ cache` -- create the link to the cache.
  7. `ln -s ../../drupal_contribs modules/custom_mods` -- create the link to the custom modules.
  8. Enable the "Tag Cloud" block.
  9. Re-apply the google search hack to the "search.module" .

Security:

  1. `cd /var/www/`
  2. Chown -R user:group drupal-*
  3. Set the directory permissions: `find . -type d -exec chmod 755 {} \;`
  4. Set the file permissions: `find . -type f -exec chmod 644 {} \;`
  5. `chmod 640 sites/default/settings.php`
  6. `chgrp apache sites/default/settings.php`
Comment