- 浏览: 35218 次
文章分类
最新评论
-
cjh326419411:
如果调用啊 ,$("#vcLoginPwd" ...
Jquery 判断是否锁定大小写键插件 -
HappyWaterLife:
my249645546 写道text-transform:up ...
Jquery 判断是否锁定大小写键插件 -
my249645546:
text-transform:uppercase; 大写tex ...
Jquery 判断是否锁定大小写键插件
fedora 17 安装chrome
- 博客分类:
- Linux
(1)运行sh脚本向yum repo添加chrome源,运行下面的命令
sudo sh google-repo-setup.sh
(2)用yum安装chrome
yum install google-chrome-stable
#!/bin/bash # # Copyright 2007 Google Inc. All Rights Reserved. KEYNAME=linux_signing_key.pub PUBKEYURL="https://dl-ssl.google.com/linux/$KEYNAME" REPOURL="http://dl.google.com/linux" DEBREPO="$REPOURL/deb" RPMREPO="$REPOURL/rpm" ARCH=$(uname -m) DRYRUN=0 export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin usage () { echo "Usage: $(basename $0) [-h] [-n]" echo "-n Don't make any chanages, just show what would happen." echo "-h Show this help message." } writetempfile () { if [ $DRYRUN -eq 0 ]; then TEMPFILE=$(mktemp -q) if [ $? -ne 0 ]; then echo "ERROR: couldn't create temp file." exit 1 fi TEMPFILES="$TEMPFILES \"$TEMPFILE\"" FN="$TEMPFILE" else FN=/dev/stdout # So we have something to print during dry run. TEMPFILE="dry-run" fi while [ $# -gt 0 ]; do echo "$1" >> "$FN" shift done } # Start with 2 because sudo/su use 0/1 internally for return values. ROOTEXITBASE=2 ROOTEXITLAST=$ROOTEXITBASE ROOTCOMMANDS="" declare -a HANDLERS queuecmd () { local OPTNAME local OPTIND while getopts ":e:" OPTNAME do case $OPTNAME in e ) HANDLERS[$ROOTEXITLAST]="$OPTARG" ;; esac done shift $(($OPTIND - 1)) CMD=$1 shift local ARGS="" while [ $# -gt 0 ]; do ARGS="$ARGS\"$1\" " shift done if [ $DRYRUN -eq 0 ]; then if [ "${HANDLERS[$ROOTEXITLAST]}" ]; then ROOTCOMMANDS="$ROOTCOMMANDS $CMD $ARGS || RETVAL=\$((RETVAL+$((2**ROOTEXITLAST++)))) ;" else ROOTCOMMANDS="$ROOTCOMMANDS $CMD $ARGS;" fi else echo "DRY-RUN: $CMD $ARGS" fi } handlerooterror () { EXITCODE=$1 while [ $((ROOTEXITLAST--)) -ge $ROOTEXITBASE ]; do if [ $((2**$ROOTEXITLAST & $EXITCODE)) -ne 0 ]; then if [ "${HANDLERS[$ROOTEXITLAST]}" ]; then ${HANDLERS[$ROOTEXITLAST]} else echo echo "ERROR: Unhandled exit code from root shell: $1." fi fi done } see_webdocs () { echo "Please see http://www.google.com/linuxrepositories/index.html" echo "for information on configuring your system manually." } repoconfig_error () { echo echo "ERROR: Couldn't configure repository settings in '$1'." see_webdocs echo } keyadd_error () { echo echo "ERROR: The package signing key could not be installed." see_webdocs echo } repoapp_error () { echo echo "ERROR: Couldn't configure repository using $1." see_webdocs echo } configRPM () { queuecmd echo "Installing Google package signing key for RPM..." queuecmd -e keyadd_error rpm --import $KEYFILE } #========= # MAIN #========= while getopts ":nh" OPTNAME do case $OPTNAME in n ) DRYRUN=1 echo "--------------------------------------------------------------" echo "Performing dry run. No changes will be made to your system." echo "--------------------------------------------------------------" echo ;; h ) usage exit 0 ;; \: ) echo "'-$OPTARG' needs an argument." usage exit 1 ;; * ) echo "ERROR: invalid command-line option: $OPTARG" echo usage exit 1 ;; esac done shift $(($OPTIND - 1)) # Try to detect the package manager based on distro rules. We could try to # detect the package management programs directly, but that might be confusing # if a system has more than one installed (e.g. an APT-based system might have # rpm installed to be LSB-compliant). if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/lsb-release ]; then eval $(sed -e '/DISTRIB_ID/!d' /etc/lsb-release) case $DISTRIB_ID in *buntu) PACKAGEMANAGER=apt ;; esac fi fi if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/debian_release ] || [ -f /etc/debian_version ]; then PACKAGEMANAGER=apt fi fi if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/fedora-release ]; then PACKAGEMANAGER=yum fi fi if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/SuSE-release ]; then PACKAGEMANAGER=yast fi fi if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/mandriva-release ]; then PACKAGEMANAGER=urpmi fi fi if [ ! "$PACKAGEMANAGER" ]; then if [ -f /etc/redhat-release ] || [ -f /etc/redhat_version ]; then PACKAGEMANAGER=rpm fi fi if [ ! "$PACKAGEMANAGER" ]; then echo "ERROR: Unsupported or unknown package management system." see_webdocs exit 1 else echo "Configuring for '$PACKAGEMANAGER' package manager." fi echo FETCHCMD="" if [ ! "$FETCHCMD" ]; then FETCHPROG=$(which curl 2>/dev/null) if [ "$FETCHPROG" ]; then FETCHCMD="$FETCHPROG -s $PUBKEYURL" fi fi if [ ! "$FETCHCMD" ]; then FETCHPROG=$(which wget 2>/dev/null) if [ "$FETCHPROG" ]; then FETCHCMD="$FETCHPROG -q -O - $PUBKEYURL" fi fi if [ ! "$FETCHCMD" ]; then FETCHPROG=$(which w3m 2>/dev/null) if [ "$FETCHPROG" ]; then FETCHCMD="$FETCHPROG -dump_source $PUBKEYURL" fi fi if [ ! "$FETCHCMD" ]; then FETCHPROG=$(which links 2>/dev/null) if [ "$FETCHPROG" ]; then FETCHCMD="$FETCHPROG -source $PUBKEYURL" fi fi if [ ! "$FETCHCMD" ]; then FETCHPROG=$(which lynx 2>/dev/null) if [ "$FETCHPROG" ]; then FETCHCMD="$FETCHPROG -source $PUBKEYURL" fi fi if [ ! "$FETCHCMD" ]; then echo "ERROR: Couldn't find a program to use to download signing key." echo "ERROR: Please install wget, curl, w3m, links, or lynx." exit 1 else echo "Using '$FETCHPROG' to download key." fi echo if [ $DRYRUN -eq 0 ]; then $FETCHCMD > $KEYNAME if [ $? -eq 0 ]; then chmod a+r $KEYNAME KEYFILE="$(pwd)/$KEYNAME" else echo "ERROR: Failed to download Google key from $PUBKEYURL." exit 1 fi else # So we have something to print during dry run. KEYFILE="dry-run" fi echo "Key file is '$KEYFILE'." echo case $PACKAGEMANAGER in apt) APTKEYPROG=$(which apt-key 2>/dev/null) # If they don't have apt-key, it's not secure APT, so they can't check # package sigs. if [ ! "$APTKEYPROG" ]; then echo "WARNING: You don't appear to be running a signature-aware version of APT." echo "WARNING: The Google package signing key won't be installed," echo "WARNING: and package downloads won't be validated." echo else queuecmd echo "Installing Google package signing key..." queuecmd -e keyadd_error $APTKEYPROG add "$KEYFILE" fi queuecmd echo "Adding Google repository to APT sources..." DEBLINE="deb $DEBREPO/ stable non-free main" eval `apt-config shell APTBASEDIR "Dir" APTDIRETC "Dir::Etc" APTSOURCELIST "Dir::Etc::sourcelist" APTSOURCELISTD "Dir::Etc::sourceparts"` # Try to keep our customizations separate. if [ "$APTSOURCELISTD" ]; then LISTFILE="$APTBASEDIR$APTDIRETC$APTSOURCELISTD/google.list" writetempfile \ "# Google software repository" \ "$DEBLINE" queuecmd -e "repoconfig_error $LISTFILE" cp -f "$TEMPFILE" "$LISTFILE" queuecmd chmod a+r "$LISTFILE" # Otherwise use the global sources.list. else LISTFILE="$APTBASEDIR$APTDIRETC$APTSOURCELIST" # Don't add it if it's already there. grep -q -s "^$DEBLINE" "$LISTFILE" if [ $? -gt 0 ]; then writetempfile "" \ "# Google software repository" \ "$DEBLINE" queuecmd -e "repoconfig_error $LISTFILE" sh -c "cat '$TEMPFILE' >> '$LISTFILE'" fi fi queuecmd echo "added to '$LISTFILE'" echo # Refresh the index files to make sure our apps show up immediately. queuecmd echo "Syncing repository index..." queuecmd apt-get -qq update ;; yum) configRPM if [ -d "/etc/yum.repos.d" ]; then queuecmd echo "Adding Google repository to YUM configs..." # On x86_64 distro, hardcode the arch of the repository. if [ "$ARCH" = "x86_64" ]; then YUMARCH="i386" else YUMARCH="\$basearch" fi REPOFILE=/etc/yum.repos.d/google.repo writetempfile \ "[google]" \ "name=Google - $YUMARCH" \ "baseurl=$RPMREPO/stable/$YUMARCH" \ "enabled=1" \ "gpgcheck=1" queuecmd -e "repoconfig_error $REPOFILE" cp -f "$TEMPFILE" "$REPOFILE" queuecmd chmod a+r "$REPOFILE" queuecmd echo "created '$REPOFILE'" else echo "WARNING: YUM repository configs not found." echo "WARNING: Google repository will not be added." fi echo ;; yast) # Don't need to do rpm key install separately since yast should find # repomd.xml.asc file automatically. queuecmd echo "Adding Google repository to YaST2 configs..." queuecmd -e "repoapp_error zypper" \ zypper sa -t YUM $RPMREPO/stable/i386 google echo ;; urpmi) # Don't need to do rpm key install separately since urpmi should find pubkey # file automatically. queuecmd echo "Adding Google repository to urpmi configs..." queuecmd -e "repoapp_error urpmi.addmedia" \ urpmi.addmedia google $RPMREPO/stable/i386 with hdlist.cz echo ;; rpm) echo "WARNING: Unable to configure this system to use Google's APT or YUM repositories." echo configRPM ;; esac SHELLCMD="RETVAL=0 ; $ROOTCOMMANDS exit \$RETVAL" # If this isn't a dry run, and we're not root yet, become root to run the # queued commands. if [ "$ROOTCOMMANDS" ] && [ `id -u` != '0' ]; then echo "WARNING: You are not running as root, but repository configuration" echo "WARNING: requires root privileges." echo echo "Attempting to become root..." # Try sudo. Some systems don't have users configured in /etc/sudoers by # default. Mandriva doesn't even install sudo by default. SUDOPRG=$(which sudo 2>/dev/null) if [ "$SUDOPRG" ]; then echo "Trying 'sudo'. Enter your password when prompted." $SUDOPRG -k $SUDOPRG sh -c "$SHELLCMD" res=$? else res=1 fi if [ $res -eq 1 ]; then echo echo "WARNING: Failed to invoke 'sudo'." # Try su. This won't work on systems that don't have a root password by # default (e.g. Ubuntu), but those should have sudo configured by default. echo "Trying 'su'. Enter root's password when prompted." su root -c "$SHELLCMD" res=$? if [ $res -eq 1 ]; then echo echo "ERROR: Could not gain root privileges." echo "ERROR: Please re-run from a root login." exit 1 fi fi # Check if root shell exited with one of our errors. if [ $res -ge $ROOTEXITBASE ]; then handlerooterror $res exit $res fi elif [ "$ROOTCOMMANDS" ]; then sh -c "$SHELLCMD" fi # Cleanup. if [ "$TEMPFILES" ]; then eval "rm $TEMPFILES" fi echo echo "Done."
参考网站;http://code.google.com/p/lpotato/source/browse/trunk/
- google-repo-setup.zip (3.8 KB)
- 下载次数: 5
发表评论
-
Linux 安装记录
2013-05-05 22:15 7491.flash安装 #tar zxvf install_ ... -
SUSE相关
2013-05-03 16:26 624ESXi安装全过程及基本配置http://www.linux ... -
SUSE11安装JDK6
2013-05-03 16:15 7971.首先确认java6是否适合SUSE11系统 登录 ht ... -
SUSE 修改IP
2013-05-03 16:13 942第一种SUSE Linux IP设置方法ifconfig e ... -
Linux 中文乱码
2013-04-03 16:10 6281.Gedit 中文乱码 gsettings set o ... -
关于fedora 17启动时显示cannot open font file true的解决办法
2012-08-12 11:20 901打开/etc/default/grub 文件将GRUB ... -
linux 笔记
2012-06-11 16:56 547linux目录架构/ 根 ... -
linux下find和grep两大重要命令(内含正则表达式的基础部分)
2012-05-28 09:17 1315linux下find和grep命令 ... -
node.js 在linux (fedora 16)上的源码安装
2012-05-25 13:06 8511、源码安装环境 wget http://nod ... -
git 整合apache
2012-03-19 16:09 2045SSH协议私服 适合公司内部小型团队使用的是SSH协议 ... -
Linux 下SVN自动启动脚本
2012-04-27 11:01 14831.创建执行脚本svn.sh(/root路径下),其内容 ...
相关推荐
Fedora 26 chrome 60
chrome.rpm redhat,fedora,centOs适用,
Chrome是一款由Google公司开发的网页浏览器。该浏览器基于其他开源软件(如WebKit)撰写,目标是提升稳定性、速度和安全。Google Chrome 是一款快速、易用且安全的网络浏览器。此版 Chrome 是专为windows10 64位设计...
最新版的谷歌浏览器的rpm包,适合fedora,opensuse等redhat系列的linux安装,传上来分享给大家!
Fedora 阿里云源 repo 文件 vscode teamviewer rpmfusion remi chrome
google-chrome-stable_current_x86_64.rpm Version 62.0.3202.62 (Official Build) (64-bit) Fedora26 安装方式 #dnf install -y google-chrome-stable_current_x86_64.rpm
crouton-fedora:Fedora 的 crouton 版本 这是 Crouton 的修改版本,可将 Fedora 安装到您的 Chromebook 上。 这个版本并不像带有 ... Crouton Fedora chrome 应用程序和 VNC 说明: 安装 VirtualBox: 运行Docker:
本菜谱会在编译时安装Google Chrome浏览器( ),提供chrome_version库方法来检索已安装的Chrome版本,并提供master_preferences资源来设置用户首选项。 要求 厨师12.14+ 平台类 CentOS 7,Red Hat 7,Fedora ...
chrome-hidefedora, Chrome 扩展删除 troll youtube评论 隐藏 Fedora用于删除 fedora Youtube评论的 Chrome 扩展。 后端提供的 https://github.com/Fogest/hidefedora-web 服务。可以在 https://chrome.googl
Arch Linux上的gtk-engine-murrine Fedora上的gtk-murrine-engine gtk2-engine-murrine在openSUSE上gtk2-engines-murrine在Debian,Ubuntu等上bc —建立依赖关系安装手动安装在终端中运行以下命令: ./install.sh ...
用于安装 Google Chrome 的 Puppet 模块。 这个模块目前是特定于 Ubuntu 的,尽管将它扩展到 Chrome 支持的其他 Linux 发行版(Debian、Fedora 和 openSUSE)会相对简单。
这是 Crouton 的修改版本,可将 Fedora 安装到您的 Chromebook 上。 这个版本并不像带有 Debian/Ubuntu 的 Crouton 的主要版本那么精致。 如果您不熟悉 Crouton 项目,请不要使用它,因为它比这个版本好得多。 这个...
它还通过EC2用户数据Shell脚本安装各种程序。 各种程序包括:-Armor Agent 3.0 -Chrome -Apache2 -xrdp-用户+远程桌面密码。 在install_userdata_fedora.sh文件中更改ARMOR许可证密钥。 在与main.tf文件相同的目录...
在Centos / Fedora服务器上安装NewCrawler和Chrome软件包: x86 curl -fsSL | SH # OS Version 、 NewCrawler Directory [root@localhost ~]# rpm -q centos-release centos-release-7-0.1406.el7.centos....
带宽获取一系列 url 的页面...777(我知道:) 安装 chrome 扩展页面加载时间( ) 在扩展文件 timer.js 上应用补丁 timer.patch(在 Linux 上,至少在 Fedora 上,可以在 ~/.config/google-chrome/Default/Extensions/...
fedora目录还展示了自动安装不同方法:使用 , , 和 。 所有方法都涉及分区和典型的安装后任务。 其中一些包括高级配置选择,例如Btrfs RAID-1和加密的根设置。 还有一些特定于应用程序的设置(例如,用于Firefox...
SDN可视化 软件定义的网络监视和可视化系统。 作者: , , 网站: ... 它与大多数现代浏览器兼容(例如Chrome> = 30,Firefox> = 25,Internet Explorer> = 11,Opera> = 17,Edge)。 先决条件 *
对于Arch Linux,AUR中提供了一个PKGBUILD:https://aur.archlinux.org/packages/chrome-gnome-shell-git对于Debian,Fedora,Gentoo和Ubuntu,可以安装名为“ chrome-gnome-shell”的软件包”。 您也可以手动安装...