Tutorials

Tutorials for Linux Users

Installing Bugzilla on an ISPConfig site

These are some notes I had taken down during the installation of Bugzilla on a server with ISPConfig hosting control panel:

Requirements:

# yum install mysql-devel gd-devel libpng-devel libjpeg-devel freetype-devel libdbm-devel
# rpm -e mod_perl #else mod_perl2 does not install.

Create Site:

Site was created via the ISPConfig control panel with "web6_bugs" as the admin user and "web6" as the group.

Install:

$ cd /var/www/web6
$ wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-3.0.tar.gz
$ tar -xvzf buzilla-3.0.tar.gz
$ mv buzilla-3.0/* web
$ ./checksetup.pl --check-modules
# perl -MCPAN -e 'install AppConfig' #had to force install.
# perl -MCPAN -e 'install Bundle::Bugzilla'
# perl -MCPAN -e 'install GD'  #requires libpng-devel, libjpeg-devel, freetype-devel
$ ./checksetup.pl #Edit the localcofig with the correct database settings.
$ ./checksetup.pl #Re-run anytime if needed, specifically if the file permissions are not correct.
$ chgrp -R apache . #Had to make all files belong to the apache group after re-running checksetup.pl .

Apache with mod_perl need the below directives in httpd.conf:

    PerlSwitches -I/var/www/web6/web -w -T
    PerlConfigRequire /var/www/web6/web/mod_perl.pl

Runs a lot faster, but is a memory hog. Suggested to turn off KeepAlive in apache when running mod_perl.

Crontab Entry:

# Bugzilla
5 0 * * * web6_bugs cd /var/www/web6/web; ./collectstats.pl
55 0 * * * web6_bugs cd /var/www/web6/web; ./whineatnews.pl
*/45 * * * * web6_bugs cd /var/www/web6/web; ./whine.pl

Installing APC Cache (alternative to Turck Mmcache/Eaccelerator)

Notes on installing Alternative PHP Cache (APC):

  1. Download and istall:
    $ wget http://pecl.php.net/get/APC-3.0.14.tgz
    $ tar -xvzf APC-3.0.14.tgz
    $ cd APC-3.0.14
    $ phpize
    $ ./configure --enable-apc
    $ make
    # make install
  2. Add the below lines to the php.ini:
      extension=/path/to/apc.so
      apc.enabled=1
      apc.shm_segments=1
      apc.optimization=0
      apc.shm_size=128
      apc.ttl=7200
      apc.user_ttl=7200
      apc.num_files_hint=1024
      apc.mmap_file_mask=/tmp/apc.XXXXXX
      apc.enable_cli=1
  3. Restart apache:
    # service httpd restart
  4. Check phpinfo() to see if APC is enabled.
  5. Copy the "apc.php" admin file in the source directory to a password protected web site directory. Edit "apc.php" top line to change password to something different from default.

Network File System (NFS) Server and Client Configuration in Debian

NFS was developed at a time when we weren’t able to share our drives like we are able to today - in the Windows environment. It offers the ability to share the hard disk space of a big server with many smaller clients. Again, this is a client/server environment. While this seems like a standard service to offer, it was not always like this. In the past, clients and servers were unable to share their disk space.

Full Story

Ubuntu Network Configuration Using Command Line

The basics for any network based on *nix hosts is the Transport Control Protocol/ Internet Protocol (TCP/IP) combination of three protocols. This combination consists of the Internet Protocol (IP),Transport Control Protocol (TCP), and Universal Datagram Protocol (UDP).

Full Story

Disk ARchive (Backup and Restore) using dar and kdar(dar Frontend)

Dar is a shell command that makes backup of a directory tree and files. Its features include splitting archives over several files, CDs, ZIPs, or floppies, compression, full or differential backups, strong encryption, proper saving and restoration of hard links and extended attributes, remote backup using pipes and external command (such as ssh), and rearrangement of the “slices” of an existing archive. It can now run commands between slices, encrypt archives, and quickly retrieve individual files from differential and full backups.

Extract individual files from an RPM

To extract an individual file from an rpm package without installing the rpm:

  1. Use rpm2cpio or rpm -qpl to list files and full paths in the package:
    $ rpm2cpio <package_name> | cpio -t

  2. Use rpm2cpio to extract a file. Run this command from /tmp or elsewhere in order to avoid overwriting any current system files.
    This creates the full path in the current directory and extracts the file specified.
    $ rpm2cpio <package_name> | cpio -iv --make-directories <full-file-path>

  3. To extract everything to the current directory:
    $ rpm2cpio <package_name> | cpio -ivd

Debian Networking Tutorial for Beginners and advanced users

This is detailed step step debian networking tutorial for Beginners and advanced users.This includes Configuring your network using GUI,Command line,using ifconfig with examples and troubleshooting your network tips.

Read Full article here

Tab pages in vim

Window tabs are everywhere and you will find this in the curret version of vim too, which as of this writing is 7.0.042-0.fc5 on fedora-core-5.

Below are notes on how you can quickly navigate between open tabs:

  • Open several fies for editing in seperate tab pages:
    $ vi -p file1 file2 file3...
    
  • Goto next tab:
    gt
    

    or

    :tabn
    
  • Goto previous tab:
    gT
    

    or

    :tabp
    
  • Got to a numbered tab where "#" is a number:
    #gt
    

    or

    :#tabn
    
  • Rewind to the first tab:
    :tabr
    
  • Open new tab page. Optionally you can provide a filename:
    :tabnew [filename]
    
  • Edit an existing file:
    :tabe {filename} 
    
  • Split the tab page:
    :tab split
    
  • Close all other tab pages:
    :tabo[!]
    
  • Close current tab page:
    :tabc[!]
    
  • To get help using tabpages:
    :tab help tabpages
    

See other related posts on vi.

Install .rpm Files in Debian and Ubuntu

Some time you might find some applications are having only .rpm files but you want a .deb package for your debian,Ubuntu and other debian derived ditributions.If you can’t find .deb debian package in any of the debian,ubuntu repositories or elsewhere, you can use the alien package converter to install the .rpm file.

Read Full article here

Running Internet Explorer in Debian and ubuntu Linux

No clicks needed. No boring setup processes. No Wine complications. Just one easy script and you’ll get three IE versions to test your Sites. And it’s free and open source.This may be very helpful for software developers and web developers to test their applications.

Read Full article here

Comment