Install Perl PAR::Packer

Online Installation

Install Necessary RPMs

1
2
3
4
[root]# yum install perl-ExtUtils-Embed
[root]# yum install perl-Crypt-OpenSSL*
[root]# yum install openssl*
[root]# yum install perl-CPAN

Install Required Perl Modules

1
2
3
[root]# perl -MCPAN -e 'install Filter::Crypto'
[root]# perl -MCPAN -e 'install ExtUtils::CBuilder'
[root]# perl -MCPAN -e 'install PAR::Packer'

It will might report Errors when installing PAR::Packer. You must install the missing Perl package prior to installation of PAR::Packer.

Offline Installation

Read More

Script: Add a Linux User

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Script to add a user to Linux system
# -------------------------------------------------------------------------
# Copyright (c) 2007 nixCraft project <http://bash.cyberciti.biz/>
# This script is licensed under GNU GPL version 2.0 or above
# Comment/suggestion: <vivek at nixCraft DOT com>
# -------------------------------------------------------------------------
# See url for more info:
# http://www.cyberciti.biz/tips/howto-write-shell-script-to-add-user.html
# -------------------------------------------------------------------------
if [ $(id -u) -eq 0 ]; then
read -p "Enter username : " username
read -s -p "Enter password : " password
egrep "^$username" /etc/passwd >/dev/null
if [ $? -eq 0 ]; then
echo "$username exists!"
exit 1
else
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
useradd -m -p $pass $username
[ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!"
fi
else
echo "Only root may add a user to the system"
exit 2
fi

Install Perl Module

List all installed Perl modules
perldoc perllocal or instmodsh

Check if a specified module is installed
perldoc -li math::round # -l = list; -i = ignore case

Install Perl modules
Given an example of Math::Round to be installed

  1. Search & download the module (Math-Round-0.07.tar.gz) at https://metacpan.org/.
  2. Install the module
    1
    2
    3
    4
    5
    % tar xvf Math-Round-0.07.tar.gz`
    % perl Makefile.PL
    % make
    % make test
    % sudo make install

Integrate SOS in Virtuoso

To get Cliosoft SOS integrated in Cadence Virtuoso, what you need to do is just to put 3 files in your $HOME (~/).

1) .cdsinit

1
2
3
4
5
% cat ~/.cdsinit
let( (clioDir)
clioDir = getShellEnvVar("CLIOSOFT_DIR")
load((strcat clioDir "/scripts/cds_sosviadfII.il"))
)

2) cdsLibMgr.il

1
2
3
4
5
% cat ~/cdsLibMgr.il
let( (clioDir)
clioDir = getShellEnvVar("CLIOSOFT_DIR")
load((strcat clioDir "/scripts/cdsLibMgr.il"))
)

3) cdsinfo.tag

1
2
% cat ~/cdsinfo.tag
DMTYPE sos

Linux Command: Ip

ip 是个命令, ip 命令的功能很多!基本上它整合了 ifconfigroute 这两个命令,不过 ip 的功能更强大。

ip命令用法

1
2
3
4
5
6
7
8
9
10
% sudo ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
where OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
tunnel | maddr | mroute | mrule | monitor | xfrm | token }
OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
-h[uman-readable] | -iec |
-f[amily] { inet | inet6 | ipx | dnet | link } |
-o[neline] | -t[imestamp] | -b[atch] [filename] |
-rc[vbuf] [size]}

Read More

A Man's Most Powerful Capacity

A man’s most powerful capacity does not lie in how intelligent he is. It resides in -

  • His/her persistency in a tedious job until it perfectly gets done;
  • His/her relentless exploration for unknown things;
  • His/her passion for the skills he/she loves;
  • His/her curiosity for every single trivial matter.