This is the 17th day of my participation in the August More text Challenge. For details, see: August More Text Challenge
A lifelong learner, practitioner, and sharer committed to the path of technology, an original blogger who is busy and sometimes lazy, and a teenager who is occasionally boring and sometimes humorous.
Welcome to search “Jge’s IT Journey” on wechat!
Install the Nexus private server repository on Linux
Introduction to the Nexus Private Server repository
Nexus is a powerful Maven repository manager that greatly simplifies maintenance of local internal repositories and access to external repositories. Can also be used to create a variety of private repositories such as Yum, pypi, NPM, Docker, Nuget, RubyGems, etc.
Install the Nexus private server repository
System Settings in Linux # / etc/security/limits the conf in this file to add content nexus - nofiles 65536 requires Java 1.8 or more running environmentCopy the code
Install the JDK
# tar -xzf jdk-8u211-linux-x64.tar.gz -c /usr/local/ # vim /etc/profile export JAVA_HOME=/usr/local/jdk1.8.0_211/ export JRE_HOME = / usr/loca/jdk1.8.0 _211 / jre export CLASSPATH = $JAVA_HOME/lib/tools. The jar: $JAVA_HOME/lib/dt. The jar export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH # source /etc/profileCopy the code
Download the Nexus installation package
# wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz # mkdir /opt/nexus # tar -xzf Nexus -3.16.1-02-unix.tar.gz -c /opt/nexus # useradd Nexus # Run # chown -r nexus. Nexus /opt/nexus the two files after nexus decompress Nexus-xxx Files needed to run the Nexus, For example, run the script and rely on the JAR package sonatyp-work. This directory contains configuration files, log files, and warehouse files generated by Nexus Run_as_user ="nexus" ---- # CD /nexus/ nexy.x.x.x /bin/ # vim nexus INSTALL4J_JAVA_HOME_OVERRIDE=/usr/local/jdk1.8.0_144 # line 14 3) Use the default port # CD /nexus/nexusx.x.x.x/bin # vim nexus-default.properties Use the default # CD /nexus/nexusx.x.x.x/bin/ # vim nexus. VmoptionsCopy the code
5. Modify the configuration file and run it
# # sudo su - nexus CD/opt/nexus/nexus. X.X.X/bin #. / nexus run & # # the background using web page http://localhost:8081 initial setting agent warehouse account and password: admin/admin123Copy the code
Vi. Repository configuration (PYPI repository configuration)
To configure the PYPI repository, perform the following steps:
1. Establish the official agency warehouse
2. For the remote index address, the address is pypi.python.org/; mirrors.aliyun.com ; pypi.tuna.tsinghua.edu.cn; Configure multiple domestic resources
3. Establish hosted warehouse for internal use of MYPTPI-Hosted
4. Create a group warehouse and add the official agent configuration to it
When using PIP, use -i to specify the repository address and the –trusted-host parameter to specify the trusted host
pip install -i http://localhost:8081/repository/pypigroup/simple/ --no-cache-dir -r requirements.txt --trusted-host
Copy the code
2. Configure the private server address in the configuration file ~/.pip/pip.conf. If the file does not exist, add the file. The contents of the configuration file are as follows
[global]
index-url=nexus.menghuanhua.com:8081/repository/df-pipy-public/simple/
[install]
trusted-host=nexus.menghuanhua.com
Copy the code
Configure the NPM repository
1. Create a Hosted NPM library
Storage: Blob Store, select the previously created dedicated Blob Hosted: Development environment that runs repeated publishing, so select Allow Rede PloyCopy the code
Create a proxy repository
Proxy: remote storage: remote warehouse address, fill in: https://registry.npm.taobao.orgCopy the code
Create an NPM repository of type group
Storage: select bloB to install. Npm-hub Group: Add the two optional repositories on the left to the right under membersCopy the code
Viii. Verification and use
# NPM config get registry # NPM config get registry # NPM Config set registry http://x.x.x.x/repository/group-npm # NPM config get reagistry 5, find a node related projects, installation of compilation # NPM installCopy the code
Recommended reading
99% of Linux operation and maintenance engineers must master the command and use
Common commands of the Oracle database in Linux
Common commands of the vi/vim editor in Linux
Install and manage programs in Linux (basic process of package encapsulation, RPM command, source code compilation and installation)
Manage accounts and rights in Linux
Linux disk and file system management
Process and scheduled task management in Linux
Analyze and rectify system faults in Linux
Common KVM commands in Linux
Easily take you to play with the Linux environment under the date syntax!
Exciting 10 command line games that anyone can play with just 2 commands!
17 Funny, but useless, Linux Easter Eggs. It’s the ultimate fun!
Yum warehouse configuration and use, really sweet ah!
Linux graphical terminal screenshot and shortcut key practical tips!
Install and configure GitLab on Linux
In this paper, to the end.
Original is not easy, if you think this article is a little useful to you, please give me a like, comment or forward for this article, because this will be my power to output more quality articles, thanks!
By the way, dig friends remember to give me a free attention yo! In case you get lost and you can’t find me next time.
See you next time!