Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Setting up a development environment with Git
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This page will detail how to set up EPrints in a development environment that will allow you to keep your local version up to date with any changes made to the EPrints Git repository [http://github.com/eprints/eprints] Ideally you should work through a package install of EPrints before you do this, which will set up users and dependencies for you. You can find a handy video tutorial on how to do that on YouTube [https://www.youtube.com/watch?v=vJ5vf_GXfOI]. Your development environment should ideally emulate your production environment as closely as possible - you may want to run a virtual machine through an application such as VirtualBox, or use a Linux install directly on your development device. == Install Git == In your development environment, open a terminal window. To install Git, use '''sudo apt-get install git''' == Set up the directory == This is the directory we are going to clone the repository into and it needs to sit in ''/usr/share''. For example, you may want to call it ''eprints-git'', so use the command '''sudo mkdir /usr/share/eprints-git'''. ''NOTE: From now on you can replace any instance of <your-directory> with the name you've given your eprints directory. Don't include the <> marks, though!'' We now need to give ownership to the ''eprints'' user and ''www-data'' group. If you don't have an eprints user, you'll need to create one. Set ownership with '''sudo chown eprints:www-data <your-directory>'''. == Clone the repository == The first thing to do now is to change to your new eprints folder with '''cd <your-directory>'''. Now switch to your eprints user with '''sudo su eprints'''. Let's clone the repository into here. Head off to the repository in your browser [http://github.com/eprints/eprints] and take a look at the right hand sidebar. There is a box with the ''HTTPS clone url'' in it - copy this URL and use it in the command '''git clone <the-url>''' on your command line. If all goes to plan, Git should now clone the repository into your directory! == Get your dev EPrints working == Okay, so now things get a little fiddly. Head into the core EPrints libraries by typing '''cd eprints/perl_lib/EPrints'''. Now we're going to create a copy of the template ''SystemSettings.pm'' file. Do this with '''cp SystemSettings.pm.templ SystemSettings.pm'''. We now need to edit this new SystemSettings file. You can do this in your editor of choice. Find the line that reads'' 'base_path' => "/opt/eprints3"''. This should be line 20. You need to edit this to read''' 'base_path' => "/usr/share/<your-directory>/eprints"'' You should also make sure that the ''user'' and ''group'' settings (lines 23 and 24) are correct - these are usually '''eprints'''. Save your changes. Now we need to create a repository. Type '''cd ../../bin'''. From here, '''./epadmin create''' to start the repository creation script. Follow this through to create your new repository. Finally, we need to add our repository as a site. This will be an easy task if you've already installed EPrints from a package (as suggested at the beginning of this documentation!) but the location of the sites is platform dependant. On Ubuntu, you can find them in ''etc/apache2/sites-enabled'', for example. Edit eprints.conf in your text editor of choice and change the path to reflect where your new site lives. Restart your server with '''sudo apache2 restart''' and you should be able to access your new Git enabled site from a browser. If you've changed the hostname for your site, don't forget to edit your hosts file accordingly! == Testing == Last of all its time to run eprints tests, then start your own development [[Unit Tests]] [[Category:Contribute]] [[Category:Howto]]
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)