Operations 12 min read

Step-by-Step Guide to Installing and Using Clip Server and SDK on Linux

This article provides a comprehensive tutorial on installing the Clip Server (Apache, PHP, MySQL), configuring its virtual host, setting up the Clip SDK with Python, and using various Clip commands to manage IP relationships, all illustrated with command examples and screenshots.

Efficient Ops
Efficient Ops
Efficient Ops
Step-by-Step Guide to Installing and Using Clip Server and SDK on Linux

Clip Server Installation

Install Apache, PHP, and MySQL: yum install httpd php mysql mysql-server Install the Clip Web interface (Doitphp framework):

Create the HTTP virtual host directory: mkdir -p /data/webroot/ Download the package:

wget http://blog.puppeter.com/download/clip/clip_web.tar.gz

Extract the package: tar -xvzf clip_web.tar.gz -C /data/webroot/ Append virtual‑host configuration to httpd.conf:

NameVirtualHost *:80
ServerAdmin [email protected]
DocumentRoot /data/webroot/clip_server/
ServerName clip.puppeter.com
ErrorLog logs/clip.puppeter.com-error_log
CustomLog logs/clip.puppeter.com-access_log common

Start Apache: service httpd start Initialize the Clip Web MySQL database:

Start MySQL: service mysqld start Download the table structure:

wget http://blog.puppeter.com/download/clip/clip_db.tar.gz

Import the tables:

mysql -u root -p
create database clip;
exit;
mysql -u root -p clip < clip.sql;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
FLUSH PRIVILEGES;

Configure Clip Web to connect MySQL by editing /data/webroot/clip_server/application/config/clip.ini.php .

Clip SDK Installation

The Clip SDK is Python‑based; the following steps install its dependencies.

Install Python and expect (supports Python 2.6 and 2.7): yum install python expect Download the Clip SDK:

wget http://blog.puppeter.com/download/clip/clip_latest.tar.gz

Extract and install the SDK (install to /usr/local/services ):

tar -xvzf clip_p1.0.tar.gz -C /usr/local/services

Edit clip/conf/clip.ini and set server_ip to the Clip web IP.

Add Clip to the system PATH: export PATH=$PATH:/usr/local/services/clip/ or permanently: <code>echo 'export PATH=$PATH:/usr/local/services/clip/' >> /etc/profile && source /etc/profile</code>

Clip SDK Usage

The Clip SDK manages IP‑String relationships on the server and can store them locally.

clip scan – Scan ports of IPs associated with a String:

--query_string (-q)   # Scan ports for a String
--ip (-i)            # Scan a specific IP
--append (-a)        # Append IPs to an existing String
--remove_ip (-r)    # Remove IPs from a String
--limit (-l)         # Limit IP range
--port (-P)          # Custom port (default 80)
--log_disable (-o)   # Disable log reporting

Example:

Scan *-puppet-*-* for open ports.

clip cstring – Resolve String ↔ IP relationships:

--query_string (-q)   # Get IP list for a String
--ip (-i)            # Get String for an IP
--limit (-l)         # Limit range
--append (-a)        # Append IPs
--remove_ip (-r)    # Remove IPs
--join (-j)          # Output format ("|", ",", "
", space)
--count (-c)        # Count IPs
--dryrun (-d)        # Show API call
Resolve *-qq-*-* to its IPs.
Resolve IP 192.168.0.7 to its String.

clip ssh – Remote command execution:

--password (-p)      # Password
--append (-a)        # Append IPs
--remove_ip (-r)    # Remove IPs
--limit (-l)         # Limit range
--port (-P)          # Custom port (default 22)
--dryrun (-d)        # Show API call
--log_disable (-o)   # Disable log reporting
Check load on machines matching sh-docker-base_v1-* .

clip scp – Remote file copy:

--password (-p)      # Password
--append (-a)        # Append IPs
--remove_ip (-r)    # Remove IPs
--limit (-l)         # Limit range
--port (-P)          # Custom port (default 22)
--dryrun (-d)        # Show API call
--log_disable (-o)   # Disable log reporting
Push an IP file to /tmp on machines matching sh-docker-base_v1-* .

tree – Traverse String relationships:

--query_string (-p)  # Query String
--json (-j)          # Output format
--dryrun (-d)        # Show API call
--log_disable (-o)   # Disable log reporting
Traverse nodes under *-*-*-* .

import – Import IP relationships into the database:

--insert (-i)        # Import from file
--bulid (-b)         # Create import template
--list_struct (-l)   # Show DB structure
Run clip import -b to create a template.

lt – Local tool for managing IP relationships via SSH:

--password (-p)      # Password
--append (-a)        # Append IPs
--remove (-r)        # Remove IPs
--port (-P)          # Custom port (default 22)
Execute remote SSH commands based on a local IP file.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SDKOperationsLinuxInstallationServerCLIP
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.