Setup FTP Server on Ubuntu

1. Check if FTP service is exists.

2013-10-25_113851

 

2. Install vsftpd

$ sudo apt-get install vsftpd

3. Command line to check your FTP service.

2013-10-25_113929

 

2013-10-25_113948

 

4. The default vsftpd configuration file is /etc/vsftpd.conf. You need to edit this file using text editor such as vim:

2013-10-25_161529

 

5. Uncomment these lines.

2013-10-25_161649

 

2013-10-25_161726

 

2013-10-25_162135

 

6. Type this command.

2013-10-25_161937

 

7. Add new FTP user to this file.

2013-10-25_161855

8. Restart your FTP service.

2013-10-25_161916

 

9. Test FTP connection from other machine.

2013-10-25_162230

 

10. Click to allow access.

2013-10-25_162253

 

11. Tada =)

2013-10-25_162319

Add New CVS Instance on Ubuntu

1. Add new directory.

$ sudo mkdir moa_hrp

2013-10-19_154650

 

2. Initial the directory.

$ sudo cvs -d /var/lib/cvsd/cvsrepo/moa_hrp init

 

3. Check your CVSROOT directory, there is no passwd file.

2013-10-19_154833

 

4. Create a new user.

2013-10-19_154801

 

5. Add new repository to the CVS server.

2013-10-19_155027

 

6. Add this line of code.

2013-10-19_155100

 

7. Restart your CVS service.

2013-10-19_154930

 

8. Try to login.

2013-10-19_154954

 

9. Done.

Install Nagios On Ubuntu 12.04

1) Install Nagios. Type this command line:

2013-09-14_053520

2) It will go through, and ask you about what mail server you want to use:

2013-09-14_053619

3) Choose your type of email configuration.

2013-09-14_053633

4) It will then ask you about the domain name you want to have email sent from. Again, fill that out based upon your needs.

2013-09-14_053648

5) It will ask you what password you want to use.

2013-09-14_053711

6) Confirm your password.

2013-09-14_053726

7) Installing the application.

2013-09-14_053747

8) We need to edit a few files. Start by opening /etc/nagios3/nagios.cfg.  Use this command:

2013-09-14_053839

9) Search for check_external_commands, and turn the check_external_commands=0 into check_external_commands=1

2013-09-14_053821

10) Now, restart apache by running:

2013-09-14_055058

 

11) We need to edit /etc/group. There should be a line like this in there:  nagios:x:131:

Change to this:

2013-09-14_055151

 

12) Now, we need to edit the /var/lib/nagios3/rw files permission with:

2013-09-14_055212

 

13) Again, restart your nagios3 and apache services.

2013-09-14_055256

 

14) If you want to monitor http and disk space, type this command line:

2013-09-14_055314

 

15) Change to this.

2013-09-14_055411

 

16) Do the same thing for this file:

2013-09-14_055432

 

17) Change to this.

2013-09-14_055517

 

18) Yeah!

2013-09-13_055512

19) And you should be good to go! Happy monitoring!

JBoss Seam Projects

seam_icon_large

1. Download JNLP file from this link: [ link ]

2

2. Double click on the JNLP file

1

 

3. Grant permission to run the application

3

 

4. Click Ok button to continue.

4

 

5. Click Next.

5

 

6. .. and Next

6

 

7. Choose ‘I accept the terms of this license agreement’

7

 

8. Select the installation path.

8c

 

9. Select ejb3 to proceed.

9

 

10. Click on Next button.

10

 

11. Enter your configuration name. (default)

11

 

12. Configure datasource.

12

 

13. Enable deployment isolation.

13

 

14. Configure JMX security.

14

 

15. Press Next button to start installation.

15

 

16. Installation progress.

16

 

17. Finish installation process.

17

18. Test sample application.

bookings-on-geronimo

 

19. =)

ProcessMaker: Automated Cron Task


<?php
echo 'Automated cron task to evaluate form information and pass it on';
$dbuser="root";
$dbpass="";
$dbname="wf_workflow"; //the name of the database
$chandle = mysql_connect("127.0.0.1", $dbuser, $dbpass)
 or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found." . $dbuser);
$qty=5;

//These keys need to be retrived from teh content table of the created task.

//automated user id who the waiting task is assigned to
$AUTO_USER_ID = '9859924314d367fe0450f37051224667';
$PRO_UID = '2045593264d367e54325200075086262';
$TAS_WAITING_UID = '2568359374d367e62073f48030834145';
//next task
$TASK_FINSHED_UID = '8718566894d367e65ab0561057703743';
$TASK_FINSHED_NEXT_USER = '00000000000000000000000000000001';

//query out the current task in waiting.

$query = "SELECT app.*, del.* FROM APPLICATION as app inner join APP_DELEGATION as del on (app.APP_UID = del.APP_UID) WHERE app.PRO_UID='".$PRO_UID."' and USR_UID='".$AUTO_USER_ID."' and app.APP_STATUS='TO_DO' and del.TAS_UID='".$TAS_WAITING_UID."' and del.DEL_THREAD_STATUS='OPEN'";

//echo '<br>'.$query.'<br><br>';
 $result = mysql_query($query,$chandle);
 while(($APP = mysql_fetch_array($result)))
 {
 //echo $APP['APP_UID'].'<br>';
 //echo print_r($APP);

$AppData[] = unserialize($APP['APP_DATA']);
 echo print_r($AppData);
 //echo '<br><br><br>';

//update the fact that the script has run
 $query = "update IGNORE APP_DELEGATION SET DEL_INIT_DATE=NOW() where APP_UID='".$APP['APP_UID']."' and TAS_UID ='".$APP['TAS_UID']."' and USR_UID='".$AUTO_USER_ID."' and DEL_THREAD_STATUS='OPEN'";
 //echo $query;
 $result = mysql_query($query,$chandle);
 //echo '<br><br><br>';

if($_GET['complete']=='on')
 {
 //atempt to close the ticket by updating the delegation table
 $query = "update IGNORE APP_DELEGATION SET DEL_THREAD_STATUS='CLOSED',DEL_FINISH_DATE=NOW() where APP_UID='".$APP['APP_UID']."' and TAS_UID ='".$APP['TAS_UID']."' and USR_UID='".$AUTO_USER_ID."' and DEL_THREAD_STATUS='OPEN'";
 //echo $query;
 $result = mysql_query($query,$chandle);

//now insert the new ticket for the next user
 $query="Insert INTO APP_DELEGATION SET APP_UID ='".$APP['APP_UID']."' ,DEL_INDEX ='".($APP['DEL_INDEX']+1)."' ,DEL_PREVIOUS ='".$APP['DEL_INDEX']."' ,PRO_UID ='".$APP['PRO_UID']."' ,TAS_UID='".$TASK_FINSHED_UID."' ,USR_UID='".$TASK_FINSHED_NEXT_USER."' ,DEL_TYPE ='".$APP['DEL_TYPE']."' ,DEL_THREAD='".$APP['DEL_THREAD']."' ,DEL_THREAD_STATUS ='OPEN' ,DEL_PRIORITY ='".$APP['DEL_PRIORITY']."' ,DEL_DELEGATE_DATE ='".$APP['DEL_DELEGATE_DATE']."' ,DEL_INIT_DATE='NULL' ,DEL_TASK_DUE_DATE=DATE_ADD(NOW(),INTERVAL 1 HOUR) ,DEL_FINISH_DATE=NULL, DEL_DURATION ='".$APP['DEL_DURATION']."' ,DEL_QUEUE_DURATION ='".$APP['DEL_QUEUE_DURATION']."' ,DEL_DELAY_DURATION='".$APP['DEL_DELAY_DURATION']."' ,DEL_STARTED='".$APP['DEL_STARTED']."' ,DEL_FINISHED ='".$APP['DEL_FINISHED']."' ,DEL_DELAYED='".$APP['DEL_DELAYED']."' ,DEL_DATA='".$APP['DEL_DATA']."' ,APP_OVERDUE_PERCENTAGE='".$APP['APP_OVERDUE_PERCENTAGE']."'";
 //echo '<br><br><br>'.$query;
 $result = mysql_query($query,$chandle);

//now update the relavent reflection to the right task.
 $query="update APP_THREAD set DEL_INDEX='".($APP['DEL_INDEX']+1)."' WHERE APP_UID='".$APP['APP_UID']."'";
 //echo '<br><br><br>'.$query;
 $result = mysql_query($query,$chandle);
 }
 }

mysql_close($chandle);

?>

MySQL Open Port 3306 on Ubuntu

mysql-databases

1. The default form MySQL Server is to be binding to localhost (127.0.0.1), which means it only accepts connections from local applications.

2. To change it, open up your terminal. Find port 3306.

2013-06-29_094339

 

3. Change to root user and edit the below file.

2013-06-29_094405

4. Place a hash (#) at the beginning of the line.

2013-06-29_094452

 

5. Restart your MySQL Server.

2013-06-29_094521

 

6. Test remote connection.

2013-06-29_094048