Kurinchi Blogger Scribbles …


Archive for the ‘LINUX’ Category

May 16
2010

Asterisk for Beginner: IAX Server configuration settings

Last updated: May 17th, 2010

In the first article on Asterisk, we have seen the Asterisk installation steps and on the environment setup. In this article, we have give the configuration settings for two files iax.conf and extensions.conf which will be used to direct/receive calls from/to iax2 soft clients
(more…)

May 14
2010

Asterisk Error messages

Last updated: May 15th, 2010

Asterisk Error: Failed to open dev dahdi transcode
> Edit /etc/asterisk/modules.conf and add the line “noload => codec_dahdi.so”

Asterisk Error: No music on hold classes configured disabling music on hold
> Edit /etc/asterisk/modules.conf and make changes not to include res_musiconhold.c by setting “noload => res_musiconhold”

May 12
2010

Unable to connect to remote asterisk (check if /var/run/asterisk/asterisk.ctl exist?)

Last updated: May 15th, 2010

- Check if asterisk.ctl exists
$ touch /var/run/asterisk/asterisk.ctl
$ chmod 777 asterisk.ctl

- Check if asterisk is running
$ /etc/init.d/asterisk restart
$ asterisk -r

May 10
2010

ASTERISK Configuration: for beginners

Last updated: May 13th, 2010

This will be a simple step by step tutorial to help beginners catch up with ASTERISK – an open source tool for voice communication. It is a software installation of PBX connecting even the PSTN and VOIP networks.

Originally developed for Linux, Asterisk now runs on a variety of operating systems including Solaris, Windows and MacOS.

Environment setup

(more…)

May 05
2010

How to move the SSL certificates?

Last updated: May 14th, 2010

Migrating SSL certificates: CPanel, WHM

Possible Scenarios
i) Server load balancing
ii) Moving web sites between servers

Find where the SSL certificates, private keys are installed in the old server and gzip the certs
$ tar -zxcf /tmp/crt.tar.gz /etc/ssl/certs
$ tar -zxcf /tmp/priv.tar.gz /etc/ssl/private

In the new server, extract the certificates and keys to its respective folder location. Edit httpd.conf file and add the following lines

SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/example.com.key
SSLCACertificateFile /etc/ssl/certs/example.com.cabundle
CustomLog /usr/local/apache/domlogs/exampleuser-ssl_log combined

Sample virtual host configuration setting

<VirtualHost xxx.xxx.xxx.xxx:443>
    ServerName subdomain.example.com
    ServerAlias www.subdomain.example.com
    DocumentRoot /home/emaple/public_html
    ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.crt
    SSLCertificateKeyFile /etc/ssl/private/example.com.key
   SSLCACertificateFile /etc/ssl/certs/example.com.cabundle
  CustomLog /usr/local/apache/domlogs/exampleuser-ssl_log combined
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    <Directory "/home/example.com/public_html/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>

    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/ssl/2/exampleuser/example.com/*.conf"
</VirtualHost>

Restart apache
$ /etc/init.d/httpd restart
(or)
$ /sbin/service httpd restart

Note: Once moving the SSL certificates to the new server, you can also use WHM or CPanel to configure the certs.

May 02
2010

ANSWER: Failed to open a secure file transfer session

Last updated: May 10th, 2010

Check for the existence of the file sshd_config (/etc/ssh/sshd_config).

Before editing the file check that path settings for sftp-server
$ locate sftp-server
/usr/libexec/openssh/sftp-server

Check for the existence of following line in sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
(more…)

Apr 05
2010

How to import mysql dump (.gz or .sql) into a database?

Last updated: April 6th, 2010

When moving mysql database from one server to another or, to test that the data backup works as expected we need to import mysql dump file in the testing environment.

Create the database (test-database) in the testing environment and identify the location of the .gz or .sql file.

If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing
$ gunzip mysqldump.sql.gz

This will uncompress the .gz file and will just store mysqldump.sql in the same location.
(more…)

Apr 03
2010

How to Compress, Uncompress to .gz, .bz2?

Last updated: April 6th, 2010

Tar (tape archive) does not compress files. They are used for grouping all files in a folder so that it can be transferred across locations. In order to compress the files, you need to use zip, gzip or bzip2 utilities.

gzip, bzip2 are file compression utilities and gunzip, bunzip2 are file uncompression utilities.

bzip2 compresses files to a smaller size compared to gzip, but it takes longer to compress the files. Bzip2 uses Burrows-Wheeler block sorting text compression algorithm (with Huffman coding) and gzip uses Lempel-Ziv coding. so, a file compressed with one utility cannot be uncompressed with the other utility.
(more…)

Apr 01
2010

Apache: client denied by server configuration error

Last updated: April 1st, 2010

Apache Error log shows the message “Client denied by server configuration” and the user sees “Forbidden Access” when they try to visit a web page.

Solution:

Search for the apache configuration file (httpd.conf or vhosts.conf if you have configured a virtual host). Check for the directory permission set for the document root of the web site in question and do the following changes. (more…)


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict