DSpace Installation behind proxy server

Dear All

I along with Mr. Kapil Kumar Gupta have recently visited XYZ library for data conversion and implementation of Koha and DSpace. We have successfully migrated their old data and implemented the Koha (version 16.05) and DSpace (version 5.5). We have installed everything live but i was badly stuck on internet connectivity issue at the time of installing the package from terminal command because of proxy settings. I could able to set proxy in a  browser but even though terminal command was not working like “apt-get update” etc. I could able to search the solution for internet connectivity from terminal command which is explained below after which there was no issue in running the commands for downloading and installing the packages from internet.

Proxy setting for Internet access via terminal

Open the /etc/environment file with nano/gedit/vi command and paste the following lines:

http_proxy=”http://user_name:password@myproxy.server.com:8080/”
https_proxy=”http://user_name:password@myproxy.server.com:8080/”
ftp_proxy=”http://user_name:password@myproxy.server.com:8080/”
no_proxy=”localhost,127.0.0.1,localaddress,.localdomain.com”
HTTP_PROXY=”http://user_name:password@myproxy.server.com:8080/”
HTTPS_PROXY=”http://user_name:password@myproxy.server.com:8080/”
FTP_PROXY=”http://user_name:password@myproxy.server.com:8080/”
NO_PROXY=”localhost,127.0.0.1,localaddress,.localdomain.com”

User_name = is your username given by institute to access the internet
password  = is password against the username to access the internet

During installation of DSpace  everything went correct and smoothly but at the time of running the command “mvn maven” system again deny the downloading of packages/files, which again encouraged us to find the solution and we got the following:

Proxy setting in maven

Find the settings.xml file in maven installation directory and uncomment the proxies section and add your proxy server details and access credentials.

<settings xmlns=”http://maven.apache.org/SETTINGS/1.0.0″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-
1.0.0.xsd”>
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies>
<proxy>
<id>{my-name-for-maven-settings}</id>
<active>true</active>
<protocol>http</protocol>
<host>{my-proxy-hostname}</host>
<port>{my-proxy-port}</port>
<username>{my-proxy-username}</username>
<password>{my-proxy-password}</password>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
<profiles/>
<activeProfiles/>
</settings>
You can test the Maven installation and network connectivity by running “mvn clean” this will give that message BUILD FAILURE because it requires a pom.xml file but the output will indicate whether maven is able to download packages from itsrepositories.

Proxy setting for Ant

Part of the DSpace installation needs to download files form web. If you are accessing the internet through a proxy you may need to tell ant the proxy details. Edit /etc/environment and add the following lines, filling the details of your HTTP proxy:
export ANT_OPTS=”-Dhttp.proxyHost=<proxy address> -Dhttp.proxyPort=<proxy port>”
Not that the proxy address should contain only the domain name (or IP
address) and not include ‘http://’
References:
http://www.repository.rnra.rw/xmlui/bitstream/handle/123456789/3510/ANNEX%204A.%20Installing%20DSpace.pdf?sequence=1
http://askubuntu.com/questions/175172/how-do-i-configure-proxies-without-gui
http://askubuntu.com/questions/158557/setting-proxy-from-terminal
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather