Start Services Automatically in Linux

  • add the script to be executed at startup to /etc/rc.d/rc.local
  • if you dont want to follow the symlinks in /etc/rc.d/* directories you can use the graphical interface to configure
  • The following cli commands will also make services start automatically
    • chkconfig snmpd --list
    • chkconfig snmpd on

Create Mysql Trigger

  • Connect to mysql server
    • mysql --password=******
  •  Select Database
    • use [database name] 
  • Create Trigger
    • DELIMITER //
      CREATE TRIGGER add_mediatrix_ports after insert on mediatrix_boxes
      FOR EACH ROW BEGIN
      declare l_loop int default 1;
      while l_loop
      insert into mediatrix_ports (mediatrix_boxid, port, operational, date_created, created_userid, date_modified, modified_userid) VALUES (new.id, l_loop, 1, "2009-07-07", 1, "2009-07-07 16:20:23", 1);
      set l_loop := l_loop + 1;
      end while//
    • DELIMITER //
      create trigger insert_tut_line after insert on tut_slots for each row
      begin
      declare l_loop int default 1;
      while l_loop < 9 do
      INSERT INTO `tut_lines` (tut_slotid, line, date_created, created_userid, date_modified, modified_userid, operational) VALUES (new.id, l_loop, '2007-05-24', 1, '2009-07-07 13:39:32', 1, 1);
      set l_loop := l_loop + 1;
      end while;
      end;

Setting up X-Lite Softphone with Broadsoft

  • Configuring Broadosoft
    • Create a device profile using the "Generic SIP Phone" template
    • Create and assign a user profile to newly created device
  • Configuring X-lite
    • Display Name: Can be anything
    • Username:User profile line/portid
    • Password: authentication password in Broadsoft
    • Authorization username: authentication username in Broadsoft
    • Domain: mars.pbx-change.com
    • Use a proxy: sbc.pbx-change.com

Configuring Mysql to Allow External Connections

Setting up Mysql to allow users to connect externally

1. You have to specifically define how users can connect to the database.

GRANT ALL PRIVILEGES ON dbname.* TO username@'IP' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'127.0.0.1' IDENTIFIED BY 'password';

2. Open port 3306 in firewalls

3.) to grant httpd the access to the network. To allow the httpd dameon to connect to port 3306 when you've told zend to connect to the database externally
setsebool -P httpd_can_network_connect=1

Installing Apache on Fedora

  • Restart Apache
    • apachectl restart
  • Edit httpd.conf
    • nano /etc/httpd/conf/httpd.conf
  • Make sure mod rewrite is loaded
    • uncomment mod_rewrite line in httpd.conf
  • When installing php, use installer and add the following lines to httpd.conf
    • LoadModule php5_module "c:/program files/php/php5apache2_2.dll"
    • AddType application/x-httpd-php .php .php5
    • PHPIniDir "c:/program files/php"

Setting Up Eclipse PDT, Subversion and Zend Framework

  1. Download http://www.eclipse.org/pdt/downloads/ PDT all-in-ones that include eclipse and the PDT, and mylyn plugins
  2. Download and install subclipse by adding http://subclipse.tigris.org/update_1.6.x as an update site for eclipse in eclipse under "Help".. "Install New Software"... "Add"
  3. Download and install Zend Debugger by adding http://downloads.zend.com/pdt as an update site
  4. Download and install mysql workbench
  5. In eclipse create a new PHP project and import all of your files into it. Then right click on the project Team->Share->SVN
  6. For other people to get a working copy in eclipse: File->New->SVN->Check out existing project

SVN Management

Managing SVN Server
svnadmin is a management tool that can be used to manage any svn repository. When using svnadmin it is necessary to include the directory of the target repository.

Use:
svnadmin [cmd]
svn [cmd] appears to be for client actions

Setting Up SVN
  • Install subversion.
  • Put the bin folder (C:\program files\subversion\bin) in the path system variable
  • Decide the location of the repository on disk and make the appropriate folders. (mkdir c:\svn\repository)
  • Create the repository (svnadmin create c:\svn\repository)
  • Open the apache configuration file httpd.conf (c:\apache\conf\httpd.conf)
  • Make sure that the module mod_dav is loaded in httpd.conf and that the module file is also present under modules directory.
  • Add the following to the httpd.conf file (if necessary add it under the appropriate virtual host)

    DAV svn
    SVNPath c:\svn\repository
    AuthType Basic
    AuthName "Name of Authentication popup window"
    AuthUserFile c:\path\to\auth\file probable c:\svn\svn_apache_auth
    Require valid-use
  • Create the auth file
    htpasswd -cmd c:\svn\svn_apache_auth {user-name}
    -c
    option creates a new htpasswd file.
    -m
    encrypts the password with an MD5 algorithm.
    -d
    encrypts the password with a CRYPT algorithm.
    **Note don't use -c after the file has been created when wishing to add additional users
Start the subversion server

Your Subversion client software will need a server with which it can talk. This is the svnserve executable. It's also possible to go directly to your file system and not use a server, but we're going to set this up so that you can access your files from other machines on your network. The -d option tells svnserve to run as a daemon.


    echo "I like PHP";
svnserve -d -r c:\svn-repo



Deleting a Repository
the correct way to delete a repository is just to delete the directory it's stored in.