### Run eXperDB Enterprise Installer Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-2 Execute the installer script on the Management server to begin the Enterprise Edition setup. Follow the prompts to choose installation options. ```bash $ ./eXperDB-Enterprise-Installer-cloud.sh $ ... $ Install Product choice(1~2): [2] ``` -------------------------------- ### Player Initialization and Playback Source: https://guide-gov.ncloud-docs.com/docs/vpe-web Example of how to initialize a player and start playback. ```APIDOC let player = new ncplayer('myElement', { playlist: [ { file:"http://example.com/myVideo.mp4", poster:"http://example.com/myVideoThumb.png" } ] }); player.play(); ``` -------------------------------- ### Install eXperDB Agent Setup Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-2 Run the agent setup script on the eXperDB server to enable control via the Management console. This is required for Enterprise Edition. ```bash sh /experdb/app/eXperDB-Management/setup-agent.sh ``` -------------------------------- ### Install and Start MySQL Server (CentOS 7.x - ncloud user) Source: https://guide-gov.ncloud-docs.com/docs/clouddbformysql-start-classic Installs and starts the MySQL server as the 'ncloud' user on CentOS 7.x. This command is typically used when logged in as the ncloud user. ```bash [ncloud@localhost ~]$ sudo yum -y install mysql mysql-server [ncloud@localhost ~]$ sudo systemctl start mysqld ``` -------------------------------- ### Start Kafka Server Source: https://guide-gov.ncloud-docs.com/docs/hadoop-vpc-use-ex15 Starts the Kafka server in daemon mode using the specified server properties file. Ensure you are in the Kafka installation directory. ```bash [root@s17e27e0cf6c ~ ]# cd kafka_2.12-2.4.0 [root@s17e27e0cf6c kafka_2.12-2.4.0]# ./bin/kafka-server-start.sh -daemon config/server.properties ``` -------------------------------- ### Download and Install Agent for Classic Windows VM Source: https://guide-gov.ncloud-docs.com/docs/cloudinsight-faq Steps to install the agent on a Classic environment Windows VM. Navigate to the installation path, download the package, unzip it, and run the installation batch file. ```batch cd C:\Program Files(x86)\NBP curl https://real-repo.nsight.gov-ncloud.com/agent_controller_windows_ncp.zip -O unzip agent_controller_windows_ncp.zip agent_controller_windows\install_agent.bat gov-classic ``` -------------------------------- ### Download and Install Agent for Classic Windows Bare Metal Source: https://guide-gov.ncloud-docs.com/docs/cloudinsight-faq Steps to install the agent on a Classic environment Windows Bare Metal server. Navigate to the installation path, download the package, unzip it, and run the installation batch file. ```batch cd C:\Program Files(x86)\NBP curl https://real-repo.nsight.gov-ncloud.com/agent_controller_windows_gov_bm.zip -O unzip agent_controller_windows_gov_bm.zip agent_controller_windows\install_agent.bat classic ``` -------------------------------- ### Install and Start nscd Service Source: https://guide-gov.ncloud-docs.com/docs/globaldns-troubleshoot-common Install the nscd package and start the service on Linux to enable DNS caching for faster host lookups. ```bash yum install nscd service nscd start ``` -------------------------------- ### Tibero Multi-Instance Setup Steps Source: https://guide-gov.ncloud-docs.com/docs/tibero-tibero-1-2 Follow these steps to add a new Tibero database instance. Ensure you have a good understanding of Tibero databases before proceeding. Refer to the Tibero online manual for Unix environment specifics. ```bash (1) su - tibero (2) export TB_SID=[새로운 TB_SID] > export TB_SID=tibero2 (3) $TB_HOME/config/gentip.sh (4) tbcfgv or vi $TB_HOME/config/$TB_SID.tip > DB_NAME=tibero2 > LISTENER_PORT=9629 (5) tbcliv or vi $TB_HOME/client/config/tbdsn.tbr 리스너 추가 > tibero2=( > (INSTANCE=(HOST=localhost) > (PORT=9000) > (DB_NAME=tibero) > ) > ) (6) tbboot nomount (7) tbsql sys/tibero (8) SQL> Database Create 쿼리 [ Tibero 온라인 매뉴얼 ] - [ Tibero 설치안내서 ] - [ 3.3. 수동 설치 ] - [ 3.3.2. Unix 환경 ] - [ 7 ] (9) tbboot > Listener port = 9629 > Tibero 6 > TmaxData Corporation Copyright (c) 2008-. All rights reserved. > Tibero instance started up (NORMAL mode). (10) $TB_HOME/scripts/system.sh -p1 tibero -p1 syscat -a1 y -a2 y -a3 y -a4 y > … > Done. ``` -------------------------------- ### Check Tibero Installation Log Source: https://guide-gov.ncloud-docs.com/docs/tibero-tibero-1-1 Access the installation log file to review any errors or details during the Tibero setup. ```bash $ vi /root/.dbset.log ``` -------------------------------- ### Example Service Output Source: https://guide-gov.ncloud-docs.com/docs/k8s-k8suse-loadbalancer This is an example output from the 'kubectl get svc' command, showing the external IP assigned to the 'example-service'. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE example-service LoadBalancer 172.16.101.104 10.39.10.118 8765:30365/TCP 2m11s ``` -------------------------------- ### Configure and Play Video Player with Options Source: https://guide-gov.ncloud-docs.com/docs/vpe-ios Set up the player view, initialize the SDK with a license key, and play video content using provided player options. Ensure the license key is obtained from the Naver Cloud Platform console. ```swift class player:NCPlayerView{} class ViewController: UIViewController, NCPlayerDelegate { @IBOutlet weak var playerView: player? } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) // SDK 초기화 //licenseKey = access_key let licenseKey = "{access_key}" // 플레이어 옵션(콘솔에서 만들어진 스크립트 코드 사용) let playerOptions = """ { "playlist":[ { "file":"https://CDN도메인/example_video_01.mp4", "poster":"https://CDN도메인/example_video_01.png", } ], "autostart":true, } " NCPlayer.shared.initialize(licenseKey: licenseKey) NCPlayer.shared.delegate = self // 실행 playerView?.play(playerOptions) } ``` -------------------------------- ### Start Flume Agent Source: https://guide-gov.ncloud-docs.com/docs/hadoop-vpc-use-ex8 This command starts a Flume agent with the specified configuration. Navigate to the Flume installation directory before running this command. ```bash cd ~/apps/flume/ ./bin/flume-ng agent --conf ./conf/ -f conf/flume.conf -Dflume.root.logger=DEBUG,console -n fooAgent ``` -------------------------------- ### Start eXperMON Script Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-1 Navigate to the eXperMON directory and execute the script to launch the tool for database management. ```bash $ cd /experdb/app/postgres/etc $ ./eXpermon.sh ``` -------------------------------- ### Install Python Requests Module Source: https://guide-gov.ncloud-docs.com/docs/hadoop-chadoop-use-ex9 Install the 'requests' Python module using yum and pip. This is a prerequisite for running the Spark example code. ```bash $ sudo yum install -y epel-release $ sudo yum install -y python-pip $ sudo pip install requests ``` -------------------------------- ### Install Apache, PHP, and MySQL Libraries Source: https://guide-gov.ncloud-docs.com/docs/clouddbformysql-external-vpc Install essential packages for running phpMyAdmin on an application server. Ensure these are installed before proceeding with further configuration. ```bash sudo dnf -y install httpd php mysql php-mysqlnd ``` -------------------------------- ### Start Webshell Behavior Detector Agent Source: https://guide-gov.ncloud-docs.com/docs/wbd-wbdtroubleshoot-common Use this command to start the agent if it was installed before the detection target was registered. Ensure you run this with root privileges. ```bash # Option 1: Re-run the agent installation script # This will skip the installation and start the agent. # Option 2: Manually start the agent /opt/nbp/wbd/wbd_agent -s start ``` -------------------------------- ### Configure eXperDB Installation Paths Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-2 Set the root password, eXperDB home path, data path, and service port during installation. Pressing Enter accepts default values. ```bash $ Please enter the root password to install system packages. $ Root Password : [root 비밀번호 입력] ===================== Installing eXperDB Platform ======================= $ eXperDB Home path [ /experdb ] : (Enter 입력 시, 기본 설정값으로 생성) $ eXperDB Data path [ /experdata/data ] : (Enter 입력 시, 기본 설정값으로 생성) $ eXperDB Service Port [5432] : (Enter 입력 시, 기본 설정값으로 생성) ``` -------------------------------- ### Run eXperDB Enterprise Installer Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-2 Execute the eXperDB Enterprise installer script. This is the initial step after gaining root access and setting passwords. ```bash $ ./eXperDB-Enterprise-Installer-cloud.sh $ ... $ Install Product choice(1~2): [1] ``` -------------------------------- ### Successful MySQL Connection Example Source: https://guide-gov.ncloud-docs.com/docs/clouddbformysql-start-classic An example demonstrating a successful connection to a MySQL server, showing the welcome message and server version. ```bash [root@localhost ~] # mysql -h db-gmcp.cdb.ntruss.com -umysql_dba -p --port 3306 Enter password: ********** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17199 Server version: 5.7.19-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ``` -------------------------------- ### Check KVM Guest Agent Status (Not Installed or Abnormal) Source: https://guide-gov.ncloud-docs.com/docs/server-ts-kvm-win-vpc This example shows the expected output when the KVM Guest Agent is not installed or is not running correctly. ```text # Get VM Tool Status KVM Guest Agent is not installed [Not Ok] ``` -------------------------------- ### Start Agent on Linux VM Source: https://guide-gov.ncloud-docs.com/docs/cloudinsight-faq Execute the start script to run the Agent service on a Linux Virtual Machine. ```bash /home1/nbpmon/agent_controller_linux/start_agent.sh ``` -------------------------------- ### Check KVM Guest Agent Status (Installed and Running) Source: https://guide-gov.ncloud-docs.com/docs/server-ts-kvm-win-vpc This example shows the expected output when the KVM Guest Agent is installed and its service is running. ```text # Get VM Tool Status KVM Guest Agent is installed [Ok] ``` -------------------------------- ### 자동 재생 설정 Source: https://guide-gov.ncloud-docs.com/docs/vpe-example-play autostart 속성을 true로 설정하여 플레이어의 자동 재생 기능을 활성화합니다. 자동 재생은 특정 조건에서만 제한적으로 작동합니다. ```javascript new ncplayer('video1', { autostart: true, // 자동 재생(false: 자동 재생 안 함) playlist: [ { file: 'https://CDN도메인/example_video_01.mp4', }, ], ``` -------------------------------- ### Deploy Nginx Example Source: https://guide-gov.ncloud-docs.com/docs/k8s-k8sexamples-velero Save this YAML to nginx-example.yaml and apply it to your cluster to deploy nginx for testing. ```yaml # nginx-example.yaml --- apiVersion: v1 kind: Namespace metadata: name: nginx-example labels: app: nginx --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: nginx-log-pvc namespace: nginx-example labels: app: nginx spec: storageClassName: nks-block-storage accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deploy namespace: nginx-example labels: app: nginx spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: volumes: - name: nginx-logs persistentVolumeClaim: claimName: nginx-log-pvc containers: - image: io.kr.ncr.ntruss.com/nks/nginx:1.9 name: nginx ports: - containerPort: 80 volumeMounts: - mountPath: "/var/log/nginx" name: nginx-logs readOnly: false ``` -------------------------------- ### Start eXperDB Service Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-1 Use this command to start the eXperDB database service. Ensure the experdb account's password is set first. ```bash $ pg_ctl start ``` -------------------------------- ### Verify Tibero Multi-Instance Installation Source: https://guide-gov.ncloud-docs.com/docs/tibero-tibero-1-2 Check if multiple Tibero instances are running as separate processes. This confirms the successful setup of the multi-instance configuration. ```bash ps -ef | grep tbsvr ``` -------------------------------- ### Test App Invocation Example Source: https://guide-gov.ncloud-docs.com/docs/clovastudio-skilltrainer-usecase This example demonstrates how to invoke a test application for a trained skill set version. Ensure you replace placeholders with your actual SKILLSET_ID, VERSION, API_KEY, REQUEST_ID, CLIENT_ID, and CLIENT_SECRET. Refer to the API guide for detailed invocation methods. ```shell curl --location --request POST 'https://clovastudio.stream.gov-ntruss.com/testapp/v1/skillsets/{SKILLSET_ID}/versions/{VERSION}/final-answer' \ --header 'Authorization: Bearer {API_KEY}' \ --header 'X-NCP-CLOVASTUDIO-REQUEST-ID: {REQUEST_ID}' \ --header 'Content-Type: application/json' \ --data '{ "query": "네이버 주소 알려줘", "tokenStream": true, "requestOverride": { "baseOperation": { "header": { "X-Naver-Client-Id": "{CLIENT_ID}", // 애플리케이션 등록 시 발급받은 클라이언트 아이디 값 "X-Naver-Client-Secret": "{CLIENT_SECRET}" // 애플리케이션 등록 시 발급받은 클라이언트 시크릿 값 } } } }' ``` -------------------------------- ### Create and Set Permissions for resolv.conf Source: https://guide-gov.ncloud-docs.com/docs/compute-ntk-vpc Use these commands to create the /etc/resolv.conf file and set its permissions if it does not exist. ```bash # touch /etc/resolv.conf # chmod 644 /etc/resolv.conf ``` -------------------------------- ### Check SourceDeploy Agent Status Source: https://guide-gov.ncloud-docs.com/docs/devtools-sourcedeploy-deploysetting Use this command to verify if the SourceDeploy agent is running and installed correctly. This is useful for initial setup verification and troubleshooting connection issues. ```bash service sourcedeploy status ``` -------------------------------- ### Install Python SDKs Source: https://guide-gov.ncloud-docs.com/docs/storage-storage-10-11 Install the required python-swiftclient and python-keystoneclient libraries using pip. Ensure you use the specified versions for compatibility. ```bash pip install python-swiftclient==3.6.0 pip install python-keystoneclient==3.17.0 ``` -------------------------------- ### Run eXperDB HA Setup Script Source: https://guide-gov.ncloud-docs.com/docs/experdb-experdb-1-1 Execute the experdb_ha_setup.sh script on the Active server to initiate the high availability configuration. This script guides you through entering server details. ```bash $ cd $PGHOME/etc $ ./experdb_ha_setup.sh ``` -------------------------------- ### Generated Secure Token URL (Java) Source: https://guide-gov.ncloud-docs.com/docs/networking-networking-7-1 Example of a fully formed URL with a Secure Token generated by the Java SDK, including start time, expiration, ACL, and HMAC signature. ```url http://example.cdn.ntruss.com/sample.pdf?token=st=1592202370~exp=1592205970~acl=/sample.pdf*~hmac=d422a548ae769bbaddc1d27f03fe6e096a4ba492928f3eb9c09824f93d78f507 ``` -------------------------------- ### Linux에서 파일 시스템 확장 (ext4) Source: https://guide-gov.ncloud-docs.com/docs/compute-compute-4-1-v2 Linux 서버에서 ext4 파일 시스템을 확장하고 마운트하는 명령어입니다. 확장 후 `df -h` 명령어로 정상적으로 적용되었는지 확인할 수 있습니다. ```bash mount /dev/xvdb1 /data resize2fs /dev/xvdb1 ``` -------------------------------- ### Start Tibero Database Source: https://guide-gov.ncloud-docs.com/docs/tibero-tibero-1-1 Use the 'tbboot' command to start the Tibero database. Refer to the Tibero online manual for detailed options. ```bash tbboot ``` -------------------------------- ### Android Intent URL for Naver Maps Source: https://guide-gov.ncloud-docs.com/docs/naveropenapiv3-maps-url-scheme-url-scheme Use an intent URL to automatically redirect to the Google Play Store if the app is not installed. This example shows how to display a marker at a specific location. ```URL intent://actionPath?parameter=value&appname={YOUR_APP_NAME}#Intent;scheme=nmap;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=com.nhn.android.nmap;end ``` ```URL intent://place?lat=37.4979502&lng=127.0276368&name=%EA%B2%BD%EA%B8%B0%EB%8F%84%20%EC%84%B1%EB%82%A8%EC%8B%9C%20%EB%B6%84%EB%8B%B9%EA%B5%AC%20%EC%A0%95%EC%9E%90%EB%8F%99&appname=com.example.myapp#Intent;scheme=nmap;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=com.nhn.android.nmap;end ``` -------------------------------- ### HTTP Method Execution Source: https://guide-gov.ncloud-docs.com/docs/cloudfunctions-apigateway-classic Demonstrates how to call a Cloud Function using the HTTP GET method via API Gateway. Includes an example of the expected response body and the curl command to execute it. ```APIDOC ## HTTP GET /api/v1/users ### Description Invokes a Cloud Function endpoint using the HTTP GET method. ### Method GET ### Endpoint https://myproduct.apigw.gov-ntruss.com/api/v1/users ### Response #### Success Response (200) - **body** (object) - The response body from the Cloud Function. - **name** (string) - Example field indicating the function name. ### Response Example ```json { "name": "Cloud Functions" } ``` ### Request Example ```bash $ curl -i -X GET "https://myproduct.apigw.gov-ntruss.com/api/v1/users" ``` ``` -------------------------------- ### Boot Ubuntu 22.04 from GRUB Source: https://guide-gov.ncloud-docs.com/docs/linux-grub-boot-issue-vpc Use these GRUB commands to boot an Ubuntu 22.04 instance. Ensure the kernel and initrd file names match your system's installed versions. ```grub grub> set root=(hd0,gpt2) grub> linux /boot/vmlinuz-5.15.0-140-generic root=/dev/vda2 ro net.ifnames=0 console=ttyS0,115200n8 console=tty0 grub> initrd /boot/initrd.img-5.15.0-140-generic grub> boot ``` -------------------------------- ### Java Example for File Filter API Request Source: https://guide-gov.ncloud-docs.com/docs/filesafer-programming-file Demonstrates how to make an API request to the File Filter service to get scan results. Ensure you have generated the necessary authentication values and parameters beforehand. ```java public static void main(String[] args) { String apiDomain = "https://gov-filesafer.apigw.gov-ntruss.com"; String method = "GET"; String apiURL = "/filefilter/v1/getInputFileLog?hashCode=FILE_HASH&hashType=sha1"; // step 3: add required parameter long timestamp = System.currentTimeMillis(); // step 2: Create Authentication Value String signature = makeSignature(method, apiURL, timestamp); // step 4: Request API URL url = new URL(apiDomain + apiURL); HttpURLConnection con = (HttpURLConnection)url.openConnection(); con.setRequestMethod(method); con.setRequestProperty("x-ncp-apigw-timestamp", Long.toString(timestamp)); con.setRequestProperty("x-ncp-iam-access-key", ACCESSKEY); // access key (from portal or sub account) con.setRequestProperty("x-ncp-apigw-signature-v2", signature); // step5: Check the response value and determine whether to block int responseCode = con.getResponseCode(); BufferedReader br = null; if(responseCode == 200) { br = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = br.readLine()) != null) { response.append(inputLine); } // do next step (ex, determine whether to block) ... br.close(); } } ```