centos7 安装google

 google-chrome-stable_current_x86_64.rpm 需要翻墙下载

百度云下载地址:链接: https://pan.baidu.com/s/1x3neLb8UBvMtnma1n2NxNw 密码: jbpy

yum install google-chrome-stable_current_x86_64.rpm

将chromedriver 拷贝至/usr/bin/中,chmod +x /usr/bin/chromedriver
安装无gui打开浏览器
yum install Xvfb libXfont xorg-x11-fonts*
/etc/profile 添加:export DISPLAY=:7
nohup Xvfb -ac :7 -screen 0 1280x1024x8 > /dev/null 2>&1 &
验证chrome可用:
使用chrome截屏
google-chrome-stable --no-sandbox --headless --disable-gpu --screenshot http://www.baidu.com
1.需要安装包:
yum groupinstall "fonts" -y
2.编辑配置文件/etc/locate.conf
LANG=zh_CN.UTF-8
3.配置生效
source /etc/locate.conf
4.断开连接重新登录,echo $LANG
[root@blxx-craw03 ~]# echo $LANG
zh_CN.UTF-8
[root@blxx-craw03 ~]#
5.如果不生效 则在/etc/profile最后添加:
export LANG=zh_CN.UTF-8
原文地址:https://www.cnblogs.com/sdhzdtwhm/p/9619236.html