Build Server常见问题

/ 网络技术 / 1 条评论 / 503浏览

1.  升级node版本

npm下载慢 - 可能是node版本低 导致的 修改为taobao源应该都挺快的

git repository:/root/.m2/repository/

dpm set-device-owner com.nq.mdm/.receiver.DeviceManagerReceiver  #刷机命令

安全模式: 华为honor - honor图标 - 音量减键

2. 要使用sudo,用户必须被定义在 /etc/sudoers 内才可以的。 
https://www.cnblogs.com/godtrue/p/5335217.html

3.mac ftp

brew install inetutils

4. 常见shell命令

 find . -name "UEM.*.iso" -type f -mtime +5 -exec rm {} \;

 rpm -ivh --nodeps --force
 rpm2cpio FileName.rpm | cpio -div
 grep "5.3.2" -rl * --exclude="*.apk" --exclude="*.tar.gz" --exclude="*.rpm" --exclude="*.jar" --exclude="*.iso" --exclude="*.war" --exclude="*.sql"
 find ytest -type f -size -10M | xargs scp {} root@192.168.33.3:/home/jenkinsJobBak/
 ps -ef | grep gradle | cut -c 9-15| xargs kill -9
 sed -i 's|^[[:space:]]*'"POLICE_CUSTOM_DISTRICT"'[[:space:]]*=[[:space:]]*.*$|'"POLICE_CUSTOM_DISTRICT=2;"'|'
 awk 'BEGIN {FS="nsconfigsdk_version="}/nsconfigsdk_version/{{print $2}}'

 屏蔽IP:firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=43.229.53.61 reject"

5. pod

podfile
pod repo list ---查看

6. vpn设置

 vpn.nationsky.com(124.65.116.170)
 nsky@com
 jiangqiang
 大一小二

7. oracle操作

lsnrctl start/stop/status
 startup/shutdown immediate
 sqlplus /@mdmtest as sysdba  --连接特定实例
 sqlplus mdm/netqin123@mdmtest
 oracle密码过期修改
 1>. su - oracle
 2>. sqlplus 用户名/密码
 3>.按提示修改密码即可
 export ORACLE_SID=mdmtest
 echo $ORACLE_SID
 sqlplus /nolog
 connect mdm/netqin123
 show parameter name;
 select name from v$database;
 select table_name from user_tables;

8. openssh手动编译安装

sshd -t
yum remove openssh
#编译安装openssh
mv /etc/ssh /etc/ssh_bak
./configure --prefix=/usr/ --sysconfdir=/etc/ssh  --with-openssl-includes=/usr/local/ssl/include \
 --with-ssl-dir=/usr/local/ssl   --with-zlib   --with-md5-passwords
 make
 make install
 #修改sshd_config
 PermitRootLogin yes
 PasswordAuthentication yes
 cp contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
service sshd start

9. mysql修改初始密码

mysql 修改初始密码
grep "tempory " /var/log/mysql.log
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Nationsky1@3';
FLUSH PRIVILEGES;

10. upgrade 手动打包

cp upgrade/upgrademdm.sh /home/Allinbuild7/build/output/
tar zcvf 5.3.4upgrade_uempackage.tar.gz Packages openscep upgrademdm.sh

11. adb相关

//am start
adb shell am start -S -R 1 -W com.nq.fakedingtalk/.MainActivity
adb shell am start -S -R 1 -W com.emmsdk.androiddemo/com.nationsky.emmsdk.component.UemContainerUtil.UemAppLauncherActivity
cmd /c adb -s APU0216117012863 logcat -d > C:/1.txt
adb logcat -s ActivityManager:I | find "Displayed"
adb shell logcat -v time -b events | findstr activity_launch_time
pm list package
aapt linux:
sudo apt-get install lib32stdc++6 lib32z1

12. 开机启动

/etc/rc.d/rc.local  ====文件

touch /var/lock/subsys/local
/usr/bin/setterm -blank 0 || true
ssserver -c /etc/shadowsocks.json -d start
/usr/local/php/sbin/php-fpm


  1. xx

    数据库mysql.user为空问题 rm -rf /var/lib/mysql/* mysqld --initialize --user=mysql service mysqld start mysqld --initialize-insecure --user=mysql