香蕉与打火机

机器学习和AI的时代来了

Latest Posts

centos安装epel及remi

centos安装epel及remi

原文:http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x

How to install RHEL EPEL repository on Centos 5.x or 6.x

The following article will describe how to configure a CentOS 5.x-based or Centos 6.x-based system to use Fedora Epel repos and third party remi package repos. These package repositories are not officially supported by CentOS, but they provide much more current versions of popular applications like PHP or MYSQL.

Install the extra repositories

The first step requires downloading some RPM files that contain the additional YUM repository definitions. The instructions below point to the 64-bit versions that work with our Cloud Server instances.

Centos 5.x


wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Centos 6.x


wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Once installed you should see some additional repo definitions under the /etc/yum.repos.d directory.


$ ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo
/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/remi.repo

Enable the remi repository

The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services. That means it generally is not a bad idea to enable the remi repositories by default.

First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:


sudo vim /etc/yum.repos.d/remi.repo

Edit the [remi] portion of the file so that the enabled option is set to 1. This will enable the remi repository.


name=Les RPM de remi pour Enterprise Linux $releasever – $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

You will now have a larger array of yum repositories from which to install.

Centos设置代理

Centos设置代理

  • yum源

   编辑/etc/yum.conf 文件

   添加:

       #Proxy

       proxy=http://username:password@yourproxy:8080/

  • 全局代理

       编辑/etc/profile 文件

       添加:

           # Proxy

           http_proxy=”http://username:password@yourproxy:8080″

           export_http_proxy

           或

           # Proxy

           export http_proxy=”http://username:password@yourproxy:8080″

  • wget代理

       编辑/etc/wgetrc

       添加:

           # Proxy
           http_proxy=http://username:password@proxy_ip:port/

VSS 信息安全

VSS需要将存储信息的目录共享,该目录可被恶意用户拷贝破解,或者删除。这是VSS的方案缺陷,因此通过以下手段进行规避。

方案:

  1. 将原目录文件拷出(设为TEST目录),仅留用户验证用的srcsafe.ini文件。
  2. 将其他数据目录及文件放到另一安全目录(TEST_LOCK)。
  3. TEST目录设为共享,VSS用户具有全部权限。
  4. TEST_LOCK目录设为共享,VSS用户具有读写权限。
  5. TEST_LOCK下面的各个子文件夹另外设置权限:“列出文件名和目录”权限拒绝(这样一来用户无法访问及拷贝)。
  6. 修改srcsafe.ini文件,将data等VSS目录的地址指向TEST_LOCK.

Vss 搭建与配置

  1. 搭建
    • windows下安装Vss2005
    • 在windows下为每个Vss用户添加账户
  2. 配置
    • 配置Vss server(打开Visual SourceSafe Administrator)
        1. 创建Vss database(File->new database)
        2. 为database创建用户(Users->add user)
        3. 打开用户权限管理(Tools->Options->Project rights)。如图打钩:wKioL1NpxKOi1XChAAIBM4T9ImI324.jpg
        4. 为database创建project(Archive->Archive projects->根据需要下一步)
        5. 定义project用户权限(Tools->rights by project)
  3. 配置客户端(打开Visual SourceSafe 按图依次操作)

wKioL1Npy_CyC7MDAAFuDE6ijrE869.jpg

wKiom1NpzBuAwVrBAAF7dERKMlc468.jpg

wKioL1Npy_DBONCmAAEQOWwkX6E075.jpg

wKiom1NpzBvCgMgCAALxSP5Par4442.jpg

wKioL1Npy_DChzBkAAKWl2euobo747.jpg

wKiom1NpzBvCL5qzAAGYLCdFu4s361.jpg

wKioL1Npy_HhXKxyAAJKgAiotsg956.jpg

wKiom1NpzByySZKEAAEaP79uVA4168.jpg

wKioL1Npy_HQGRJPAAEY5WCMzac163.jpg

wKiom1NpzByTH2lEAAFbJiBkQSY644.jpg

查询或者修改数据的inner连接方法

查询或者修改数据的inner连接方法

http://home.51cto.com/index.php?s=/Home

1

UPDATE product p, productPrice pp

SET pp.price = pp.price * 0.8

WHERE p.productId = pp.productId

AND p.dateCreated < ‘2004-01-01’

2

UPDATE product p

INNER JOIN productPrice pp

ON p.productId = pp.productId

SET pp.price = pp.price * 0.8

WHERE p.dateCreated < ‘2004-01-01’

3

UPDATE product p

LEFT JOIN productPrice pp

ON p.productId = pp.productId

SET p.deleted = 1

WHERE pp.productId IS null

额,碰到这么合适

额,碰到这么合适

 操作的网页:http://www.minxue.net/11/n-36311.html

被40个下载链接击败了。虽然耗时会多,果断写代码解决之。一个小时后…

修改了包含我要的链接的table名为hhh

 

  1. var aa = document.getElementById("hhh").getElementsByTagName("a");  
  2. var bb = "";  
  3. for(var i=0;i<aa.length;i++){  
  4. bb = bb + aa[i].href + "n";  
  5. }  

记事本写的。。格式就不搞了。。。

 

 

 

 

本文出自 “香蕉与打火机” 博客,请务必保留此出处http://bananalighter.blog.51cto.com/6386339/1126420