http://ezprompt.net/
https://www.maketecheasier.com/8-useful-and-interesting-bash-prompts/
https://tecadmin.net/top-5-yum-repositories-for-centos-rhel-systems/
https://gist.github.com/ianhomer/b50bd81316f1e008608b
echo '--ipv4' >> ~/.curlrc
curl -4 ...
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
To do this, add the following lines to
http://linuxtoolkit.blogspot.com/2009/11/turn-off-checking-for-signature-during.html
-disable Disable the specified repos (automatically saves).
To disable all repositories run yum-config-manager --disable \*
https://g4greetz.wordpress.com/2016/10/12/how-to-run-a-yum-update-from-a-specific-repository/
yum —disablerepo="*" —enablerepo="vmware-tools" list available
https://www.cyberciti.biz/faq/centos-fedora-redhat-yum-repolist-command-tolist-package-repositories/
Type the following command:
To list only enabled repos, enter:
To list only disabled repos, enter:
To list all repos (default), enter:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Managing_Yum_Repositories.html
https://www.maketecheasier.com/8-useful-and-interesting-bash-prompts/
PS1="\n\[\e[32;1m\](\[\e[37;1m\]\u\[\e[32;1m\])-(\[\e[37;1m\]jobs:\j\[\e[32;1m\])-(\[\e[37;1m\]\w\[\e[32;1m\])\n(\[\[\e[37;1m\]! \!\[\e[32;1m\])-> \[\e[0m\]"
PS1='\u@\h:\w [$?]\$ '
https://www.ostechnix.com/install-packages-specific-repository-linux/
In RHEL, CentOS and other YUM-based systems, you can install packages from a specific repository as shown below.
https://gist.github.com/ianhomer/b50bd81316f1e008608b
echo '--ipv4' >> ~/.curlrc
curl -4 ...
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
What is a login or non-login shell?
When you login (type username and password) via console, either sitting at the machine, or remotely via ssh:
.bash_profile is executed to configure your shell before the initial command prompt.
But, if you’ve already logged into your machine and open a new terminal window (xterm) inside Gnome or KDE, then
.bashrc is executed before the window command prompt. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.Why two different files?
Say, you’d like to print some lengthy diagnostic information about your machine each time you login (load average, memory usage, current users, etc). You only want to see it on login, so you only want to place this in your
.bash_profile. If you put it in your .bashrc, you’d see it every time you open a new terminal window.Mac OS X — an exception
An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling
.bash_profile instead of .bashrc. Other GUI terminal emulators may do the same, but most tend not to.Recommendation
Most of the time you don’t want to maintain two separate config files for login and non-login shells — when you set a
PATH, you want it to apply to both. You can fix this by sourcing .bashrc from your .bash_profile file, then putting PATH and common settings in .bashrc.To do this, add the following lines to
.bash_profile:https://docs.oracle.com/cd/E37670_01/E37355/html/ol_creating_yum_repo.htmlif [ -f ~/.bashrc ]; then source ~/.bashrc fi
Turn off checking for signature during yum localinstall
yum localinstall is a wonderful utility where I can download and install an rpm package and let yum resolve all the dependencies issues for me. Occasionally, during installation, if I don't want to do a signature check. I can use this commands with a --nogpgcheck flag
# yum localinstall gummi-0.4.2-1.noarch.rpm --nogpgcheck
To enable all repositories run "yum-config-manager --enable \*". --disable Disable the specified repos (automatically saves).
To disable all repositories run yum-config-manager --disable \*
https://g4greetz.wordpress.com/2016/10/12/how-to-run-a-yum-update-from-a-specific-repository/
yum —disablerepo="*" —enablerepo="vmware-tools" list available
Type the following command:
# yum -v repolist
# yum -v repolist | less
# yum repolistTo list only enabled repos, enter:
# yum repolist enabledTo list only disabled repos, enter:
# yum repolist disabledTo list all repos (default), enter:
# yum repolist allhttps://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Managing_Yum_Repositories.html
yum-config-manager--add-reporepository_url
https://serverfault.com/questions/437789/how-to-install-java-1-7-0-openjdk-devel-on-rhel-server-6-3yum-config-manager--enablerepository…
The package you are looking for is in the Red Hat Enterprise Linux Server Optional channel which may not be enabled.
Try this:
yum list installed
# yum repolist all # yum-config-manager --enable rhel-6-server-optional-rpms
I removed the
-devel and it worked:yum install java-1.7.0-openjdk
If you already have another java version installed, don't forget to configure the system so that the new version will be used:
If you already have another java version installed, don't forget to configure the system so that the new version will be used:
alternatives --config java
https://www.server-world.info/en/note?os=CentOS_7&p=jdk8&f=2
yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
# make sure the PATH
[root@dlp ~]#
dirname $(readlink $(readlink $(which java)))
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64/jre/bin
[root@dlp ~]#
vi /etc/profile
# add forrlow to the end
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.el7_2.x86_64
export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
source /etc/profile
|
| [2] | If another version of JDK had been installed, change the default like follows. |
| [root@dlp ~]#
alternatives --config java
|