dotnet 启动dll文件
dotnet SLMDEngine.Base.dll --urls http://locaohost:8000
mysql 查看进程
数字乡村2.0打包机器 139.9.1.176 /home/soft 把编译好的文件拷贝到响应的目录下 执行 sh build.sh 2.2.0.005
生成的RPM包路径 /usr/src/packages/RPMS/noarch
chmod -R 777 文件夹
chown -R root.root 文件夹
拷贝文件到其他服务器
scp ./x264.tar root@172.16.140.234:/home/soft
tcpdump -i lo -s 0 tcp and port 80 -w 001.pcap
curl模拟调用接口
curl -i -X GET http://url/bind/agentOnWork/v2?Sig=*******
curl -i -X POST -d '{"iptvAccount":"lqm"}' http://114.55.108.222:10080/api/epg/auth/login
curl -i -X POST -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf-8' -H 'Authorization:XXXXXX' -d '{"iptvAccount":"lqm"}' http://114.55.108.222:10080/api/epg/auth/login
curl -i -X POST -d '{}' http://localhost:11043/api/common/sl/GetQueryToken?userName=hh&code=4
find . | xargs grep -ril "hocto.utuapp.cn"
iptables -A INPUT -s 172.16.121.25 -p tcp -j ACCEPT
120.25.57.223 2288 root iastestserver2018
redis-cli -h 192.168.0.42 -p 3719 -a 'sunlight2010' -c
auth sunlight2010
select 0
keys *
集群信息cluster info 节点信息cluster nodes
mysql -hlocalhost -P 3307 -uroot -psunlight2021
select column_name, column_comment from information_schema.columns where table_name = 'picture' ;
desc picture;
mysql -h10.0.18.61 -uroot -psunlight@2020
mysql -h10.0.0.1 -uroot -p123
mysql -h139.9.184.171 -uroot -psunlight2021
mysql -h192.168.88.158 -psunlight2010
mongo 10.25.0.10:2719/nc -u nc -p nc
mongo 127.0.0.1:27017/ips -u ips -p ips
show collections
db.XXXX.find({})
查看集群状态
mongo 172.31.3.185:3718/admin
use admin
db.auth('root',"OpenLab2021")
rs.status()
SIT1 环境连接 mongo "mongodb://ips:ips@localhost:2718/ips"
两种连接方式:
mongo "mongodb://ucms:uc123_(ms@172.17.0.10:23000,172.17.0.13:23000,172.17.0.14:23000/ucms"
mongo -u test -p test --host 127.0.0.1 --port 27017 //适用于mongo版本4.x以下
mongo -u username -p password --host 127.0.0.1 --port 27017
mongo 127.0.0.1:27017/fastgpt -u username -p password //适用于mongo版本4.x以上
MONGO_DB=mongodb://nc:nc@10.25.0.10:2718,10.25.0.10:2719/nc?replicaSet=NC
ucms:'uc123_(ms'@172.17.0.10,172.17.0.13,172.17.0.14:23000/ucms?replicaSet=ucms
MONGO_DB=mongodb://nc:nc@10.25.0.10:2718/nc
REDIS_PREFIX=nc_dev_
IMAGE_SERVER=http://114.55.108.222:10080
REDIS_DB=[{"host":"localhost","port":6379}]
NETWORK_OPERATOR=gddx
UPLOAD_KEY=3754ez6iz7mx9jlswtal101bp6b7a4sb
CMS_ADDRESS=https://114.55.108.245:10080
find . | xargs grep -ril "hocto.utuapp.cn"
linux上安装.net core sdk 2.2(离线安装和yum仓库安装)
https://blog.csdn.net/u010476739/article/details/100144287?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_v25-1-100144287.nonecase&utm_term=linux%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85dotnet
RPM包操作
rpm -qa |grep epg 查询
rpm -ivh xxx.rpm 安装
rpm -e XXXX 卸载
apache
启动
systemctl start httpd
停止
systemctl stop httpd
重启
systemctl restart httpd
mysql
启动
systemctl start mysqld
停止
systemctl stop mysqld
重启
systemctl restart mysqld
php-fpm
启动
systemctl start php-fpm
停止
systemctl stop php-fpm
重启
systemctl restart php-fpm
nginx
启动
systemctl start nginx
停止
systemctl stop nginx
重启
systemctl restart nginx
下面看下centos7重启php-fpm命令
php-fpm
/etc/init.d/php-fpm start
/etc/init.d/php-fpm stop
/etc/init.d/php-fpm restart
/etc/init.d/php-fpm reload
firewall常用命令
1、重启、关闭、开启、firewalld.serverice 服务
Service firewalld restart 重启
Service firewalld start 开启
Service firewalld stop 关闭
systemctl status firewalld
systemctl stop firewalld 关闭
systemctl start firewalld 开启
systemctl restart firewalld 重启
systemctl disable firewalld 关闭开机启动
systemctl disable nginx
systemctl enable nginx
2、查看状态
firewall-cmd --state
3、查看防火墙规则
firewall-cmd --list-all
添加
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone=public --query-port=80/tcp
删除
firewall-cmd --zone=public --remove-port=80/tcp --permanent
systemctl list-unit-files |grep enabled 查看所有开机启动的服务
ps -ef | grep beanstalkd
/usr/sbin/redis-server &
service beanstalkd start
查看系统整体的负载
命令:top
总体内存占用的查看
命令:free
查看内存占用前五的进程
命令:ps auxw | head -1;ps auxw|sort -rn -k4|head -5
查看CPU占用前三的进程
命令:ps auxw|head -1;ps auxw|sort -rn -k3|head -3
列出所有端口: netstat -ntlp
netstat -anpt
查看 TCP 22 端口有两种方法
netstat -ntlp | grep 22
lsof -i tcp:22
ps aux | grep mongod
php 中php-fpm 的重启、终止操作命令:
service nginx restart
service php-fpm restart
service mongod start
service redis start
service beanstalkd start
查看php-fpm进程数:
ps aux | grep -c php-fpm
查看运行内存
/usr/bin/php -i | grep mem
查看php编译参数
/usr/bin/php -i | grep Configure
重启php-fpm
/etc/init.d/php-fpm restart
首先要找到php-fpm.conf配置文件,查看pid的配置路径(不是安装路径),然后把下面对应的地方改掉才能正常执行。
[root@DO-SG-H1 ~]# ps aux | grep php-fpm
root 11799 0.0 0.0 103248 880 pts/0 S+ 13:51 0:00 grep --color php-fpm
root 11973 0.0 0.0 417748 964 ? Ss Jun01 0:20 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
cat /etc/php-fpm.conf
看到
pid = /var/run/php-fpm/php-fpm.pid
php-fpm配置测试
/usr/local/php/sbin/php-fpm -t
/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf -t
php-fpm 启动:
/usr/local/php/sbin/php-fpm
/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf
php-fpm 关闭:
kill -INT `cat /var/run/php-fpm/php-fpm.pid`
php-fpm 重启:
kill -USR2 `cat /var/run/php-fpm/php-fpm.pid`
查看php-fpm进程数:
ps aux | grep -c php-fpm
消息队列:
/usr/bin/beanstalkd -l 0.0.0.0 -p 11300 &
redis:
/usr/sbin/redis-server &
测试 /usr/bin/redis-server &
测试环境手工启动mongodb命令
/usr/bin/mongod -dbpath /data/mongodb/ -logpath /data/log/mongodb/mongod.log -logappend -fork -port 27017
正式环境手工启动mongodb命令
/usr/bin/mongod -dbpath /var/lib/mongo/ -logpath /var/log/mongodb/mongod.log -logappend -fork -port 27017
mongod --dbpath=/var/lib/mongo/ --port=27017 --fork --logpath=/var/log/mongodb/mongod.log
mongod --repair --dbpath /var/lib/mongo/ --repairpath /tmp/mongodb
mongod -port=27017 -storageEngine=mmapv1 -dbpath=/var/lib/mongo/ -logpath=/var/log/mongodb/mongod.log --logappend --journal --fork
/home/git/.gitolite/conf/gitolite.conf
grep -rn "{填写关键字}" *
: 表示当前目录所有文件,也可以是某个文件名
-r 是递归查找
-n 是显示行号
-R 查找所有文件包含子目录
-i 忽略大小写
-l 只列出匹配的文件名
-L 列出不匹配的文件名
-w 只匹配整个单词,而不是字符串的一部分
grep -rn "https://mt{s}.sea.utuapp.cn/220122/models/0001/{z}/{x}/{y}.png" *