[root@nexus ~]# cd /etc/yum.repos.d/
[root@nexus yum.repos.d]# vim nexus-yum.repo
[nexus-yum]
name=nexus-yum
baseurl=http://192.168.40.129:8081/repository/yum
gpgcheck=0
enabled=1
六、创建一个代理yum仓库
[root@nexus ~]# cd /etc/yum.repos.d/
[root@nexus yum.repos.d]# vim nexus-yum.repo
[nexus-yum]
name=nexus-yum
baseurl=http://192.168.40.129:8081/repository/yum-aliyun/$releasever/os/$basearch/
gpgcheck=0
enabled=1
这时,我们可以看到,已经将阿里云的软件包进行了代理,并且,当我们进行了下载时
[root@localhost yum.repos.d]# yum install -y mariadb mariadb-server
...
====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
mariadb x86_64 1:5.5.68-1.el7 nexus-yum 8.8 M
mariadb-server x86_64 1:5.5.68-1.el7 nexus-yum 11 M
Installing for dependencies:
perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 nexus-yum 32 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 nexus-yum 57 k
perl-DBD-MySQL x86_64 4.023-6.el7 nexus-yum 140 k
perl-DBI x86_64 1.627-4.el7 nexus-yum 802 k
perl-Data-Dumper x86_64 2.145-3.el7 nexus-yum 47 k
perl-IO-Compress noarch 2.061-2.el7 nexus-yum 260 k
perl-Net-Daemon noarch 0.48-5.el7 nexus-yum 51 k
perl-PlRPC noarch 0.2020-14.el7 nexus-yum 36 k
Transaction Summary
====================================================================================================
Install 2 Packages (+8 Dependent packages)
...
Dependency Installed:
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
perl-DBD-MySQL.x86_64 0:4.023-6.el7 perl-DBI.x86_64 0:1.627-4.el7
perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7
Complete!
我们可以看到,包已经缓存了下来
七、jenkins 使用 nexus插件
jenkins 插件文档 测试仓库 easy-springmvc-maven
7.1 jenkins 安装插件
7.2 配置 maven 工程
这里涉及到的groupid version 等信息,可以在项目的pom.xml文件中找到。
4.0.0springmvc-maveneasy-springmvc-maven0.0.1warspringmvc-mavensimple demo about how to use maven combine spring mvceasy-springmvc-mavenmaven-compiler-plugin3.11.61.6maven-war-plugin3.0 junitjunit4.12testorg.springframeworkspring-webmvc${spring.version}org.springframeworkspring-jdbc${spring.version}org.springframeworkspring-context${spring.version}org.springframeworkspring-aop${spring.version}org.springframeworkspring-core${spring.version}org.springframeworkspring-test${spring.version}jstljstl1.2taglibsstandard1.1.2UTF-83.1.2.RELEASE
以教员和课程为例介绍一对多关联关系,在这里认为一个教员可以叫多门课程,而一门课程只有1个教员教,这种关系在实际中不太常见,通过教员和课程是多对多的关系。
示例数据:
地址表:
CREATE TABLE ADDRESSES
(
ADDR_ID INT(11) NOT NULL AUTO_INCREMENT,
STREET VAR
In this lesson we used the key "UITextAttributeTextColor" to change the color of the UINavigationBar appearance to white. This prompts a warning "first deprecated in iOS 7.0."
Ins
质数也叫素数,是只能被1和它本身整除的正整数,最小的质数是2,目前发现的最大的质数是p=2^57885161-1【注1】。
判断一个数是质数的最简单的方法如下:
def isPrime1(n):
for i in range(2, n):
if n % i == 0:
return False
return True
但是在上面的方法中有一些冗余的计算,所以
hbase(hadoop)是用java编写的,有些语言(例如python)能够对它提供良好的支持,但也有很多语言使用起来并不是那么方便,比如c#只能通过thrift访问。Rest就能很好的解决这个问题。Hbase的org.apache.hadoop.hbase.rest包提供了rest接口,它内嵌了jetty作为servlet容器。
启动命令:./bin/hbase rest s
下面这段sql本来目的是想更新条件下的数据,可是这段sql却更新了整个表的数据。sql如下:
UPDATE tops_visa.visa_order
SET op_audit_abort_pass_date = now()
FROM
tops_visa.visa_order as t1
INNER JOIN tops_visa.visa_visitor as t2
ON t1.