참고: https://www.digitalocean.com/community/tutorials/how-to-install-openvpn-access-server-on-ubuntu-12-04


참고: https://docs.openvpn.net/access-server/


Software Packages


https://openvpn.net/index.php/access-server/download-openvpn-as-sw/113.html?osfamily=Ubuntu


Installing OpenVPN Acess Server


Let's begin by logging in as the root user. From here, download the OpenVPN AS package:


sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.amd_64.deb


The above link is for 64-bit cloud servers since that is what we've decided to use. If by any chance you're using a 32-bit version, the download link would be:


sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.i386.deb


To install OpenVPN AS, enter the following command:


dpkg -i openvpn-as-2.0.7-Ubuntu12.amd_64.deb 


If you are using a 32-bit cloud server, enter the following command instead:


dpkg -i openvpn-as-2.0.7-Ubuntu12.i386.deb


That's it. OpenVPN AS is now installed. However, there are still some things left to do before we can use it. During the installation, OpenVPN has created a default admin user called 'openvpn'. We need to set a password for 'openvpn'. To do that, enter the following command:


sudo passwd openvpn


You'll be prompted to enter your desired password. Make sure your password is secure.


Administration and Client Software Setup


OpenVPN AS web interfaces can be found at:


Admin  UI: https://YourIpAddress:943/admin

Client UI: https://YourIPAddress:943/


Replace "YourIPAddress" with your actual cloud server's IP address. Then, head over to the Client UI to use the access server. You'll see a big bad security warning. But don't be alarmed, it is perfectly okay since we've self-signed our server's SSL. Ignore the warning and click Ok/Proceed and you'll be prompted for username and password. Enter 'openvpn' as the username and the password should be what you've set for 'openvpn' before. 


설정결과 설정파일 위치


/etc/init.d/openvpnas


사용자 account 추가


참고: https://openvpn.net/index.php/access-server/docs/admin-guides/216-how-to-add-users-to-your-openvpn-access-server.html


sudo

adduser examleuser

passwd exampleuser


If you would like to set OpenVPN-AS Specific User Permissions; for example: Administrator, AutoLogin, VPN IP Address etc you will need to login to the OpenVPN-AS Admin UI (https://x.x.x.x:943/admin) with an Administrator account and navigate over to the User Permissions page:


Using DD-WRT with OpenVPN Access Server


참고: https://docs.openvpn.net/frequently-asked-questions/using-dd-wrt-with-openvpn-access-server/


Creating and Downloading the Autologin Profile


To create and download the autologin profile for your DD-WRT router, visit the User Permissions area, create an appropriate username for the DD-WRT OpenVPN client, and then check the Allow Auto-login checkbox. Click the Update Running Server button to make sure the changes take effect.



TLS Cipher 

AES-256 SHA 로 설정 한 후 Status의 OpenVPN Log 에서 TLS plain text error (?) 가 있어서 AES-128 SHA 로 수정함

Posted by fermi

댓글을 달아 주세요

Step 1. Install squid

apt-get install squid


Step 2. Configuration

cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original   # 일단 설정백업


squid.conf 수정


Authentication

auth_param basic program /usr/lib/squid3/basic_pam_auth    # basic_pam_auth 이용

auth_param basic children 5 startup=5 idle=1

auth_param basic realm Squid proxy-caching web server

auth_param basic credentialsttl 2 hours

basic_pam_auth 를 이용하면 unix 시스템 어카운트를 그대로 이용한다.


Defining an Access List

acl pam proxy_auth REQUIRED

pam 이라는 access list 를 정의

acl SSL_ports port 443 가 시작되는 부분 앞에 적용


Allowing Access List

http_access allow pam

위에서 정의한 pam 의 access 를 허용

http_access deny !Safe_ports 가 시작되는 부분 앞에 적용


Step 4. Permission

chmod u+s /usr/lib/squid3/basic_pam_auth

시스템 어카운트로 로그인이 안되면 permission 문제일 가능성이 큼

basic_pam_auth 의 permission 에 s 를 추가하여 아래와 같도록 변경

-rwsr-xr-x  1 root root 14320 Feb 17 22:21 basic_pam_auth


Step 5. Restart

sudo service squid3 restart                                      # 재시작


Step 6. Client 설정
기본 포트번호는 3128


Posted by fermi

댓글을 달아 주세요

Ubuntu Software Center 에서
- Edit 메뉴 > Software Sources 선택
- Other Software 탭에서 Add 버튼 클릭 후
- ppa:synapse-core/ppa 입력 후 Add Source 버튼 클릭
- 완료후 Synapse 검색하여 설치

명령어를 사용하여 설치할 수도 있다.
sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update
sudo apt-get install synapse

참고: http://www.webupd8.org/2011/02/synapse-launcher-024-released-with-new.html
Posted by fermi

댓글을 달아 주세요

/opt/alfresco-3.4.1/mysql/bin/mysql --user=root -p

mysql>show databases;
mysql>use alfresco;
mysql>show tables;
mysql>show columns from tablename;

<?php

$connect = mysql_connect("127.0.0.1:3306", "root", "censamci") or
         die("Could not connect: " . mysql_error());
mysql_select_db("alfresco");
$query = "select content_url from alf_content_url where id = (select content_url_id from alf_content_data where id = (select long_value from alf_node_properties where long_value != 0 and node_id = (select id from alf_node where uuid = '".$node->id."')))";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $content_url = $row["content_url"];
}
mysql_free_result($result);
mysql_close($connect);

$content_path = str_replace("store://", "/opt/alfresco-3.4.a/alf_data/contentstore/", $content_url);

?>
Posted by fermi

댓글을 달아 주세요

1. Alfresco CIFS 활성화

/opt/alfresco-3.4.a/tomcat/shared/classes/alfresco-global.properties

cifs.enabled=true
cifs.serverName=Alfresco
cifs.domain=WORKGROUP

(참고: http://wiki.alfresco.com/wiki/File_Server_Subsystem#Java-based_SMB)


2. Samba 와 함께 사용

Alfresco CIFS 와 Samba 를 각각 다른 IP로 사용

Ubuntu Software Center 에서 smb 설치, GUI 관리툴 Samba 도 설치
설치 후 Administration > Samba 에서 공유 추가

VM의 가상 NIC를 2개로 설정 (각각 eth0, eth1)
/opt/alfresco-3.4.a/tomcat/shared/classes/alfresco-global.properties 에서
cifs.bindto=192.168.0.74

/etc/samba/smb.conf 에서
interfaces = 192.168.0.72/24
bind interfaces only = yes

(참고: https://help.ubuntu.com/community/Samba/SambaServerGuide)


3. Samba 시작이 안 될 경우

DHCP 에서 받아오는 IP address 가 smb.conf 에서 설정한 IP address 와 동일한지 확인

재시작: sudo /etc/init.d/smbd reload
안되면: service smbd restart

4. Samba 와 Alfresco 재시작

/opt/alfresco-3.4.a/tomcat/temp/catalina.pid (재시작이 안될 경우 pid 파일 확인)
/opt/alfresco-3.4.a/alfresco.sh start|stop|resrart|status
service smbd start|stop|restart
Posted by fermi

댓글을 달아 주세요

참고문헌: 
http://wiki.alfresco.com/wiki/Alfresco_PHP_Library_Installation_Instructions
http://wiki.alfresco.com/wiki/PHP_SDK

1. Alfresco Community Edition 설치
http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco
alfresco-community-3.4.b-installer-linux-x32.bin (32-bit Linux Installer)
alfresco-community-3.4.b-installer-linux-x64.bin (64-bit Linux Installer)
다운로드 후 permission 변경 (chmod +x) 후 파일 실행하면 GUI 기반의 설치 진행
참고로, mysql, tomcat 등이 모두 통합된 것이므로 Ubuntu에 mysql, tomcat 등을 설치하지 말고 clean install된 Ubuntu에서 작업하는 것을 추천
(설치되는 경로는 /opt/alfresco-3.4.a)

2. Alfresco PHP Library 설치 준비
http://wiki.alfresco.com/wiki/Alfresco_PHP_Library_Installation_Instructions
Ubuntu Software Center 에서 다음 package 설치
- php5
- php5-mysql
- apache2
- subversion (검색어를 svn 으로 입력해야 나옴)
설치 후 php -m 명령어로 soap, socket, mysql 모듈이 나오는지 확인

2. Alfresco PHP Library 다운로드
http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment
Subversion check out
svn co svn://svn.alfresco.com/alfresco/HEAD/root/modules/php-sdk/source/php/remote
다운 받은 /remote 디렉토리를 원하는 위치에 복사 (예: /opt/alfresco-3.4.a/php-sdk/source/php/remote)

3. php.ini 수정
/etc/php5/apache2/php.ini
include_path="/opt/alfresco-3.4.a/php-sdk/source/php/remote" 추가

4. Apache conf 수정
/etc/apache2/apache2.conf 는 /etc/apache2/sites-enabled 를 자동으로 포함하므로
/etc/apache2/site-enabled/alfresco 파일을 만들고 다음 내용을 작성

Alias /alfresco "/opt/alfresco-3.4.a/php-sdk/source/php/remote"

<Directory "/opt/alfresco-3.4.a/php-sdk/source/php/remote">
   Options Indexes MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>

5. Apache 재시작
/etc/init.d/apache2 restart

6. Sample script 테스트
http://localhost/alfresco/Examples/QueryExecuter/queryExecuter.php
http://localhost/alfresco/Examples/SimpleBrowse/index.php
를 확인

7. PHP API Tutotial
http://wiki.alfresco.com/wiki/PHP_API_Tutorials
Posted by fermi

댓글을 달아 주세요


1. php.ini 위치
/etc/php5/apache2/php.ini

2. Apache control script 위치
/etc/init.d/apache2 stop|start|restart

3. Apache conf 위치
/etc/apache2/apache2.conf

4. Environment variables
/etc/environment

5. Reload environment variables
source /etc/environment

6. JDK 위치
/usr/lib/jvm/default-java

7. Tomcat 위치
/usr/share/tomcat6

8. 한글 입력기 설치
System > Administration > Language Support > Install / Remove Languages > Korean
Keyboard input method system: ibus 선택
System > Preferences > Keyboard Input Methods > Input Method > Korean 추가

9. 나눔글꼴 설치
https://launchpad.net/~suapapa/+archive/ubuntukofonts

Ubuntu Software Center 에서 소스 추가 (ex: Ubuntu 10.04)
deb http://ppa.launchpad.net/suapapa/ubuntukofonts/ubuntu lucid main
deb-src http://ppa.launchpad.net/suapapa/ubuntukofonts/ubuntu lucid main

Ubuntu Software Center 에서 ttf-nanum 패키지 설치

10. tofromdos
http://forums.alfresco.com/en/viewtopic.php?f=8&t=27429

tomcat 오류시 /opt/alfresco-3.4.a/tomcat/logs/catalina.out 확인
'^M' 문자열이 로그파일에 있을 경우 설정 파일에 '^M'기호가 dos 형식의 파일 변환 문제

Ubuntu Sofrware Center 에서 tofrodos 설치
/opt/alfresco-3.4.a/java/jre/lib/i386# fromdos jvm.cfg
/opt/alfresco-3.4.a/tomcat/temp/catalina.pid 삭제
/opt/alfresco-3.4.a/alfresco.sh start 로 tomcat 시작

11. Alfresco control script
/opt/alfresco-3.4.a/alfresco.sh start|stop|status

12. Samba control
sudo service smbd restart|start|stop
sudo /etc/init.d/smbd reload
https://help.ubuntu.com/community/Samba/SambaServerGuide

13. Samba Log 위치
/var/log/samba
Posted by fermi

댓글을 달아 주세요