我试图通过执行以下请求在AWS EC2实例(ubuntu)中安装 REX-Ray :
@Configuration
@EnableResourceServer
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
private @Autowired CustomAuthenticationEntryPoint entryPoint;
private @Autowired TokenStore tokenStore;
private @Autowired DataSource ds;
private static final String RESOURCE_ID = "jumping_api";
@Bean
@ConfigurationProperties(prefix = "spring.datasource")
public DataSource oauthDataSource() {
DataSource ds = DataSourceBuilder.create().build();
return ds;
}
@Bean
public TokenStore getTokenStore() {
return new JdbcTokenStore(oauthDataSource());
}
@Override
public void configure(HttpSecurity http) throws Exception {
http.anonymous().disable()
.authorizeRequests()
.anyRequest().authenticated()
.and().exceptionHandling().authenticationEntryPoint(entryPoint);
}
@Override
public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
resources.resourceId(RESOURCE_ID).tokenStore(tokenStore);
}
}
文章:https://rexray.readthedocs.io/en/v0.3.2/
运行此请求后,出现此错误:
sh:第1行:禁止 !:找不到命令
我以前没有遇到过此类错误,什么原因导致了此问题?
答案 0 :(得分:0)
尝试显示curl -sSL https://dl.bintray.com/emccode/rexray/install
的输出。实际上,它返回Forbidden!
。显然,此命令不存在。
答案 1 :(得分:0)
如果有人遇到此问题,这是我遇到相同问题时所做的,看来rexray的URL已更改:
curl -sSL https://rexray.io/install | sh -s -- stable 0.6.3