Nexus3 OSS: Installing Multiple Instances on Windows - nexus

This is actually an informational post to show some undocumented abilities of the windows nexus.exe. If anyone wants to provide some other useful information about Nexus3 OSS installation and/or configuration on Windows that is not readily available in the online books/documentation, that would be great!
I needed to install Nexus3 along side our current Nexus2.x to take advantage of the new repository formats, but Nexus2.x is already running under the default service name of "nexus". How can I provide the service name that Nexus3 will run under on Windows?

Nexus 3 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM3
The documentation now includes instructions to clarify how to install multiple instances for Nexus 3:
https://help.sonatype.com/display/NXRM3/Installation#Installation-RunningasaServiceonWindows
Nexus 2 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM2/Repository+Manager+2
In order to install Nexus3 under a different service name on windows, you will need to use the archive(zip file) download for windows instead of the windows executable installer. Then you simply provide the name you want the service to have as the last parameter of the normal install command.
More specific instructions:
Unpack the zip file into the desired location.
Open a command prompt with elevated permissions (run as administrator) and navigate to the bin directory of the unpacked nexus3 folder.
To create the service:
nexus.exe /install YourUniqueServiceName
To remove the service:
nexus.exe /uninstall YourUniqueServiceName
Note: Creating/Removing the service this way will not delete the nexus installation nor data files; they only affect the windows service. Conversely the windows installer provides an uninstaller executable that will delete the installation files and optionally will also delete the data directory.
Here is some other useful configuration options for changing the port and the data directory location, which you will want to do when installing multiple instances (as in the use case above). Be sure to stop the service if you've already installed it.
To change the port:
Navigate to the "etc" directory under the nexus installation location, and open the "org.sonatype.nexus.cfg" configuration properties file.
Change the "application-port" property to the desired port value.
To change the Data Directory and/or the java.io temporary directory:
Add or modify the following commandline arguments to the "nexus.vmoptions" file in the bin directory:
-Dkaraf.data=InsertDesiredDataDirectoryHere
-Djava.io.tmpdir=InsertDesiredTmpDirectoryHere

Related

Can't install conan recipe from Artifactory OSS server from Bamboo server

I have JFrog Artifactory Community Edition 7.11.2 for C++ installed on a linux server and from my Windows pc I can successfully install required recipes for a project via the conan install .. command. However when I use the same files and scripts on my Bamboo Server (windows) as a build plan I get the following error:
ERROR: Couldn't read login
Conan suggests:
Try removing 'C:\WINDOWS\system32\config\systemprofile\.conan\.conan.db' file.
This I have done but still get the same error.
The Bamboo server runs using the Local System Account.
Are there recommended practices for using Conan with Bamboo for CI uses?
By default, Anonymous user is disabled, which means, only authenticated users can upload or download packages from Artifactory.
If your Bamboo instance is only downloading, without authentication, so first you need to enable the anonymous user access: https://www.jfrog.com/confluence/display/JFROG/Users+and+Groups#UsersandGroups-ManagingUsers
Only administrator account can do it.
The problem was that I had surplus "'s in the remotes.txt file. I had a line like this...
"conancenter" "https://center.conan.io" true when it should of been
conancenter https://center.conan.io true

Where is the Artifactory config file located after installing with RPM?

After installing Artifactory using the RPM installer, where is the Artifactory XML configuration file stored? (The one you can see through the UI at "Admin > Advanced > Config Descriptor")
Have been looking around in "/opt/jfrog/artifactory" and "/etc/opt/jfrog/artifactory" - but havent been able to locate this specific file.
Thanks in advance!
I haven't used the RPM installer, but I've used the Debian installer and the Docker image, and I'd imagine they all put it in the same place:
/var/opt/jfrog/artifactory/etc/artifactory.config.latest.xml
It should also be accessible by symbolic link from:
/opt/jfrog/artifactory/etc/artifactory.config.latest.xml
Other files in that directory in the form of artifactory.config.latest.[numbers].xml are backups or older edits of this file.

Artifactory: Converting remote repo to local repo

My employer has been misusing Bintray as our binary repository for some time. We are finally moving to Artifactory instead and closing down Bintray. But this seems to be an almost impossible task. There is no way of exporting Bintray repos to a zip. Downloading the repos means manually downloading each file from the UI or through their API. I have tried two approaches for automation:
1) wget for crawling our bintray like this:
wget -e robots=off -o ~/wget.log -w 1 -m -np --user --password "https://.bintray.com"
which yielded all of the files in the repos. But this only solves half the problem. I couldn't find out how to import the files to a repository in artifactory (all the repos are over 100mbs each and therefore can't be uploaded, for some reason).
2) I set the Bintray repos up as remote repositories and enabled Active Replication. That seems to have worked for now. But I don't know if they will be removed when the Bintray account is moved or even if they are stored in Artifactory. Therefore I would like to convert the remote repo to a local repo, to make sure that it is permanently stored in artifactory is there a way of doing this? If so, how?
I'll try to address both of your questions below.
What do you mean you can't upload more than 100mb? Which version of Artifactory are you using? On-prem or SaaS-based installation? How are you trying to upload your files to Artifactory? Have you tried to import the content by using the import feature of Artifactory? (Admin --> Import&Export --> repository Import)
It sounds like you are using the UI for the upload, and if so you can configure the max upload size in Admin --> General Configuration page.
If you mean that you have all of the content from Bintray cached in your remote repository cache in Artifactory just use the "Copy" or "Move" option and move the content to a local repository. This will ensure that all of the content is stored locally.

Meteor package incorrect folder name

I just ran the following meteor command:
sudo meteor create --package blah:my-package
and meteor has created a folder called TECM60~2 ... I thought it was supposed to create a folder with the package name - any ideas?
Note: I am running Ubuntu on Virtualbox (developing on Windows) and accessing the package folder via a Samba share to Windows Explorer. I suspect this problem is because Windows does not allow colons in folder names (?)
As per Ethaan's comment, it is possible to create packages without the username: in front of it. I did raise this with the Meteor team and they said they will address this in a fuuture release.

MariaDB on Windows - what is this error when trying to start the database engine?

I am asking this question as an offshoot myself and another SO had from this other MariaDB question:
MariaDB on Windows - getting started help?
When I install MariaDB (v5.2.4), open the command window, navigate to the folder where the files are installed, and type in the following to start the database:
net start mysql
I get the following error:
the service name is invalid
I didn't do anything complex, just ran the installation and tried to get started.
Any ideas?
The error basically tells that installer did not create the service (it currently does not create services), thus you'll need to do it yourself.
start elevated command line
switch to directory of your MariaDB installation (C:\Program Files\MariaDB 5.2.4, something like that)
bin\mysqld --install
and only then
net start mysql
Assuming that there is nothing that runs on port 3306, this will stat.
Alas, the server you will create this way would not be optimized at all.
It is better to create a configuration file my.ini (take a look at MySQL docs and .ini files in the installation directory for examples), and put with performance -related stuff here (innodb bufferpool size etc). With config file, you'll need a different command line to register service (step 3 above):
bin\mysqld --install MySQL --defaults-file=path\to\my.ini
Installer for 5.2.4 is basic indeed. It is being reworked though, new one is going to be better usable.
I installed MariaDB that comes with XAMPP on Windows 10. You will see only mysql in the XAMPP Control Panel. However, if you click Shell on the control panel you can access MariaDB monitor and MariaDB.
Here are some notes:
http://hodentekhelp.blogspot.com/2015/11/how-do-you-access-mariadb-in-xampp.html

Resources