======================== VNC ====================================
# sudo apt install x11vnc
# sudo x11vnc
Now goto Mobaxterm –> Start New Romte Session –> VNC
======================== VS Code =================================
https://github.com/cdr/code-server
# curl -fsSL https://code-server.dev/install.sh | sh -s — –dry-run
AlmaLinux 8.4 (Electric Cheetah)
Installing v3.12.0 of the amd64 rpm package from GitHub.
# mkdir -p ~/.cache/code-server
# curl -#fL -o ~/.cache/code-server/code-server-3.12.0-amd64.rpm.incomplete -C – https://github.com/cdr/code-server/releases/download/v3.12.0/code-server-3.12.0-amd64.rpm
# mv ~/.cache/code-server/code-server-3.12.0-amd64.rpm.incomplete ~/.cache/code-server/code-server-3.12.0-amd64.rpm
# rpm -i ~/.cache/code-server/code-server-3.12.0-amd64.rpm
To have systemd start code-server now and restart on boot:
# sudo systemctl enable –now code-server@$USER
# code-server –port 3000
# chmod +x ~/.config/code-server/config.yaml
goto and get the password from: vi /root/.config/code-server/config.yaml
Allow Port
# firewall-cmd –zone=public –permanent –add-port=3000/tcp
# firewall-cmd –zone=public –permanent –add-port=8080/tcp
# firewall-cmd –reload
$ sudo firewall-cmd –runtime-to-permanent
=======================Install Java + Maven ======================================================
# sudo dnf install java-11-openjdk-devel
# java -version
# w!get https://downloads.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.tar.gz -P /tmp
# sudo tar xf /tmp/apache-maven-3.8.3-bin.tar.gz -C /opt
# sudo ln -s /opt/apache-maven-3.8.3 /opt/maven
# sudo nano /etc/profile.d/maven.sh
Paste the following code:
export JAVA_HOME=/usr/lib/jvm/jre-openjdk
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
# sudo chmod +x /etc/profile.d/maven.sh
# source /etc/profile.d/maven.sh
# mvn -version
================================ Install Apache Tomcat ==============================================
# sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat
# w!get https://downloads.apache.org/tomcat/tomcat-9/v9.0.54/bin/apache-tomcat-9.0.54.tar.gz -P /tmp
# sudo tar -xf /tmp/apache-tomcat-9.0.54.tar.gz -C /opt/tomcat/
# sudo ln -s /opt/tomcat/apache-tomcat-9.0.54.tar.gz /opt/tomcat/apache-tomcat-9.0.54/
# sudo chown -R tomcat: /opt/tomcat
# sudo sh -c ‘chmod +x /opt/tomcat/apache-tomcat-9.0.54/bin/*.sh’
# sudo nano /etc/systemd/system/tomcat.service
Paste the following content:
[Unit]
Description=Tomcat 9 servlet container
After=network.target
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment=”JAVA_HOME=/usr/lib/jvm/jre-openjdk”
Environment=”JAVA_OPTS=-Djava.security.egd=file:///dev/urandom”
Environment=”CATALINA_BASE=/opt/tomcat/apache-tomcat-9.0.54/”
Environment=”CATALINA_HOME=/opt/tomcat/apache-tomcat-9.0.54/”
Environment=”CATALINA_PID=/opt/tomcat/apache-tomcat-9.0.54/temp/tomcat.pid”
Environment=”CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC”
ExecStart=/opt/tomcat/apache-tomcat-9.0.54/bin/startup.sh
ExecStop=/opt/tomcat/apache-tomcat-9.0.54/bin/shutdown.sh
[Install]
WantedBy=multi-user.target
# sudo systemctl daemon-reload
# sudo systemctl enable –now tomcat
# sudo systemctl status tomcat
# sudo nano /opt/tomcat/apache-tomcat-9.0.54/conf/tomcat-users.xml
Copy and paste the following lines:
<role rolename=”admin”/>
<role rolename=”admin-gui”/>
<role rolename=”manager”/>
<role rolename=”manager-gui”/>
<user username=”zafar” password=”zafims@123″ roles=”admin,admin-gui,manager,manager-gui”/>
# sudo nano /opt/tomcat/apache-tomcat-9.0.54/webapps/manager/META-INF/context.xml
Find and comment following lines of code:
<Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ />
Just add <!– at the beginning and –> in the end, after that, this will look like something this:
i.e
<!– <Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ /> –>
Finally, restart Apache Tomcat 10 service:
# sudo systemctl restart tomcat
Testing Installation #
Open your browser and type:
http://<your_domain_or_IP_address>:8080
http://<your_domain_or_IP_address>:8080/manager/html
http://<your_domain_or_IP_address>:8080/host-manager/html
======================== Zsh =====================================
Install Zsh :-
# sudo yum update && sudo yum -y install zsh
Make it your default
# chsh -s $(which zsh)
Install oh-my-zsh :-
# sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
Theme
# vi ~/.zshrc
Just set ZSH_THEME to blank: ZSH_THEME=””
ex : ZSH_THEME=”simonoff”
Profile:-
simonoff
xiong-chiamiov-plus
jonathan
agnoster
================================================================================
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
# echo “source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh” >> ${ZDOTDIR:-$HOME}/.zshrc
# source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Start a new terminal session.
# git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
# source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
Start a new terminal session.
# vi ~/.zshrc
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
============Plugins install other way===============================================
Oh My Zsh
1. —-> Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
# vi ~/.zshrc
plugins=(
# other plugins…
zsh-autosuggestions
)
3. Start a new terminal session.
1. —-> Manual (Git Clone)
Clone this repository somewhere on your machine. This guide will assume ~/.zsh/zsh-autosuggestions.
# git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
2. Add the following to your .zshrc:
# source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
3. Start a new terminal session.
============================================================================