ps -ef


kill pid



service Daemon_peopler_gcm start

service Daemon_peopler_emailvalidation start



vi /etc/init.d/Daemon_peopler_gcm

vi /etc/init.d/Daemon_peopler_emailvalidation



저작자 표시
신고

Reason for the error

The parent and child processes all share the same database connection. When the first child process exits it will disconnect from the database, which means the same connection all processes are using will be disconnected, causing any further queries to fail.

The solution

The solution is to disconnect from the database before forking the sub processes and then establish a new connection in each process. The fourth parameter also should be passed to the mysql_connect function as "true" to ensure a new link is established; the default is to share an existing connection is the login details are the same.


//fork the process to work in a daemonized environment
file_put_contents($log, 'Status: starting up
', FILE_APPEND);
$pid = pcntl_fork();
if($pid == -1){
  file_put_contents($log, 'Error: could not daemonize process
', FILE_APPEND);
  return 1; //error
}
else if ($pid)
{
  return 0;
}
else{
  $connect = sql_connect($db_host, $db_user, $db_pass, $db_name);
  //the main process
  while(true){
    $result = SendEmailValidation();
    file_put_contents($log, $result, FILE_APPEND);
    sleep(1);
  }//end while
}//end if



http://www.electrictoolbox.com/mysql-connection-php-fork/

저작자 표시
신고

open php with vi

and type:


set fileformat=unix 



Save it

저작자 표시
신고

In vi do

:1,$d

to delete all lines.

The : introduces a command (and moves the cursor to the bottom).
The 1,$ is an indication of which lines the following command (d) should work on. In this case the range from line one to the last line (indicated by $, so you don't need to know the number of lines in the document).
The final d stands for delete the indicated lines.

There is a shorter form (:%d) but I find myself never using it. The :1,$d can be more easily "adapted" to e.g. :4,$-2d leaving only the first 3 and last 2 lines, deleting the rest.

저작자 표시
신고

arp -a

will show you list and you should ip address which is matched with specific mac address (00 11 32 08 d6 2a )

저작자 표시
신고














유용한 Eclipse 단축기

1. 자동 줄 정렬 ctrl + shift + f 

2. 자동 import: ctrl + shift + o

3. 자동완성 : ctrl + space bar

4. 에러시 방법 제시: Ctrl + 1

5. 줄 찾아가기: Ctrl+L

저작자 표시
신고















Refer: http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/


1. Install needed packages (mod_dav_svn and subversion)


yum install mod_dav_svn subversion


2. Modify Subversion config file /etc/httpd/conf.d/subversion.conf

LoadModule dav_svn_module     modules/mod_dav_svn.so

LoadModule authz_svn_module   modules/mod_authz_svn.so

 

<Location /svn>

   DAV svn

   SVNParentPath /var/www/svn

   AuthType Basic

   AuthName "Subversion repositories"

   AuthUserFile /etc/svn-auth-users

   Require valid-user

</Location>


3. Add SVN (Subversion) users

Use following command:

## Create testuser ##

htpasswd -cm /etc/svn-auth-users testuser

New password: 

Re-type new password: 

Adding password for user testuser


4. Create and configure SVN repository

mkdir /var/www/svn

cd /var/www/svn

 

svnadmin create testrepo

chown -R apache.apache testrepo

  

## If you have SELinux enabled (you can check it with "sestatus" command) ##

## then change SELinux security context with chcon command ##

chcon -R -t httpd_sys_content_t /var/www/svn/testrepo


## Following enables commits over http ##

chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo


5. restart httpd

service httpd restart


6. Goto http://localhost/svn/testrepo address and you should see something like following, write username and password:




7. Configure repository

To disable anonymous access and enable access control add following rows to testrepo/conf/svnserve.conf file:

## Disable anonymous access ##

anon-access = none


## Enable access control ##

authz-db = authz



8. Create trunk, branches and tags structure under testrepo

Create “template” directories with following command:

mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}


9.Then import template to project repository using “svn import” command:

svn import -m 'Initial import' /tmp/svn-structure-template/ http://localhost/svn/testrepo/

Adding         /tmp/svn-structure-template/trunk

Adding         /tmp/svn-structure-template/branches

Adding         /tmp/svn-structure-template/tags

 

Committed revision 1.



10. Check results on browser and see testrepo revision 1:



11. auto boot with svn

#

#

svnserve -d -r [svn path]



저작자 표시
신고



















무료버전

http://www.netdrive.net/download.html


설치후 새로운 사이트 만들고

ip, port 등록

id, pass 입력후 연결

새로운 disk가 잡힌다.


NetDrive사용해서 Connect 했는데 아래와 같이 한글이 깨지는 현상이 발생했습니다.

해결책으로는 Advanced 에서 Encoding 방식을 UTF-8로 설정한 후 접속하시면 됩니다. 

저작자 표시
신고















# gnome-session-properties


시작 프로그램 tab --> 추가 버튼

명령어에 원하는 것 입력


ex) virtualbox 자동 실행

/usr/lib/virtualbox/VirtualBox --comment "xpenology01" --startvm "d62f9952-3edb-4ac3-b499-44f8a26f7396"

저작자 표시
신고














# vi /etc/gdm/custom.conf


[daemon]

TimedLoginEnable=false

AutomaticLoginEnable=true

TimeLogin=onlyu

AutomaticLogin=root

TimeLoginDelay=5


AutomaticLogin=[user] 바꿔주면 된다.

저작자 표시
신고

+ Recent posts

티스토리 툴바