1
0

29 Commits

Author SHA1 Message Date
zhangsz
b73aff3a91 fix: build 2025-06-21 12:06:44 +08:00
zhangsz
e594a5f19a fix: build shell 2025-06-21 12:06:27 +08:00
zhangsz
9bf9ac6479 release 1.2506.2 2025-06-20 19:11:50 +08:00
zhangsz
ff0f52efac fix: ... 2025-06-17 09:57:45 +08:00
zhangsz
b758a21bab fix: ... 2025-06-16 16:52:38 +08:00
zhangsz
aa974c21dc fix: ... 2025-06-16 16:50:33 +08:00
zhangsz
6affa5f93e fix: ... 2025-06-16 16:33:15 +08:00
zhangsz
1b531f3556 fix: changed omcd to psapd 2025-06-16 16:22:18 +08:00
zhangsz
4ebbbbf1f3 fix: change OMC to PSAP 2025-06-16 14:17:59 +08:00
zhangsz
f0688a4273 db name changed 2025-06-16 14:10:05 +08:00
zhangsz
e3319048ea release r1.2506.1 2025-06-16 11:42:56 +08:00
zhangsz
0f90394faa feat: ... 2025-06-16 11:41:54 +08:00
zhangsz
79c5378bc3 fix: icon update 2025-05-17 18:02:43 +08:00
zhangsz
e1cc70a0b8 for psap 2025-04-23 17:27:49 +08:00
zhangsz
1d29e002f3 fix: ... 2025-04-15 15:14:09 +08:00
zhangsz
fdcf8be579 feat: psap r1.2504.1 2025-04-15 12:04:21 +08:00
zhangsz
e2ee082cb8 fix:... 2025-04-15 11:48:09 +08:00
zhangsz
150d7aadbc feat: psap portal 2025-04-15 11:42:08 +08:00
zhangsz
4215a73c8c feat: psap portal 2025-04-15 11:33:33 +08:00
zhangsz
e1f4eb6267 feat: psap init 2025-04-14 16:05:39 +08:00
TsMask
17591b1705 chore: 更新版本号 2.2503.5 2025-04-12 10:11:01 +08:00
TsMask
5d9425c457 chore: 更新版本号 2.2503.4 2025-03-31 20:06:01 +08:00
TsMask
d8624c2fe9 chore: 更新版本号 2.2503.3 2025-03-21 15:36:13 +08:00
TsMask
cb8692cf44 chore: 更新版本号 2.2503.2 2025-03-14 11:04:59 +08:00
TsMask
cc45dd1be3 chore: 更新版本号 2.2503.1 2025-03-08 11:11:18 +08:00
TsMask
56d62831eb fix: badeb 中文字符串替换 2025-03-04 18:09:37 +08:00
TsMask
246fb027cd fix: badeb 中文字符串替换 2025-03-04 16:13:51 +08:00
TsMask
7818759109 chore: 更新版本号 2.2502.4 2025-02-28 19:56:37 +08:00
TsMask
48d5a0a783 feat: 添加kylin|anolis打包rpm 2025-02-24 16:36:32 +08:00
37 changed files with 543 additions and 81 deletions

View File

@@ -1,14 +1,17 @@
#!/bin/bash
usage() {
echo "Usage: $0 [OPTION] deb|badeb|rpm"
echo "Usage: $0 [OPTION] deb|badeb|rpm|psapdeb"
echo
echo "Build omc package, option as follow:"
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
echo " badeb: ubuntu|debian package build by dpkg"
echo " rpm: centos/redhat package, build by rpmbuild"
echo " psapdeb psap package, build by dpkg"
echo
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
echo " -d dump SQL from database"
echo " -h, --help display this help and exit"
echo
}
@@ -16,7 +19,7 @@ pkgtype=""
new_args=()
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" || "$arg" == "psapdeb" ]]; then
pkgtype=$arg
else
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
@@ -31,7 +34,7 @@ fi
# Use a new parameter list
set -- "${new_args[@]}"
GitLocalRoot=${HOME}/omc.git
GitLocalRoot=${HOME}/${ProjectL}.git
while getopts "r:d" option; do
case $option in
r)
@@ -56,7 +59,7 @@ fi
ProjectL=omc
ProjectU=OMC
PROJECT=${ProjectL}
VERSION=2.2502.3
VERSION=1.2506.2
RelDate=`date +%Y%m%d`
RelVer=${VERSION}-${RelDate}
Ky10Arch=ky10.aarch64
@@ -163,6 +166,12 @@ case $(get_os_info) in
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
kylin|anolis)
ptype=rpm
RelOS=ky
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
*)
echo "Unsupported OS"
exit 1
@@ -211,15 +220,15 @@ case "${pkgtype}" in
chmod 755 ${BuildOMCBinDir}/*
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
cp -rf ${CustomizedDir}/agt.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${RpmBuildOMCDir}/static
cd ${RpmBuildDir}
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
rm -f ${ProjectL}-md5sum.txt
# rpm --addsign *.rpm
md5sum $RpmPkgRename >omc-md5sum.txt
md5sum $RpmPkgRename >${ProjectL}-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
deb)
@@ -270,7 +279,7 @@ case "${pkgtype}" in
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
@@ -332,7 +341,7 @@ case "${pkgtype}" in
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
# replace Chinese character
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥]//g' {} +
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
echo "Replace all chinese character."
chmod +x ${DebBuildDir}/usr/local/omc/bin
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
@@ -345,6 +354,68 @@ case "${pkgtype}" in
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
psapdeb)
ProjectL="omc"
ProjectU="OMC"
ProjectTag="psap"
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-${ProjectTag}.${ptype}
fi
cd ${EmsBEDir}
#make deb
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${DebFEBuildDir}/front/*
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
rm -rf ${DebBuildOMCDir}/static/*
for procName in $ProcList;do
cd $EmsBEDir/$procName
cp -rf ${procName} ${BuildOMCBinDir}
done
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
#Get SQL from database, overwrite from git
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
chmod 755 ${DebBuildDir}/DEBIAN/preinst
chmod 755 ${DebBuildDir}/DEBIAN/postinst
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======="
;;
*)
usage
exit 4

View File

@@ -11,12 +11,19 @@ usage() {
echo " -m, =be|fe|all be: only process back-end code, default if non input"
echo " fe: only process front-end code"
echo " all: process all include be and fe"
echo " -c, =ba ba: customized for BA OMC"
echo " -c, =ba|psap ba: customized for BA OMC, psap: customized for PSAP Portal"
}
pkgtype=""
new_args=()
be_args=()
handle_invalid_option() {
echo "Invalid option: -$1" >&2
usage
exit 2
}
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
@@ -35,7 +42,7 @@ fi
# Use a new parameter list
set -- "${new_args[@]}"
rootdir=${HOME}/omc.git
rootdir=${HOME}/psap.git
m_arg="*"
while getopts "m:r:c:d" option; do
case $option in
@@ -54,12 +61,15 @@ while getopts "m:r:c:d" option; do
if [ "${c_arg}" == "ba" ]; then
pkgtype="badeb"
be_args+=("${pkgtype}")
fi
elif [ "${c_arg}" == "psap" ]; then
pkgtype="psapdeb"
be_args+=("${pkgtype}")
else
handle_invalid_option "$OPTARG"
fi
;;
\?)
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
handle_invalid_option "$OPTARG"
;;
esac
done
@@ -91,8 +101,8 @@ makefe() {
if [ "${pkgtype}" == "badeb" ]; then
cp -rf ${customizeddir}/images/* ${feassetsdir}
cp -rf ${customizeddir}/locales/* ${felocalesdir}
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥]//g' {} +
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥]//g' {} +
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
fi
npm install --force --registry https://registry.npmmirror.com
echo -n "Building front-end vue ... "
@@ -107,21 +117,29 @@ makefe() {
}
makebe() {
cd ${builddir}
cd ${builddir}/bin
#chmod +x mkpkg.sh
chmod +x build.sh
./build.sh ${be_args[@]}
}
post_makepkg() {
cd ${builddir}
git checkout debbuild/DEBIAN/
git checkout debbuild/22.04/DEBIAN/
}
case "${m_arg}" in
fe)
makefe
;;
all)
makefe
makebe
makebe
post_makepkg
;;
be | *)
makebe
makebe
post_makepkg
;;
esac

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,12 +57,6 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -78,7 +72,7 @@ mml:
# Tracking configuration
trace:
enabled: true
enabled: false
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -109,7 +103,9 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -71,7 +71,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc:

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

View File

@@ -1,20 +0,0 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.bluearcus.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -1,2 +0,0 @@
export default {
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'OMC', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'OMC', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

View File

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,8 +1,9 @@
Package: OMC
Version: 2.2502.3-YYYYMMDD
Package: PSAP
Version: 1.2506.2-20250616
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Depends:
Description: OMC
Description: psap

View File

@@ -47,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -89,7 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting OMC service ... "
echo -n "Starting PSAP service ... "
systemctl start sshsvc.service
systemctl start restagent.service
echo "done"

View File

@@ -7,7 +7,7 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -2,7 +2,7 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,12 +57,6 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -78,7 +72,7 @@ mml:
# Tracking configuration
trace:
enabled: true
enabled: false
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -109,7 +103,9 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -1,5 +1,5 @@
Package: OMC
Version: 2.2502.3-YYYYMMDD
Version: 1.2506.2-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64

View File

@@ -47,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -89,7 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting OMC service ... "
echo -n "Starting PSAP service ... "
systemctl start sshsvc.service
systemctl start restagent.service
echo "done"

View File

@@ -7,7 +7,7 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -2,7 +2,7 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -0,0 +1,402 @@
# PSAP OMC安装指南
## 1 安装环境及依赖包
X86_64通用服务器
```
计算机或者虚拟机环境(最低配置)CPU: 4, Memory: 8.00 GB, Disk: 500 GB
操作系统环境Ubuntu 22.04
数据库环境mariadb-10.3.38-GA
安装包名称格式psap-r1.2506.1-20250616-ub22-amd64.deb (其中: 'r1.2506.1'为版本号, '20250616'是构建日期, 'ub22'是操作系统, md64'为硬件平台名称)
```
麒麟arm64服务器
```
计算机或者虚拟机环境(最低配置)CPU: 2, Memory: 8.00 GB, Disk: 200 GB
操作系统环境:银河麒麟 kylin server v10
数据库环境mariadb-10.3.35-1.p01.ky10.aarch64
WEB服务: nginx 1.16.1-11.p01.ky10.aarch64
安装包名称格式OMC-PSAP16.1.1.arm64.rpm (其中,'PSAP16.1.1'为版本号, 'arm64'为硬件平台名称)
```
注意事项:
```tips
* 以下操作以银河麒麟arm64硬件平台为例
* 全新安装方式,数据库的数据会被全部清除
```
### 1.1 安装数据库
注意:非第一次安装或者全新安装请跳过此步骤
mariadb版本mariadb-server-3:10.3.35-1.p01.ky10.aarch64
软件安装
银河麒麟OS(CentOS)
```bash
# yum clean all
# yum makecache
# yum -y update
# yum install -y mariadb
# yum install -y mariadb-server-3:10.3.35-1.p01.ky10.aarch64
```
配置修改
修改/etc/my.cnf.d/mariadb-server.cnf
增加或者修改如下三行:
```
bind-address=0.0.0.0
port=33066
max_connections=1000
```
验证测试
```bash
# systemctl enable mariadb
# systemctl restart mariadb
# systemctl status mariadb
```
正常显示结果如下:
```bash
[root@ems omc]# systemctl status mariadb
● mariadb.service - MariaDB 10.3.35 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2023-04-30 11:09:56 CST; 7h ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 5127 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 37
Memory: 101.0M
CGroup: /system.slice/mariadb.service
└─5127 /usr/libexec/mysqld
```
修改mysql数据库root密码:
```tips
!!!注意!!!: 修改后的密码需要更新到/usr/local/omc/etc/restconf.yaml, crontask.yaml和nbi_alarm.json等配置文件中的数据库信息配置项
```
```bash
[root@ems ~]# mysql -u root
MariaDB [none]> use mysql
MariaDB [mysql]> update user set password=PASSWORD('******') where User='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '******'
MariaDB [mysql]> quit
```
通过以下登录命令确认修改成功
```
[root@ems ~]# mysql -u root -h 192.168.0.229 -P 33066 -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 95
Server version: 10.3.35-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
```
### 1.2 安装WEB服务(可选)
注意:非第一次安装或者全新安装请跳过此步骤
OMC Web服务可通过nginx代理进行访问也可不需要代理进行访问
WEB服务: nginx-1.16.1-11.p01.ky10.aarch64
* 软件安装
```bash
# yum clean all
# yum makecache
# yum -y update
# yum install -y nginx
```
* 验证测试
```bash
# systemctl enable nginx
# systemctl daemon-reload
# systemctl start nginx
# systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2023-05-02 20:57:48 CST; 3h 12min ago
Main PID: 23163 (nginx)
Tasks: 5
Memory: 19.3M
CGroup: /system.slice/nginx.service
├─23163 nginx: master process /usr/sbin/nginx
├─23164 nginx: worker process
├─23165 nginx: worker process
```
## 2 安装配置OMC
### 2.1 安装OMC软件包
安装OMC软件包
```bash
# rpm -ivh OMC\ PSAP16.1.1.arm64.rpm
```
安装后的软件包目录树(实际目录树会随版本不同有变化,以下仅供参考):
```bash
# cd /usr/local
# tree omc -L 2
omc
├── backup
├── bin
│   ├── cpsshkey.sh
│   ├── crontask
│   ├── importdb.sh
│   ├── nehosts
│   ├── omcsvc.sh
│   ├── restagent
│   └── tables.txt
├── database
├── etc
│   ├── cm
│   ├── crontask.yaml
│   ├── db
│   ├── default
│   ├── restconf.yaml
│   ├── schema
│   └── tasks.yaml
├── htdocs
│   └── front
├── license
├── log
│   ├── crontask.log -> /usr/local/omc/log/crontask.log-20230629
│   ├── crontask.log-20230628
│   ├── crontask.log-20230629
│   ├── nbi_alarm
│   ├── restagent.log -> /usr/local/omc/log/restagent.log-20230629
│   ├── restagent.log-20230628
│   └── restagent.log-20230629
├── software
└── upload
#
```
### 2.2 修改nginx服务的OMC配置(可选)
安装软件包成功后可以根据实际环境对nginx的OMC配置进行修改前端Web的默认侦听端口是8888除了侦听端口其它不用修改
```bash
# cd /etc/nginx/conf.d
# cat omc.conf
server {
listen 8888 default_server;
root /usr/local/omc/htdocs/front/;
index index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
}
```
### 2.3 修改OMC Web前端配置
根据实际环境修改如下文件的IP地址和端口端口需要和OMC的配置文件一致, OMC后端ipv4服务侦听端口默认为3030, ipv6的默认侦听端口为6060:
```bash
# sudo sed -i.bak 's/192.168.2.119:/192.168.0.229:/g' /usr/local/omc/htdocs/front/config.js
```
### 2.4 修改OMC后端配置
说明:
```tips
* 目录/usr/local/omc/etc/default下的文件是OMC程序的初始配置文件不要修改
* 拷贝default目录下的文件至/usr/local/omc/etc目录根据使用环境修改配置文件
```
```bash
# cd /usr/local/omc/etc
# cp default/* ../
```
根据实际的运行环境对配置文件restconf.yaml, crontask.yaml, nbi_alarm.json, nbi_agent.json, 4a_agent.yaml及tasks.yaml进行修改, 特别是侦听端口和数据库配置信息(包括端口/用户/密码)
### 2.5 数据库配置
注意:第一次或全新安装执行该步骤, 该步骤会清除掉原有的omc数据库
```bash
# /usr/local/omc/bin/importdb.sh install
```
升级安装执行该步骤
```bash
# /usr/local/omc/bin/importdb.sh upgrade
```
### 2.6 防火墙配置
如果系统默认是打开防火墙,需要添加配置文件中配置的服务和端口(端口要和实际环境配置一致),如下:
```bash
# firewall-cmd --add-port=33066/tcp --permanent
# firewall-cmd --add-port=8443/tcp --permanent
# firewall-cmd --add-port=8080/tcp --permanent
# firewall-cmd --add-port=4443/tcp --permanent
# firewall-cmd --add-port=8888/tcp --permanent
# firewall-cmd --add-port=3030/tcp --permanent
# firewall-cmd --add-port=4040/tcp --permanent
# firewall-cmd --add-port=5050/tcp --permanent
# firewall-cmd --add-port=6060/tcp --permanent
# firewall-cmd --add-port=31232-31271/tcp --permanent
# firewall-cmd --add-port=2222/tcp --permanent
# firewall-cmd --add-port=6379/tcp --permanent
# firewall-cmd --add-port=2152/udp --permanent
# firewall-cmd --reload
```
### 2.7 配置被管网元的SSH信任关系
为了便于OMC管理被管网元(包括登录网元,安装软件,备份配置文件和执行命令等操作), 第一次安装时需要配置被管网元与OMC的SSH信任关系便于无密码SSH登录
* 修改/usr/local/omc/bin目录下的nehosts文件(******替换为明文密码), 根据现网环境增加被管网元的ip, 用户和密码信息列表
* 运行脚本cpsshkey.sh, 将公钥拷贝至被管网元
* 运行ssh root@192.168.4.133验证是否可以无密码登录
* 执行成功后, 为了防止密码泄露清除掉nehosts文件的密码信息
```bash
[root@ems bin]# cat nehosts
# host user password
# Example: 192.168.4.133 root password
192.168.4.133 root ******
192.168.4.134 root ******
[root@ems bin]# ./cpsshkey.sh
[root@ems bin]# ssh root@192.168.4.133
```
## 3 启动和停止OMC
### 3.1 系统服务启动
```bash
# systemctl enable restagent.service
# systemctl enable crontask.service
# systemctl enable sshsvc.service
# systemctl enable captrace.service
# systemctl daemon-reload
```
执行上述命令后,它被设置为作为 systemd 服务运行。
### 3.2 手动启动/查询/停止OMC
您可以按如下方式启动查询状态停止和重新启动OMC, 以下命令可通过/usr/local/omc/bin/omcsvc.sh脚本一次性执行
```bash
# cd /usr/local/omc/bin
# ./omcsvc.sh start/stop/restart/status
```
单个OMC进程的执行命令如下, 启动/状态/停止/重启:
```bash
# systemctl start restagent.service
# systemctl start crontask.service
# systemctl start sshsvc.service
# systemctl start captrace.service
```
```bash
# systemctl status restagent.service
# systemctl status crontask.service
# systemctl status sshsvc.service
# systemctl status captrace.service
```
```bash
# systemctl stop restagent.service
# systemctl stop crontask.service
# systemctl stop sshsvc.service
# systemctl stop captrace.service
```
```bash
# systemctl restart restagent.service
# systemctl restart crontask.service
# systemctl restart sshsvc.service
# systemctl restart captrace.service
```
## 4 问题定位跟踪
OMC restagent程序的配置文件在restagent.yamltrace级别的日志通常在调试系统时使用正常运行级别为debug如下配置项所示
```yaml
logger:
file: /usr/local/omc/log/restagent.log
level: debug
duration: 24
count: 90
```
OMC crontask程序的配置文件在crontask.yamltrace级别的日志通常在调试系统时使用正常运行级别为debug如下配置项所示
```yaml
logger:
file: /usr/local/omc/log/crontask.log
level: trace
duration: 24
count: 90
```
OMC sshsvc程序的配置文件在sshsvc.yaml日志配置项如下所示
```json
logger:
file: /usr/local/omc/log/sshsvc.log
level: debug
duration: 24
count: 30
```
OMC captrace程序的配置文件在capconf.yaml日志配置项如下所示
```json
logger:
file: /usr/local/omc/log/captrace.log
level: trace
duration: 24
count: 10
```
## 5 管理核心网系统
通过浏览器输入:[http://192.168.0.229:8888](http://192.168.0.229:8888) nginx代理模式
http://192.168.0.229:8080 (非nginx代理模式)

Binary file not shown.

Binary file not shown.

View File

@@ -8,7 +8,7 @@
Name: %{project_lname}
Summary: 5GC OMC
Version: 2.2502.3
Version: 1.2506.2
Release: %{release_date}
Vendor: omc
URL: https://www.omc.com/
@@ -61,7 +61,7 @@ done
if [ ! -e "${FERootDir}/config.js" ]; then cp ${FERootDir}/default/config.js ${FERootDir}; fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then useradd -d /opt/omc -m -s /bin/bash -p1000ftp@kp omc; else echo "user omc exist"; fi