yum install wget
yum install pcre
yum install openssl*
查看/编辑 网络配置vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
重启网络配置service network restart
切换用户 su root
安装方法
安装一个软件时
yum -y install httpd
安装多个相类似的软件时
yum -y install httpd*
安装多个非类似软件时
yum -y install httpd php php-gd mysql
yum -y remove httpd
卸载多个相类似的软件时
yum -y remove httpd*
卸载多个非类似软件时
yum -y remove httpd php php-gd mysql
netstat -antp #查看所有建立的TCP连接
ps aux | grep nginx
ps -ef |grep nginx
杀死进程
kill -HUP 主进程号或进程号文件路径
kill -SIGUSR2 PID
# top //找出CPU使用率高的进程PID
# strace -p PID //跟踪进程
# ll /proc/PID/fd //查看该进程在处理哪些文件
将有可疑的PHP代码修改之,如:file_get_contents没有设置超时时间。
启动ngin
cd usr/local/nginx/sbin
./nginx
重启ngin
cd /usr/local/nginx/sbin
./nginx -s reload
强制停止
pkill -9 nginx
验证ngin配置文件正确
cd /usr/local/nginx/sbin
./nginx -t
查看服务器进程使用情况
top shift+p 按cpu排序 shift+m 按内存排序
查看所有进程
ps -ef
查看服务器版本
lsb_release -a
cat /etc/redhat-release
cat /etc/issue
登录mysql
mysql -u root -p
linux 所有配置文件目录
在etc文件
/bin/systemctl start iptables.service 开启防火墙可以实时的得到新追加到文件中的信息,常用来跟踪日志文
tail -f 17_05_05.log
mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
如果你想连接你的mysql的时候发生这个错误:
ERROR 1130: Host ‘192.168.1.3’ is not allowed to connect to this MySQL server
解决方法:1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 “mysql” 数据库里的 “user” 表里的 “host” 项,从”localhost”改称”%”
mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = ‘%’ where user = ‘root';mysql>select host,user from user;
2. 授权法。例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。
GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
如果你想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON *.* TO‘root’@’192.168.1.3′IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO‘root’@’10.10.40.54′IDENTIFIED BY ‘123456’ WITH GRANT OPTION;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。