Academia JavaEE Workspace in Ubuntu: Difference between revisions
Jump to navigation
Jump to search
| (176 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | {|class='wikitable' style='width:100%;margin:-11px 0 6px 0' | ||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
echo 'apt-get update;echo;apt list -a --upgradable;apt-get upgrade -y'|sudo bash | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
for package in apt-transport-https ca-certificates gnupg build-essential | |||
do apt-get install -y ${package};done | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
for package in software-properties-common git curl file procps libfuse2 | |||
do apt-get install -y ${package};done | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
for release in 8 11 17 21 | |||
do apt-get install -y openjdk-${release}-jdk;done | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
for package in ant npm maven nodejs | |||
do apt-get install -y ${package};done | |||
EXE | |||
</syntaxhighlight> | |||
|} | |||
== | ==Text Editor » Sublime== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left' colspan='2'| | |||
Text Editor » Sublime | |||
sudo | |- | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg\ | |||
| sudo tee /etc/apt/keyrings/sublime-text.asc >/dev/null | |||
< | cat << SRC | sudo tee /etc/apt/sources.list.d/sublime-text.list >/dev/null | ||
sudo tee /usr/share/applications/SpringToolSuite4.desktop | deb [arch=$(dpkg --print-architecture)\ | ||
signed-by=/etc/apt/keyrings/sublime-text.asc]\ | |||
https://download.sublimetext.com/ apt/stable/ | |||
SRC | |||
echo 'apt-get update;echo;apt-get install -y sublime-text'|sudo bash | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==JetBrains Toolbox== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left'| | |||
JetBrains Toolbox | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
wget -cq https://download-cdn.jetbrains.com/toolbox/jetbrains-toolbox-2.4.0.32175.tar.gz -P ${HOME}/Downloads | |||
tar -xzf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175.tar.gz -C ${HOME}/Downloads | |||
rm -rf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175.tar.gz | |||
sudo apt update && sudo apt install libfuse2 | |||
${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175/jetbrains-toolbox | |||
rm -rf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175 | |||
</syntaxhighlight> | |||
|} | |||
==Spring Tool Suite== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left'| | |||
Spring Tool Suite | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
mkdir -p /opt/ide | |||
wget -cq https://cdn.spring.io/spring-tools/release/STS4/4.23.1.RELEASE/dist/e4.32/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz -P /opt/ide | |||
tar -xzf /opt/ide/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz -C /opt/ide | |||
rm -rf /opt/ide/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz | |||
EXE | |||
# https://marketplace.eclipse.org/content/jaspersoft-studio | |||
# https://projectlombok.org/setup/eclipse | |||
cat <<-'EXE'|sudo bash | |||
mkdir -p /opt/ide/lombok/bin | |||
wget -cq https://projectlombok.org/downloads/lombok.jar -P /opt/ide/lombok/bin | |||
java -jar /opt/ide/lombok/bin/lombok.jar | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='ini'> | |||
cat << INI | sudo tee /usr/share/applications/SpringToolSuite4.desktop >/dev/null | |||
[Desktop Entry] | [Desktop Entry] | ||
Name=SpringSource Tool Suite 4 | Name=SpringSource Tool Suite 4 | ||
Comment=SpringSource Tool Suite 4 | Comment=SpringSource Tool Suite 4 | ||
Exec=/opt/ide/sts-4. | Exec=/opt/ide/sts-4.23.1.RELEASE/SpringToolSuite4 | ||
Icon=/opt/ide/sts-4. | Icon=/opt/ide/sts-4.23.1.RELEASE/icon.xpm | ||
Keywords=Java,Eclipse,Spring,IDE,Development | |||
Categories=Development;IDE;Java; | |||
StartupNotify=true | |||
Type=Application | |||
Terminal=false | |||
INI | |||
</syntaxhighlight> | |||
|} | |||
==Jasper Studio CE== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left'| | |||
Jasper Studio CE | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
mkdir -p /opt/ide | |||
tar -xzf ${HOME}/Downloads/js-studiocomm_7.0.1_linux_x86_64.tgz -C /opt/ide | |||
rm -rf ${HOME}/Downloads/js-studiocomm_7.0.1_linux_x86_64.tgz | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='ini'> | |||
cat << INI | sudo tee /usr/share/applications/JasperStudio.desktop >/dev/null | |||
[Desktop Entry] | |||
Name=Jasper Studio CE | |||
Comment=Jasper Studio CE 7.0.1 | |||
Exec='/opt/ide/js-studiocomm_7.0.1/Jaspersoft Studio' | |||
Icon='/opt/ide/js-studiocomm_7.0.1/icon.xpm' | |||
Keywords=Java,Eclipse,Jasper,IDE,Development | |||
Categories=Development;IDE;Java; | |||
StartupNotify=true | |||
Type=Application | |||
Terminal=false | |||
INI | |||
</syntaxhighlight> | |||
|} | |||
==Camunda== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left'| | |||
Camunda | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
mkdir -p /opt/ide | |||
mkdir -p /tmp/camunda/images | |||
wget -cq https://downloads.camunda.cloud/release/camunda-modeler/5.25.0/camunda-modeler-5.25.0-linux-x64.tar.gz -P /opt/ide | |||
tar -xzf /opt/ide/camunda-modeler-5.25.0-linux-x64.tar.gz -C /opt/ide | |||
chmod 4755 /opt/ide/camunda-modeler-5.25.0-linux-x64/chrome-sandbox | |||
rm -rf /opt/ide/camunda-modeler-5.25.0-linux-x64.tar.gz | |||
wget -cq https://camunda.com/wp-content/uploads/2022/09/Camunda_Secondary_Logo.zip -P /tmp/camunda | |||
unzip -qq /tmp/camunda/Camunda_Secondary_Logo.zip -d /tmp/camunda/images/ | |||
cp /tmp/camunda/images/Secondary-Logo_Rounded-Orange.png \ | |||
/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler.png | |||
rm -rf /tmp/camunda/ | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='ini'> | |||
cat << INI | sudo tee /usr/share/applications/CamundaModeler.desktop >/dev/null | |||
[Desktop Entry] | |||
Name=Camunda Modeler 5 | |||
Comment=Camunda Modeler 5.25.0 | |||
Exec=/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler | |||
Icon=/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler.png | |||
Keywords=Camunda,Modeler,BPMN,IDE,Development | |||
Categories=Development;IDE;BPMN; | |||
StartupNotify=true | StartupNotify=true | ||
Type=Application | |||
Terminal=false | |||
INI | |||
</syntaxhighlight> | |||
|} | |||
==JMeter== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
JMeter | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<-'EXE'|sudo bash | |||
mkdir -p /opt/ide | |||
wget -cq https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.6.3.tgz -P /opt/ide | |||
tar -xzf /opt/ide/apache-jmeter-5.6.3.tgz -C /opt/ide | |||
rm -rf /opt/ide/apache-jmeter-5.6.3.tgz | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='ini'> | |||
cat << INI | sudo tee /usr/share/applications/jmeter.desktop >/dev/null | |||
[Desktop Entry] | |||
Version=5.6 | |||
Terminal=false | Terminal=false | ||
Type=Application | Type=Application | ||
Keywords=Java, | Name=Apache JMeter | ||
StartupNotify=false | |||
Comment=Apache JMeter | |||
Exec=/opt/ide/apache-jmeter-5.6.3/bin/jmeter.sh | |||
Icon=/opt/ide/apache-jmeter-5.6.3/docs/images/jmeter_square.png | |||
Keywords=Java,JMeter,Development | |||
Categories=Development;IDE;Java; | Categories=Development;IDE;Java; | ||
INI | |||
</ | </syntaxhighlight> | ||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# jmeter find jvm_args | |||
JMETER_JVM_ARGS_FIND=$(cat <<FIN | |||
## JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh etc.\n\ | |||
##\n\ | |||
## ==============================================\n | |||
FIN | |||
) | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# jmeter fill jvm_args | |||
JMETER_JVM_ARGS_FILL=$(cat <<FIL | |||
${JMETER_JVM_ARGS_FIND}\ | |||
JVM_ARGS="-Dsun.java2d.uiScale=200%"\ | |||
\n | |||
FIL | |||
) | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo sed -z "s|${JMETER_JVM_ARGS_FIND}|$(echo "${JMETER_JVM_ARGS_FILL}")|" \ | |||
-i /opt/ide/apache-jmeter-5.6.3/bin/jmeter.sh | |||
</syntaxhighlight> | |||
|} | |||
==PostgreSQL== | ==PostgreSQL== | ||
===Install=== | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
< | !scope='col' style='text-align:left' colspan='2'| | ||
sudo apt install postgresql postgresql-contrib | PostgreSQL | ||
|- | |||
!scope='col' style='width:50%;text-align:left'|Install | |||
!scope='col' style='width:50%;text-align:left'| | |||
|- | |||
</ | |valign='top'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
apt install -y postgresql postgresql-contrib | |||
systemctl enable postgresql | |||
systemctl status postgresql | |||
systemctl start postgresql | |||
systemctl daemon-reload | |||
EXE | |||
</syntaxhighlight> | |||
< | |valign='top'| | ||
sudo | <syntaxhighlight style='margin:3px 0' lang='sql'> | ||
createuser | cat << EXE | sudo -i -u postgres bash | ||
createdb < | createuser ${USER} | ||
ALTER USER | createdb ${USER} | ||
</ | cat << DDL | psql | ||
ALTER USER ${USER} WITH SUPERUSER; | |||
< | DDL | ||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
pg_lsclusters | pg_lsclusters | ||
less /var/log/postgresql/postgresql- | less /var/log/postgresql/postgresql-16-main.log | ||
sudo pg_createcluster --start | sudo pg_createcluster --start 16 mycluster | ||
sudo pg_dropcluster --stop | sudo pg_dropcluster --stop 16 mycluster | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
|- | |||
!scope='col' style='text-align:left'|Schema | |||
!scope='col' style='text-align:left'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='sql'> | |||
cat << EXE | sudo -i -u postgres bash | |||
cat << DDL | psql | |||
CREATE DATABASE chorke_academia_staging; | |||
CREATE USER chorke WITH ENCRYPTED PASSWORD 'sadaqah!'; | |||
DDL | |||
EXE | |||
=== | cat << EXE | sudo -i -u postgres bash | ||
< | cat << DCL | psql | ||
GRANT ALL PRIVILEGES ON DATABASE chorke_academia_staging TO chorke; | |||
DCL | |||
EXE | |||
< | </syntaxhighlight> | ||
|valign='top'| | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
psql chorke_academia_staging < chorke_academia_staging.sql | |||
psql -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke | |||
psql -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke -W -f chorke_academia_staging.sql | |||
pg_restore -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke chorke_academia_staging.dump | |||
</syntaxhighlight> | |||
|- | |||
!scope='col' style='text-align:left'|Revoke | |||
!scope='col' style='text-align:left'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='sql'> | |||
cat << EXE | sudo -i -u postgres bash | |||
cat << DCL | psql | |||
REVOKE CONNECT ON DATABASE chorke_academia_staging FROM public; | |||
DCL | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|- | |||
!scope='col' style='text-align:left'|Delete | |||
!scope='col' style='text-align:left'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
ps -ef | grep postgres | |||
kill -9 PID | |||
|valign='top'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='sql'> | |||
cat << EXE | sudo -i -u postgres bash | |||
cat << DQL | psql | |||
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity | |||
WHERE pg_stat_activity.datname in ('chorke_academia_staging'); | |||
DQL | |||
EXE | |||
cat << EXE | sudo -i -u postgres bash | |||
cat << DDL | psql | |||
DROP DATABASE IF EXISTS chorke_academia_staging; | |||
DDL | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|- | |||
!scope='col' style='text-align:left'|DBeaver | |||
!scope='col' style='text-align:left'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
curl -fsSL https://dbeaver.io/debs/dbeaver.gpg.key\ | |||
| sudo tee /etc/apt/keyrings/dbeaver.asc >/dev/null | |||
cat << SRC | sudo tee /etc/apt/sources.list.d/dbeaver.list >/dev/null | |||
< | deb [arch=$(dpkg --print-architecture)\ | ||
signed-by=/etc/apt/keyrings/dbeaver.asc]\ | |||
https://dbeaver.io/debs/dbeaver-ce / | |||
SRC | |||
cat << EXE | sudo bash | |||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y dbeaver-ce | |||
EXE | |||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
== | |- | ||
< | !scope='col' style='text-align:left'|PgAdmin4 | ||
!scope='col' style='text-align:left'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install curl | sudo apt install curl | ||
sudo apt install apache2 | sudo apt install apache2 | ||
curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub\ | curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub\ | ||
| sudo | | sudo tee /etc/apt/keyrings/pgadmin4.asc >/dev/null | ||
cat << | DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}");\ | ||
cat << SRC | sudo tee /etc/apt/sources.list.d/pgadmin4.list >/dev/null | |||
deb [arch=$(dpkg --print-architecture)\ | deb [arch=$(dpkg --print-architecture)\ | ||
signed-by=/etc/apt/keyrings/pgadmin4. | signed-by=/etc/apt/keyrings/pgadmin4.asc]\ | ||
https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$ | https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/${DISTRIBUTION} pgadmin4 main | ||
SRC | |||
cat << EXE | sudo bash | |||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y pgadmin4-web | |||
EXE | |||
sudo /usr/pgadmin4/bin/setup-web.sh | sudo /usr/pgadmin4/bin/setup-web.sh | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
< | |- | ||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
a2enmod ssl | a2enmod ssl | ||
a2enmod proxy | a2enmod proxy | ||
a2enmod proxy_http | a2enmod proxy_http | ||
a2enmod proxy_balancer | a2enmod proxy_balancer | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
|} | |||
==Sencha CMD== | ==Sencha CMD== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left' colspan='2'| | |||
Sencha CMD | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
unzip SenchaCmd-7.5.1.20-linux-amd64.sh.zip | unzip SenchaCmd-7.5.1.20-linux-amd64.sh.zip | ||
sudo sh SenchaCmd-7.5.1.20-linux-amd64.sh | sudo sh SenchaCmd-7.5.1.20-linux-amd64.sh | ||
| Line 135: | Line 443: | ||
sencha diag show | sencha diag show | ||
</ | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
|} | |||
==Redis== | ==Redis== | ||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Redis | |||
: | |- | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
apt install -y redis-server | |||
systemctl status redis-server | systemctl status redis-server | ||
</ | EXE | ||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# redis supervised find | |||
REDIS_SUPERVISED_FIND=$(cat <<FIN | |||
# the line below:\n\ | |||
#\n\ | |||
# supervised auto\n | |||
FIN | |||
) | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# redis supervised fill | |||
REDIS_SUPERVISED_FILL=$(cat <<FIL | |||
# the line below:\n\ | |||
#\n\ | |||
supervised systemd\n | |||
FIL | |||
) | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo sed -z "s|${REDIS_SUPERVISED_FIND}|$(echo "${REDIS_SUPERVISED_FILL}")|" \ | |||
-i /etc/redis/redis.conf | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
systemctl daemon-reload | |||
systemctl enable redis-server | |||
systemctl restart redis-server | |||
systemctl status redis-server | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|} | |||
==Workspace== | ==Workspace== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left' colspan='2'| | |||
mkdir -p /opt | Workspace | ||
chown $USER:$USER -R /opt/ | |- | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
MOTHER_CONCERN=chorke | |||
SISTER_CONCERN=academia | |||
CONFIG_DIR=${HOME}/.config | |||
DOCUMENT_DIR=${HOME}/Documents | |||
MOTHER_SRC=/opt/${USER}/${MOTHER_CONCERN} | |||
MOTHER_CFG_DES=${CONFIG_DIR}/${MOTHER_CONCERN} | |||
MOTHER_DOC_DES=${DOCUMENT_DIR}/${MOTHER_CONCERN} | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat <<EXE|sudo bash | |||
mkdir -p /opt/${USER}/ | |||
chown ${USER}:${USER} -R /opt/${USER}/ | |||
EXE | |||
if [[ ! -L ${MOTHER_CFG_DES} ]]&&[[ ! -f ${MOTHER_CFG_DES} ]]&&\ | |||
[[ ! -d ${MOTHER_CFG_DES} ]];then ln -s ${MOTHER_SRC} ${MOTHER_CFG_DES};fi | |||
if [[ ! -L ${MOTHER_DOC_DES} ]]&&[[ ! -f ${MOTHER_DOC_DES} ]]&&\ | |||
[[ ! -d ${MOTHER_DOC_DES} ]];then ln -s ${MOTHER_SRC} ${MOTHER_DOC_DES};fi | |||
mkdir -p ${MOTHER_SRC}/${SISTER_CONCERN}/{dev,etc,usr,var} | |||
ln -s /opt/ | </syntaxhighlight> | ||
ls -lah $HOME/ | |- | ||
|valign='top' colspan='2'| | |||
</ | <syntaxhighlight style='margin:3px 0' lang='bash'> | ||
# ${HOME}/Documents/${USER}-documents -> /opt/${USER}/home/documents | |||
for USE in desktop documents downloads music pictures public videos;do | |||
USER_USE_SRC=/opt/${USER}/home/${USE} | |||
if [[ ! -L ${USER_USE_SRC} ]]&&[[ ! -f ${USER_USE_SRC} ]]&&\ | |||
[[ ! -d ${USER_USE_SRC} ]];then | |||
mkdir -p ${USER_USE_SRC} | |||
USER_USE_DES=${HOME}/${USE^}/${USER}-${USE} | |||
if [[ ! -L ${USER_USE_DES} ]]&&[[ ! -f ${USER_USE_DES} ]]&&\ | |||
[[ ! -d ${USER_USE_DES} ]];then ln -s ${USER_USE_SRC} ${USER_USE_DES};fi | |||
fi | |||
done | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# ${HOME}/Documents/academia-dev-playground -> /opt/${USER}/chorke/academia/dev | |||
DEV_PLAYGROUND_SRC=${MOTHER_SRC}/${SISTER_CONCERN}/dev | |||
DEV_PLAYGROUND_DES=${DOCUMENT_DIR}/${SISTER_CONCERN}-dev-playground | |||
if [[ ! -L ${DEV_PLAYGROUND_DES} ]]&&[[ ! -f ${DEV_PLAYGROUND_DES} ]]&&\ | |||
[[ ! -d ${DEV_PLAYGROUND_DES} ]];then ln -s ${DEV_PLAYGROUND_SRC} ${DEV_PLAYGROUND_DES};fi | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# ${HOME}/Documents/academia-bkp-playground -> /opt/${USER}/chorke/academia/var/backup | |||
BKP_PLAYGROUND_DES=${DOCUMENT_DIR}/${SISTER_CONCERN}-bkp-playground | |||
BKP_PLAYGROUND_SRC=${MOTHER_SRC}/${SISTER_CONCERN}/var/backup | |||
mkdir -p ${BKP_PLAYGROUND_SRC}/{database,diagram,document,helm,project} | |||
if [[ ! -L ${BKP_PLAYGROUND_DES} ]]&&[[ ! -f ${BKP_PLAYGROUND_DES} ]]&&\ | |||
[[ ! -d ${BKP_PLAYGROUND_DES} ]];then ln -s ${BKP_PLAYGROUND_SRC} ${BKP_PLAYGROUND_DES};fi | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# ${HOME}/Documents/${POC}-playground -> /opt/${USER}/chorke/academia/var/playground/${POC} | |||
POC_PLAYGROUND_DIR=${MOTHER_SRC}/${SISTER_CONCERN}/var/playground | |||
mkdir -p ${POC_PLAYGROUND_DIR}/{ansible,awscli,cypress,docker,drone} | |||
mkdir -p ${POC_PLAYGROUND_DIR}/{ffmpeg,flask,helm,jasypt,jmeter,locust,lua} | |||
mkdir -p ${POC_PLAYGROUND_DIR}/{maven,mediawiki,mirth,nashorn,terraform,wiki,wrk} | |||
if [[ ! -L ${POC_PLAYGROUND_DIR} ]]&&[[ ! -f ${POC_PLAYGROUND_DIR} ]]&&\ | |||
[[ -d ${POC_PLAYGROUND_DIR} ]]&&[[ $(ls -A ${POC_PLAYGROUND_DIR}) ]];then | |||
for POC_PLAYGROUND_SRC in ${POC_PLAYGROUND_DIR}/*;do | |||
if [[ ! -L ${POC_PLAYGROUND_SRC} ]]&&[[ ! -f ${POC_PLAYGROUND_SRC} ]]&&\ | |||
[[ -d ${POC_PLAYGROUND_SRC} ]]&&[[ $(ls -A ${POC_PLAYGROUND_SRC}) ]];then | |||
POC=$(basename ${POC_PLAYGROUND_SRC}) | |||
POC_PLAYGROUND_DES=${DOCUMENT_DIR}/${POC}-playground | |||
if [[ ! -L ${POC_PLAYGROUND_DES} ]]&&[[ ! -f ${POC_PLAYGROUND_DES} ]]&&\ | |||
[[ ! -d ${POC_PLAYGROUND_DES} ]];then ln -s ${POC_PLAYGROUND_SRC} ${POC_PLAYGROUND_DES};fi | |||
fi | |||
done | |||
fi | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
ls -lah ${HOME}/{.config,Documents}/${MOTHER_CONCERN}/${SISTER_CONCERN} | |||
rm -rf ${HOME}/{.config,Documents}/${MOTHER_CONCERN} | |||
sudo rm -rf /opt/${USER} | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|} | |||
==Tmux== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Tmux | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install tmux | |||
cat << EOF | tee ${HOME}/.tmux.conf >/dev/null | |||
< | set -g base-index 1 | ||
# remap prefix from 'C-b' to 'C-a' | |||
# | unbind C-b | ||
set-option -g prefix C-a | |||
bind-key C-a send-prefix | |||
set -g default-terminal 'screen-256color' | |||
set -g history-limit 10000 | |||
set -g status-fg green | |||
set -g status-bg black | |||
# Window/pane split | |||
bind | split-window -h | |||
bind - split-window -v | |||
unbind '"' | |||
unbind % | |||
EOF | EOF | ||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==Git SCM== | ==Git SCM== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
ssh-keygen -t | !scope='col' style='text-align:left' colspan='2'| | ||
: <<' | Git SCM | ||
Generating public/private | |- | ||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install -y gitk | |||
ssh-keygen -t ed25519 -C "email.id@academia.chorke.org" -f ~/.ssh/git.academia.chorke.org_ed25519 | |||
: <<'LOG' | |||
Generating public/private ed25519 key pair. | |||
Enter passphrase (empty for no passphrase): | Enter passphrase (empty for no passphrase): | ||
Enter same passphrase again: | Enter same passphrase again: | ||
Your identification has been saved in /home/ | Your identification has been saved in /home/academia/.ssh/git.academia.chorke.org_ed25519 | ||
Your public key has been saved in /home/ | Your public key has been saved in /home/academia/.ssh/git.academia.chorke.org_ed25519.pub | ||
The key fingerprint is: | The key fingerprint is: | ||
SHA256: | SHA256:EIfunSYd2hNGEZ5X31cBcJPyJuuz8lHpNwwtzyYoxeY email.id@academia.chorke.org | ||
The key's randomart image is: | The key's randomart image is: | ||
+ | +--[ED25519 256]--+ | ||
| . | | ..+o .o+o.o| | ||
| | | .+.. o.o...| | ||
| ...o . o . o| | |||
| | | ..+... oo .| | ||
| . *S+ ++= . | | |||
| | | + B +.+ * | | ||
| | | o o.E o B | | ||
| | | ..o. + .| | ||
| o.. | | ooo | | ||
+----[SHA256]-----+ | +----[SHA256]-----+ | ||
LOG | |||
ls -lah ~/.ssh/ | ls -lah ~/.ssh/ | ||
cat < ~/.ssh/ | cat < ~/.ssh/git.academia.chorke.org_ed25519.pub | ||
</ | </syntaxhighlight> | ||
|- | |||
< | |valign='top' style='width:50%'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
nano ~/.ssh/config | nano ~/.ssh/config | ||
: <<'END_COMMENT' | : <<'END_COMMENT' | ||
| Line 222: | Line 684: | ||
HostName git.academia.chorke.org | HostName git.academia.chorke.org | ||
PreferredAuthentications publickey | PreferredAuthentications publickey | ||
IdentityFile ~/.ssh/ | IdentityFile ~/.ssh/git.academia.chorke.org_ed25519 | ||
User git | User git | ||
END_COMMENT | END_COMMENT | ||
</ | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
< | |- | ||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
git config --global user.email "email.id@academia.chorke.org" | git config --global user.email "email.id@academia.chorke.org" | ||
git config --global user.name "FULL NAME" | git config --global user.name "FULL NAME" | ||
ssh -vT git.academia.chorke.org | ssh -vT git.academia.chorke.org | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
< | |- | ||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# add the new key(s) to known_hosts | # add the new key(s) to known_hosts | ||
ssh-keyscan -H git.academia.chorke.org >> ~/.ssh/known_hosts | ssh-keyscan -H git.academia.chorke.org >> ~/.ssh/known_hosts | ||
| Line 239: | Line 705: | ||
# remove the old key(s) from known_hosts | # remove the old key(s) from known_hosts | ||
ssh-keygen -R git.academia.chorke.org | ssh-keygen -R git.academia.chorke.org | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
|} | |||
==Podman== | ==Podman== | ||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Podman | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt update | |||
sudo apt install podman | |||
podman -v | |||
</syntaxhighlight> | |||
< | |valign='top' style='width:50%'| | ||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EOF | sudo tee -a /etc/containers/registries.conf >/dev/null | cat << EOF | sudo tee -a /etc/containers/registries.conf >/dev/null | ||
[registries.search] | [registries.search] | ||
| Line 256: | Line 735: | ||
podman images | podman images | ||
podman info | podman info | ||
</ | </syntaxhighlight> | ||
|} | |||
==Vagrant== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Vagrant | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
curl -fsSL https://apt.releases.hashicorp.com/gpg\ | |||
| sudo tee /etc/apt/keyrings/hashicorp.asc >/dev/null | |||
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}") | |||
cat << SRC | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null | |||
deb [arch=$(dpkg --print-architecture)\ | |||
signed-by=/etc/apt/keyrings/hashicorp.asc]\ | |||
https://apt.releases.hashicorp.com ${DISTRIBUTION} main | |||
SRC | |||
cat << EXE | sudo bash | |||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y vagrant | |||
EXE | |||
vagrant -v | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils | |||
sudo systemctl enable --now libvirt-guests.service | |||
sudo systemctl enable --now virtlogd.service | |||
sudo systemctl enable --now libvirtd.service | |||
systemctl status libvirt-guests.service | |||
systemctl status libvirtd.service | |||
systemctl status virtlogd.service | |||
sudo usermod -aG libvirt $USER | |||
sudo usermod -aG kvm $USER | |||
newgrp libvirt | |||
newgrp kvm | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo systemctl disable --now libvirt-guests.service | |||
sudo systemctl disable --now virtlogd.service | |||
sudo systemctl disable --now libvirtd.service | |||
sudo systemctl disable --now virtlogd-admin.socket | |||
sudo systemctl disable --now virtlogd.socket | |||
sudo systemctl disable --now libvirtd-admin.socket | |||
sudo systemctl disable --now libvirtd-ro.socket | |||
sudo systemctl disable --now libvirtd.socket | |||
</syntaxhighlight> | |||
|valign='top'| | |||
|} | |||
==Docker== | ==Docker== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left' colspan='2'| | |||
Docker | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install apt-transport-https ca-certificates curl software-properties-common | sudo apt install apt-transport-https ca-certificates curl software-properties-common | ||
sudo mkdir -p /etc/apt/keyrings | |||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg\ | curl -fsSL https://download.docker.com/linux/ubuntu/gpg\ | ||
| sudo | | sudo tee /etc/apt/keyrings/docker.asc >/dev/null | ||
cat << | DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}") | ||
cat << SRC | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null | |||
deb [arch=$(dpkg --print-architecture)\ | deb [arch=$(dpkg --print-architecture)\ | ||
signed-by=/etc/apt/keyrings/docker. | signed-by=/etc/apt/keyrings/docker.asc]\ | ||
https://download.docker.com/linux/ubuntu $ | https://download.docker.com/linux/ubuntu ${DISTRIBUTION} stable | ||
SRC | |||
sudo apt update | sudo apt-get update | ||
apt-cache policy docker-ce | |||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |||
sudo systemctl status docker | sudo systemctl status docker | ||
sudo usermod -aG docker ${USER} | sudo usermod -aG docker ${USER} | ||
echo 'id -nG'|sudo -i -u ${USER} bash | |||
echo 'docker ps -a'|sudo -i -u ${USER} bash | |||
</ | </syntaxhighlight> | ||
|- | |||
< | |valign='top' style='width:50%'| | ||
<syntaxhighlight style='margin:3px 0' lang='yaml'> | |||
yq -o=json <<'YML'| \ | |||
sudo tee /etc/docker/daemon.json >/dev/null | |||
--- | |||
bip: 10.20.13.1/24 | |||
mtu: 1500 | |||
dns: | |||
- 1.1.1.1 | |||
- 8.8.8.8 | |||
debug: true | |||
YML | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo systemctl stop docker.socket | sudo systemctl stop docker.socket | ||
sudo systemctl stop docker.service | sudo systemctl stop docker.service | ||
| Line 306: | Line 855: | ||
docker run --rm alpine cat /etc/resolv.conf | docker run --rm alpine cat /etc/resolv.conf | ||
docker run --rm alpine cat /etc/hosts | docker run --rm alpine cat /etc/hosts | ||
</ | </syntaxhighlight> | ||
== | |valign='top'| | ||
< | |} | ||
==LXD== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
LXD | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt upgrade && sudo apt autoremove | sudo apt upgrade && sudo apt autoremove | ||
sudo snap install lxd --channel= | sudo snap install lxd --channel=6.1/stable | ||
sudo usermod -aG lxd ${USER} | sudo usermod -aG lxd ${USER} | ||
echo 'id -nG'|sudo -i -u ${USER} bash | |||
echo 'lxc version'|sudo -i -u ${USER} bash | |||
</syntaxhighlight> | |||
</ | |valign='top' style='width:50%'| | ||
|- | |||
< | |valign='top'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash' highlight='5,9,13,15,18'> | |||
sudo lxd init | sudo lxd init | ||
:' | :' | ||
Would you like to use LXD clustering? (yes/no) [default=no]: | Would you like to use LXD clustering? (yes/no) [default=no]: | ||
Do you want to configure a new storage pool? (yes/no) [default=yes]: | Do you want to configure a new storage pool? (yes/no) [default=yes]: | ||
Name of the new storage pool [default=default]: | Name of the new storage pool [default=default]: lxd-btrfs-pool-aa | ||
Name of the storage backend to use (dir, lvm, | Name of the storage backend to use (btrfs, ceph, dir, lvm, powerflex) [default=btrfs]: | ||
Create a new BTRFS pool? (yes/no) [default=yes]: | Create a new BTRFS pool? (yes/no) [default=yes]: | ||
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: | Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: | ||
Size in GiB of the new loop device (1GiB minimum) [default=30GiB]: | Size in GiB of the new loop device (1GiB minimum) [default=30GiB]: 100GiB | ||
Would you like to connect to a MAAS server? (yes/no) [default=no]: | Would you like to connect to a MAAS server? (yes/no) [default=no]: | ||
Would you like to create a new local network bridge? (yes/no) [default=yes]: | Would you like to create a new local network bridge? (yes/no) [default=yes]: | ||
What should the new bridge be called? [default=lxdbr0]: | What should the new bridge be called? [default=lxdbr0]: | ||
What IPv4 address should be used? (CIDR subnet notation, | What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: 10.20.0.1/24 | ||
Would you like LXD to NAT IPv4 traffic on your bridge? [default=yes]: | Would you like LXD to NAT IPv4 traffic on your bridge? [default=yes]: | ||
What IPv6 address should be used? (CIDR subnet notation, | What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none | ||
Would you like the LXD server to be available over the network? (yes/no) [default=no]: | Would you like the LXD server to be available over the network? (yes/no) [default=no]: | ||
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]: | Would you like stale cached images to be updated automatically? (yes/no) [default=yes]: | ||
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: | Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: yes | ||
' | ' | ||
sudo ufw allow http | |||
sudo ufw allow OpenSSH | |||
sudo ufw allow in on lxdbr0 | sudo ufw allow in on lxdbr0 | ||
sudo ufw route allow in on lxdbr0 | sudo ufw route allow in on lxdbr0 | ||
sudo ufw route allow out on lxdbr0 | sudo ufw route allow out on lxdbr0 | ||
sudo ufw status verbose | |||
lxc launch images:alpine/3. | sudo systemctl status ufw | ||
sudo ufw enable | |||
lxc launch images:alpine/3.20 academia && | |||
lxc exec academia sh | lxc exec academia sh | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='yaml' highlight='4,6,13,15,28' line> | |||
--- | |||
config: {} | |||
networks: | |||
- config: | |||
ipv4.address: 10.20.0.1/24 | |||
ipv4.nat: "true" | |||
ipv6.address: none | |||
description: "" | |||
name: lxdbr0 | |||
type: "" | |||
project: default | |||
storage_pools: | |||
- config: | |||
size: 100GiB | |||
description: "" | |||
name: lxd-btrfs-pool-aa | |||
driver: btrfs | |||
storage_volumes: [] | |||
profiles: | |||
- config: {} | |||
description: "" | |||
devices: | |||
eth0: | |||
name: eth0 | |||
network: lxdbr0 | |||
type: nic | |||
root: | |||
path: / | |||
pool: lxd-btrfs-pool-aa | |||
type: disk | |||
name: default | |||
projects: [] | |||
cluster: null | |||
</syntaxhighlight> | |||
|} | |||
==Arduino== | ==Arduino== | ||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Arduino | |||
< | |- | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install arduino | |||
sudo snap install arduino | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo wget -c https://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz -P /opt/ide/ | sudo wget -c https://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz -P /opt/ide/ | ||
sudo tar -xvf /opt/ide/arduino-1.8.19-linux64.tar.xz -C /opt/ide/ | sudo tar -xvf /opt/ide/arduino-1.8.19-linux64.tar.xz -C /opt/ide/ | ||
| Line 360: | Line 970: | ||
newgrp dialout | newgrp dialout | ||
id -nG | id -nG | ||
</ | </syntaxhighlight> | ||
|valign='top'| | |||
|} | |||
==Qt Creator== | ==Qt Creator== | ||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Qt Creator | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install qtcreator | |||
sudo apt remove qtcreator | |||
sudo apt auto-remove qtcreator | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==Microsoft== | ==Microsoft== | ||
< | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
sudo apt install apt-transport-https\ | !scope='col' style='text-align:left' colspan='2'| | ||
Microsoft | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt install -y apt-transport-https \ | |||
ca-certificates curl software-properties-common wget | ca-certificates curl software-properties-common wget | ||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
| sudo | <syntaxhighlight style='margin:3px 0' lang='bash'> | ||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc\ | |||
| sudo tee /etc/apt/keyrings/microsoft.asc >/dev/null | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EOF | sudo tee /etc/apt/sources.list.d/microsoft-edge.list >/dev/null | cat << EOF | sudo tee /etc/apt/sources.list.d/microsoft-edge.list >/dev/null | ||
deb [arch=$(dpkg --print-architecture)\ | deb [arch=$(dpkg --print-architecture)\ | ||
signed-by=/etc/apt/keyrings/microsoft | signed-by=/etc/apt/keyrings/microsoft.asc]\ | ||
https://packages.microsoft.com/repos/edge stable main | https://packages.microsoft.com/repos/edge stable main | ||
EOF | EOF | ||
sudo apt update | cat << EXE | sudo bash | ||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y microsoft-edge-stable | |||
EXE | |||
microsoft-edge -version | microsoft-edge -version | ||
</ | </syntaxhighlight> | ||
= | |valign='top'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EOF | sudo tee /etc/apt/sources.list.d/microsoft-code.list >/dev/null | |||
deb [arch=$(dpkg --print-architecture)\ | |||
signed-by=/etc/apt/keyrings/microsoft.asc]\ | |||
https://packages.microsoft.com/repos/code stable main | |||
EOF | |||
cat << EXE | sudo bash | |||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y code | |||
EXE | |||
code -version | |||
</syntaxhighlight> | |||
|} | |||
==Remote== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Remote | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo ufw allow 5900/tcp | |||
sudo ufw status verbose | |||
systemctl --user restart gnome-remote-desktop.service | |||
systemctl --user status gnome-remote-desktop.service | |||
gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==DaVinci Resolve== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
DaVinci Resolve | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
wget -cq https://sw.blackmagicdesign.com/DaVinciResolve/v18.1.4/DaVinci_Resolve_18.1.4_Linux.zip\ | |||
?Key-Pair-Id=${KEY_PAIR_ID}==&Expires=${KEY_EXPIRES} -P ${HOME}/Downloads | |||
unzip DaVinci_Resolve_18.1.4_Linux.zip -d ${HOME}/Downloads | |||
sudo apt install libfuse2 libxcb-cursor0 libxcb-damage0 | |||
sudo ./DaVinci_Resolve_18.1.4_Linux.run -i | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==Kontena Lens== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Kontena Lens | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# install from snapcraft | |||
sudo snap install kontena-lens --classic | |||
curl -fsSL https://downloads.k8slens.dev/keys/gpg\ | |||
| sudo tee /etc/apt/keyrings/kontena-lens.asc >/dev/null | |||
< | cat << EOF | sudo tee /etc/apt/sources.list.d/kontena-lens.list >/dev/null | ||
deb [arch=$(dpkg --print-architecture)\ | |||
signed-by=/etc/apt/keyrings/kontena-lens.asc]\ | |||
https://downloads.k8slens.dev/apt/debian stable main | |||
EOF | |||
cat << EXE | sudo bash | |||
apt-get update;echo | |||
apt list -a --upgradable | |||
apt-get install -y lens | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==OpenSSH Server== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
OpenSSH Server | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt-get install -y openssh-client | |||
sudo apt-get install -y openssh-server | |||
sudo apt-get install -y openssh-sftp-server | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==Knowledge== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Knowledge | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='text'> | |||
tmux ls | |||
tmux new -s my_session | |||
tmux attach-session -t 0 | |||
tmux attach-session -t my_session | |||
Ctrl + b % » Split pane horizontally | |||
Ctrl + b " » Split pane vertically | |||
Ctrl + b x » Close current pane | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='text'> | |||
Ctrl + b c » Create a new window | |||
Ctrl + b w » Choose window from a list | |||
Ctrl + b 0 » Switch to window by number | |||
Ctrl + b , » Rename the current window | |||
Ctrl + b o » Go to the next pane | |||
Ctrl + b ; » Toggle between pane | |||
Ctrl + b d » Detach the session | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
lsblk | |||
lscpu | |||
lsusb | |||
free -h | |||
sudo lshw | |||
ufw status | |||
ufw status verbose | |||
systemctl status ufw | |||
apt list --installed | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo ufw allow http | |||
sudo ufw allow OpenSSH | |||
sudo ufw allow 5900/tcp | |||
sudo ss -tulpn | grep LISTEN | |||
sudo ss -tulwn | grep LISTEN | |||
sudo ss -tulpn | grep LISTEN | grep sshd | |||
sudo ss -tulpn | grep LISTEN | grep redis | |||
sudo ss -tulpn | grep LISTEN | grep gnome | |||
sudo ss -tulpn | grep LISTEN | grep apache | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo dmidecode -t | |||
sudo dmidecode -t 1 | |||
sudo dmidecode -t 3 | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo dmidecode | grep 'SKU Number' | |||
sudo dmidecode -s system-product-name | |||
sudo dmidecode -s system-serial-number | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# disk usage | |||
du -h /var | |||
du -sh /var | |||
du -csh ~/Do* | |||
du -csh /var/log /var/lib | |||
du -sh --apparent-size /var/lib | |||
du -h /var/ | sort -rh | head -5 | |||
sudo dpkg --remove --force-remove-reinstreq ${PACAKGE_NAME:-vim} | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo dpkg -i ~/Downloads/TIB_js-studiocomm_6.16.0_linux_amd64.deb | |||
sudo dpkg -i ~/Downloads/code_1.74.3-1673284829_amd64.deb | |||
sudo dpkg -i ~/Downloads/teams_1.5.00.23861_amd64.deb | |||
sudo dpkg -i ~/Downloads/anydesk_6.2.1-1_amd64.deb | |||
sudo dpkg -i ~/Downloads/freedownloadmanager.deb | |||
sudo dpkg -i ~/Downloads/zoom_amd64.deb | |||
sudo apt-get install --fix-broken | |||
sudo apt-get install -f | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt-get install balena-etcher-electron | |||
sudo apt-get install inetutils-traceroute | |||
sudo apt-get install libavcodec60 ffmpeg | |||
sudo apt-get install gedit-plugins | |||
sudo apt-get install sublime-text | |||
sudo apt-get install makepasswd | |||
sudo apt-get install obs-studio | |||
sudo apt-get install mesa-utils | |||
sudo apt-get install filezilla | |||
sudo apt-get install net-tools | |||
sudo apt-get install xournalpp | |||
sudo apt-get install neofetch | |||
sudo apt-get install libfuse2 | |||
sudo apt-get install gtkhash | |||
sudo apt-get install upx-ucl | |||
sudo apt-get install hwinfo | |||
sudo apt-get install ktouch | |||
sudo apt-get install podman | |||
sudo apt-get install bolt | |||
sudo apt-get install tree | |||
sudo apt-get install tmux | |||
sudo apt-get install jq | |||
sudo apt-get install mc | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo snap install maas --channel=3.3/stable | |||
sudo snap install dotnet-sdk --classic | |||
sudo snap install powershell --classic | |||
sudo snap install notepad-plus-plus | |||
sudo snap install telegram-desktop | |||
sudo snap install skype --classic | |||
sudo snap install nvim --classic | |||
sudo snap install code --classic | |||
sudo snap install figma-linux | |||
sudo snap install zoom-client | |||
sudo snap install arduino | |||
sudo snap install firefox | |||
sudo snap install postman | |||
sudo snap install drawio | |||
sudo snap install maas | |||
sudo snap disable mass | |||
sudo snap install slack | |||
sudo snap refresh drawio | |||
sudo snap refresh firefox | |||
sudo snap remove postman | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
ls -lah ~/.local/share/applications/ | |||
ls -lah ~/.config/autostart/ | |||
ls -lah ~/.local/share/ | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
rm -rf ~/.local/share/applications/jetbrains-toolbox.desktop | |||
rm -rf ~/.config/autostart/jetbrains-toolbox.desktop | |||
rm -rf ~/.local/share/JetBrains/Toolbox | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
lspci | grep -i thunder | |||
# git stashing | |||
git stash; git checkout -b new_branch; git stash pop | |||
git add .; git commit -m "new feature added"; git push | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# reset time zone | |||
timedatectl set-ntp true | |||
timedatectl set-ntp false | |||
timedatectl set-time '2021-12-31 23:58:00' | |||
timedatectl set-timezone 'Asia/Kuala_Lumpur' | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
#nano ~/.bashrc | #nano ~/.bashrc | ||
#nano ~/.zshenv | #nano ~/.zshenv | ||
| Line 456: | Line 1,317: | ||
export ACADEMIA_WSS="$HOME/chorke/academia" | export ACADEMIA_WSS="$HOME/chorke/academia" | ||
export ACADEMIA_LOG_PATH="$HOME/.chorke/academia/var/http/logs" | export ACADEMIA_LOG_PATH="$HOME/.chorke/academia/var/http/logs" | ||
</ | </syntaxhighlight> | ||
< | |valign='top'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
source ~/.bashrc | source ~/.bashrc | ||
source ~/.profile | source ~/.profile | ||
| Line 465: | Line 1,327: | ||
source ~/.zshenv | source ~/.zshenv | ||
source ~/.zprofile/.zlogin | source ~/.zprofile/.zlogin | ||
</ | </syntaxhighlight> | ||
|- | |||
< | |valign='top' colspan='2'| | ||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
ssh-keygen -p -f ~/.ssh/git_academia_chorke_org_rsa | ssh-keygen -p -f ~/.ssh/git_academia_chorke_org_rsa | ||
: <<'END_COMMENT' | : <<'END_COMMENT' | ||
| Line 476: | Line 1,339: | ||
Your identification has been saved with the new passphrase. | Your identification has been saved with the new passphrase. | ||
END_COMMENT | END_COMMENT | ||
</ | </syntaxhighlight> | ||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
# comment and uncomment sql | |||
sed -i -e 's|^|-- |g' src/main/resources/db/migration/*.sql | |||
sed -i -e 's|^-- ||g' src/main/resources/db/migration/*.sql | |||
sudo systemctl enable --now ssh | |||
sudo systemctl disable --now ssh | |||
# hide mounted drives | |||
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true | |||
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false | |||
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true | </syntaxhighlight> | ||
|} | |||
==References== | ==References== | ||
{| | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
| valign= | !scope='col' style='text-align:left' colspan='3'| | ||
References | |||
|- | |||
|valign='top' style='width:33%'| | |||
* [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04 Install and Use PostgreSQL on Ubuntu 18.04] | * [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04 Install and Use PostgreSQL on Ubuntu 18.04] | ||
* [https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04 Install and Secure Redis on Ubuntu 18.04] | * [https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04 Install and Secure Redis on Ubuntu 18.04] | ||
| Line 501: | Line 1,373: | ||
* [[PostgreSQL]] | * [[PostgreSQL]] | ||
| valign= | |valign='top' style='width:34%'| | ||
* [https://www.digitalcitizen.life/connecting-windows-remote-desktop-ubuntu/ Connect to a Windows PC from Ubuntu using RDP] | * [https://www.digitalcitizen.life/connecting-windows-remote-desktop-ubuntu/ Connect to a Windows PC from Ubuntu using RDP] | ||
* [https://stackoverflow.com/questions/25515166/ Redis Daemon unable to creating a PID file] | * [https://stackoverflow.com/questions/25515166/ Redis Daemon unable to creating a PID file] | ||
| Line 513: | Line 1,385: | ||
* [[LAPP Stack for PI]] | * [[LAPP Stack for PI]] | ||
| valign= | |valign='top' style='width:33%'| | ||
* [https://www.omgubuntu.co.uk/2019/11/hide-mounted-drives-ubuntu-dock Hide Mounted Drives from the Ubuntu Dock] | * [https://www.omgubuntu.co.uk/2019/11/hide-mounted-drives-ubuntu-dock Hide Mounted Drives from the Ubuntu Dock] | ||
* [https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu Install Nvidia Graphics Card on Ubuntu] | * [https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu Install Nvidia Graphics Card on Ubuntu] | ||
| Line 524: | Line 1,396: | ||
* [[JQ Tool]] | * [[JQ Tool]] | ||
* [[ExtJS]] | * [[ExtJS]] | ||
|- | |- | ||
|valign='top'| | |||
| valign= | |||
* [https://askubuntu.com/questions/214421/ Install the MPEG-4 AAC & H.264 Decoder] | * [https://askubuntu.com/questions/214421/ Install the MPEG-4 AAC & H.264 Decoder] | ||
* [https://superuser.com/questions/1428579/ Can't Switch between Tabs in Terminal] | * [https://superuser.com/questions/1428579/ Can't Switch between Tabs in Terminal] | ||
| Line 541: | Line 1,409: | ||
* [https://obsproject.com/wiki/install-instructions Install OBS] | * [https://obsproject.com/wiki/install-instructions Install OBS] | ||
| valign= | |valign='top'| | ||
* [https://dba.stackexchange.com/questions/316681/ PostgreSQL 14 not Started on Ubuntu 22.04] | * [https://dba.stackexchange.com/questions/316681/ PostgreSQL 14 not Started on Ubuntu 22.04] | ||
* [https://www.hostinger.my/tutorials/how-to-install-and-setup-phpmyadmin-on-ubuntu Install phpMyAdmin on Ubuntu] | * [https://www.hostinger.my/tutorials/how-to-install-and-setup-phpmyadmin-on-ubuntu Install phpMyAdmin on Ubuntu] | ||
| Line 553: | Line 1,421: | ||
* [[Qemu]] | * [[Qemu]] | ||
| valign= | |valign='top'| | ||
* [https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-22-04 Set Up a Firewall with UFW on Ubuntu 22.04] | |||
* [https://help.gnome.org/users/gnome-help/stable/net-firewall-ports.html.en Gnome Commonly Used Network Ports] | |||
* [[Linux Virtual Display for iPad Pro]] | |||
* [[VS Code on iPad Pro]] | * [[VS Code on iPad Pro]] | ||
* [[IntelliJ IDEA]] | * [[IntelliJ IDEA]] | ||
* [[Camunda]] | |||
* [[Minikube]] | * [[Minikube]] | ||
* [[VSCode]] | * [[VSCode]] | ||
* [[NodeJS]] | |||
* [[MinIO]] | * [[MinIO]] | ||
|- | |||
|valign='top'| | |||
* [https://unix.stackexchange.com/questions/8656/ <code>/usr/bin</code> vs <code>/usr/local/bin</code> on Linux] | |||
* [https://askubuntu.com/questions/525088/ Delete broken packages in Ubuntu] | |||
* [[Macrium Reflect Alternatives]] | |||
* [[Linux Mount Drive]] | |||
* [https://github.com/AntJanus/my-dotfiles/blob/master/.tmux.conf TMux Config] | |||
* [[OpenVPN]] | |||
* [https://apps.kde.org/ktouch/ KTouch] | |||
* [[MAAS]] | |||
* [[TMux]] | |||
* [https://www.atlassian.com/git/tutorials/gitk Gitk] | |||
|valign='top'| | |||
* [https://stackoverflow.com/questions/77295243/ JDK » 21 » Maven compilation error] | |||
* [[SSH/Public Key Authentication]] | |||
* [https://github.com/MuhammedKalkan/OpenLens/releases K8s » OpenLens] | |||
* [https://www.rancher.com/quick-start K8s » Rancher] | |||
* [https://github.com/lensapp/lens K8s » Lens] | |||
* [[S2I]] | |||
|valign='top'| | |||
|} | |} | ||
Latest revision as of 14:47, 16 January 2026
echo 'apt-get update;echo;apt list -a --upgradable;apt-get upgrade -y'|sudo bash
| |
cat <<-'EXE'|sudo bash
for package in apt-transport-https ca-certificates gnupg build-essential
do apt-get install -y ${package};done
EXE
|
cat <<-'EXE'|sudo bash
for package in software-properties-common git curl file procps libfuse2
do apt-get install -y ${package};done
EXE
|
cat <<-'EXE'|sudo bash
for release in 8 11 17 21
do apt-get install -y openjdk-${release}-jdk;done
EXE
|
cat <<-'EXE'|sudo bash
for package in ant npm maven nodejs
do apt-get install -y ${package};done
EXE
|
Text Editor » Sublime
|
Text Editor » Sublime | |
|---|---|
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg\
| sudo tee /etc/apt/keyrings/sublime-text.asc >/dev/null
cat << SRC | sudo tee /etc/apt/sources.list.d/sublime-text.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/sublime-text.asc]\
https://download.sublimetext.com/ apt/stable/
SRC
echo 'apt-get update;echo;apt-get install -y sublime-text'|sudo bash
|
|
JetBrains Toolbox
|
JetBrains Toolbox |
|---|
wget -cq https://download-cdn.jetbrains.com/toolbox/jetbrains-toolbox-2.4.0.32175.tar.gz -P ${HOME}/Downloads
tar -xzf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175.tar.gz -C ${HOME}/Downloads
rm -rf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175.tar.gz
sudo apt update && sudo apt install libfuse2
${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175/jetbrains-toolbox
rm -rf ${HOME}/Downloads/jetbrains-toolbox-2.4.0.32175
|
Spring Tool Suite
|
Spring Tool Suite |
|---|
cat <<-'EXE'|sudo bash
mkdir -p /opt/ide
wget -cq https://cdn.spring.io/spring-tools/release/STS4/4.23.1.RELEASE/dist/e4.32/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz -P /opt/ide
tar -xzf /opt/ide/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz -C /opt/ide
rm -rf /opt/ide/spring-tool-suite-4-4.23.1.RELEASE-e4.32.0-linux.gtk.x86_64.tar.gz
EXE
# https://marketplace.eclipse.org/content/jaspersoft-studio
# https://projectlombok.org/setup/eclipse
cat <<-'EXE'|sudo bash
mkdir -p /opt/ide/lombok/bin
wget -cq https://projectlombok.org/downloads/lombok.jar -P /opt/ide/lombok/bin
java -jar /opt/ide/lombok/bin/lombok.jar
EXE
|
cat << INI | sudo tee /usr/share/applications/SpringToolSuite4.desktop >/dev/null
[Desktop Entry]
Name=SpringSource Tool Suite 4
Comment=SpringSource Tool Suite 4
Exec=/opt/ide/sts-4.23.1.RELEASE/SpringToolSuite4
Icon=/opt/ide/sts-4.23.1.RELEASE/icon.xpm
Keywords=Java,Eclipse,Spring,IDE,Development
Categories=Development;IDE;Java;
StartupNotify=true
Type=Application
Terminal=false
INI
|
Jasper Studio CE
|
Jasper Studio CE |
|---|
cat << EXE | sudo bash
mkdir -p /opt/ide
tar -xzf ${HOME}/Downloads/js-studiocomm_7.0.1_linux_x86_64.tgz -C /opt/ide
rm -rf ${HOME}/Downloads/js-studiocomm_7.0.1_linux_x86_64.tgz
EXE
|
cat << INI | sudo tee /usr/share/applications/JasperStudio.desktop >/dev/null
[Desktop Entry]
Name=Jasper Studio CE
Comment=Jasper Studio CE 7.0.1
Exec='/opt/ide/js-studiocomm_7.0.1/Jaspersoft Studio'
Icon='/opt/ide/js-studiocomm_7.0.1/icon.xpm'
Keywords=Java,Eclipse,Jasper,IDE,Development
Categories=Development;IDE;Java;
StartupNotify=true
Type=Application
Terminal=false
INI
|
Camunda
|
Camunda |
|---|
cat <<-'EXE'|sudo bash
mkdir -p /opt/ide
mkdir -p /tmp/camunda/images
wget -cq https://downloads.camunda.cloud/release/camunda-modeler/5.25.0/camunda-modeler-5.25.0-linux-x64.tar.gz -P /opt/ide
tar -xzf /opt/ide/camunda-modeler-5.25.0-linux-x64.tar.gz -C /opt/ide
chmod 4755 /opt/ide/camunda-modeler-5.25.0-linux-x64/chrome-sandbox
rm -rf /opt/ide/camunda-modeler-5.25.0-linux-x64.tar.gz
wget -cq https://camunda.com/wp-content/uploads/2022/09/Camunda_Secondary_Logo.zip -P /tmp/camunda
unzip -qq /tmp/camunda/Camunda_Secondary_Logo.zip -d /tmp/camunda/images/
cp /tmp/camunda/images/Secondary-Logo_Rounded-Orange.png \
/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler.png
rm -rf /tmp/camunda/
EXE
|
cat << INI | sudo tee /usr/share/applications/CamundaModeler.desktop >/dev/null
[Desktop Entry]
Name=Camunda Modeler 5
Comment=Camunda Modeler 5.25.0
Exec=/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler
Icon=/opt/ide/camunda-modeler-5.25.0-linux-x64/camunda-modeler.png
Keywords=Camunda,Modeler,BPMN,IDE,Development
Categories=Development;IDE;BPMN;
StartupNotify=true
Type=Application
Terminal=false
INI
|
JMeter
|
JMeter | |
|---|---|
cat <<-'EXE'|sudo bash
mkdir -p /opt/ide
wget -cq https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.6.3.tgz -P /opt/ide
tar -xzf /opt/ide/apache-jmeter-5.6.3.tgz -C /opt/ide
rm -rf /opt/ide/apache-jmeter-5.6.3.tgz
EXE
| |
cat << INI | sudo tee /usr/share/applications/jmeter.desktop >/dev/null
[Desktop Entry]
Version=5.6
Terminal=false
Type=Application
Name=Apache JMeter
StartupNotify=false
Comment=Apache JMeter
Exec=/opt/ide/apache-jmeter-5.6.3/bin/jmeter.sh
Icon=/opt/ide/apache-jmeter-5.6.3/docs/images/jmeter_square.png
Keywords=Java,JMeter,Development
Categories=Development;IDE;Java;
INI
| |
# jmeter find jvm_args
JMETER_JVM_ARGS_FIND=$(cat <<FIN
## JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh etc.\n\
##\n\
## ==============================================\n
FIN
)
|
# jmeter fill jvm_args
JMETER_JVM_ARGS_FILL=$(cat <<FIL
${JMETER_JVM_ARGS_FIND}\
JVM_ARGS="-Dsun.java2d.uiScale=200%"\
\n
FIL
)
|
sudo sed -z "s|${JMETER_JVM_ARGS_FIND}|$(echo "${JMETER_JVM_ARGS_FILL}")|" \
-i /opt/ide/apache-jmeter-5.6.3/bin/jmeter.sh
| |
PostgreSQL
|
PostgreSQL | |
|---|---|
| Install | |
cat << EXE | sudo bash
apt install -y postgresql postgresql-contrib
systemctl enable postgresql
systemctl status postgresql
systemctl start postgresql
systemctl daemon-reload
EXE
|
cat << EXE | sudo -i -u postgres bash
createuser ${USER}
createdb ${USER}
cat << DDL | psql
ALTER USER ${USER} WITH SUPERUSER;
DDL
EXE
|
pg_lsclusters
less /var/log/postgresql/postgresql-16-main.log
sudo pg_createcluster --start 16 mycluster
sudo pg_dropcluster --stop 16 mycluster
|
|
| Schema | |
cat << EXE | sudo -i -u postgres bash
cat << DDL | psql
CREATE DATABASE chorke_academia_staging;
CREATE USER chorke WITH ENCRYPTED PASSWORD 'sadaqah!';
DDL
EXE
cat << EXE | sudo -i -u postgres bash
cat << DCL | psql
GRANT ALL PRIVILEGES ON DATABASE chorke_academia_staging TO chorke;
DCL
EXE
|
|
psql chorke_academia_staging < chorke_academia_staging.sql
psql -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke
psql -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke -W -f chorke_academia_staging.sql
pg_restore -h db00.chorke.org -p 5432 -d chorke_academia_staging -U chorke chorke_academia_staging.dump
| |
| Revoke | |
cat << EXE | sudo -i -u postgres bash
cat << DCL | psql
REVOKE CONNECT ON DATABASE chorke_academia_staging FROM public;
DCL
EXE
|
|
| Delete | |
ps -ef | grep postgres
kill -9 PID
|valign='top'|
|-
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='sql'>
cat << EXE | sudo -i -u postgres bash
cat << DQL | psql
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity
WHERE pg_stat_activity.datname in ('chorke_academia_staging');
DQL
EXE
cat << EXE | sudo -i -u postgres bash
cat << DDL | psql
DROP DATABASE IF EXISTS chorke_academia_staging;
DDL
EXE
|
|
| DBeaver | |
curl -fsSL https://dbeaver.io/debs/dbeaver.gpg.key\
| sudo tee /etc/apt/keyrings/dbeaver.asc >/dev/null
cat << SRC | sudo tee /etc/apt/sources.list.d/dbeaver.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/dbeaver.asc]\
https://dbeaver.io/debs/dbeaver-ce /
SRC
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y dbeaver-ce
EXE
|
|
| PgAdmin4 | |
sudo apt install curl
sudo apt install apache2
curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub\
| sudo tee /etc/apt/keyrings/pgadmin4.asc >/dev/null
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}");\
cat << SRC | sudo tee /etc/apt/sources.list.d/pgadmin4.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/pgadmin4.asc]\
https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/${DISTRIBUTION} pgadmin4 main
SRC
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y pgadmin4-web
EXE
sudo /usr/pgadmin4/bin/setup-web.sh
|
|
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_balancer
|
|
Sencha CMD
|
Sencha CMD | |
|---|---|
unzip SenchaCmd-7.5.1.20-linux-amd64.sh.zip
sudo sh SenchaCmd-7.5.1.20-linux-amd64.sh
export SENCHA_CMD='/opt/cli/sencha/cmd'
export OPENSSL_CONF='/etc/ssl'
export PATH=$PATH:$SENCHA_CMD
mkdir -p ~/.sencha/cmd
cat << EOF > $HOME/.sencha/cmd/sencha.cfg
#------------------------------------------------------------------------------
# The folder for the local package repository. By default, this folder is shared
# by all versions of Sencha Cmd. In other words, upgrading Sencha Cmd does not
# affect the local repository.
repo.local.dir=${HOME}/.sencha/cmd/repo
EOF
sencha diag show
|
|
Redis
|
Redis | |
|---|---|
cat << EXE | sudo bash
apt install -y redis-server
systemctl status redis-server
EXE
|
|
# redis supervised find
REDIS_SUPERVISED_FIND=$(cat <<FIN
# the line below:\n\
#\n\
# supervised auto\n
FIN
)
|
# redis supervised fill
REDIS_SUPERVISED_FILL=$(cat <<FIL
# the line below:\n\
#\n\
supervised systemd\n
FIL
)
|
sudo sed -z "s|${REDIS_SUPERVISED_FIND}|$(echo "${REDIS_SUPERVISED_FILL}")|" \
-i /etc/redis/redis.conf
|
|
cat << EXE | sudo bash
systemctl daemon-reload
systemctl enable redis-server
systemctl restart redis-server
systemctl status redis-server
EXE
|
|
Workspace
|
Workspace | |
|---|---|
MOTHER_CONCERN=chorke
SISTER_CONCERN=academia
CONFIG_DIR=${HOME}/.config
DOCUMENT_DIR=${HOME}/Documents
MOTHER_SRC=/opt/${USER}/${MOTHER_CONCERN}
MOTHER_CFG_DES=${CONFIG_DIR}/${MOTHER_CONCERN}
MOTHER_DOC_DES=${DOCUMENT_DIR}/${MOTHER_CONCERN}
|
cat <<EXE|sudo bash
mkdir -p /opt/${USER}/
chown ${USER}:${USER} -R /opt/${USER}/
EXE
if [[ ! -L ${MOTHER_CFG_DES} ]]&&[[ ! -f ${MOTHER_CFG_DES} ]]&&\
[[ ! -d ${MOTHER_CFG_DES} ]];then ln -s ${MOTHER_SRC} ${MOTHER_CFG_DES};fi
if [[ ! -L ${MOTHER_DOC_DES} ]]&&[[ ! -f ${MOTHER_DOC_DES} ]]&&\
[[ ! -d ${MOTHER_DOC_DES} ]];then ln -s ${MOTHER_SRC} ${MOTHER_DOC_DES};fi
mkdir -p ${MOTHER_SRC}/${SISTER_CONCERN}/{dev,etc,usr,var}
|
# ${HOME}/Documents/${USER}-documents -> /opt/${USER}/home/documents
for USE in desktop documents downloads music pictures public videos;do
USER_USE_SRC=/opt/${USER}/home/${USE}
if [[ ! -L ${USER_USE_SRC} ]]&&[[ ! -f ${USER_USE_SRC} ]]&&\
[[ ! -d ${USER_USE_SRC} ]];then
mkdir -p ${USER_USE_SRC}
USER_USE_DES=${HOME}/${USE^}/${USER}-${USE}
if [[ ! -L ${USER_USE_DES} ]]&&[[ ! -f ${USER_USE_DES} ]]&&\
[[ ! -d ${USER_USE_DES} ]];then ln -s ${USER_USE_SRC} ${USER_USE_DES};fi
fi
done
| |
# ${HOME}/Documents/academia-dev-playground -> /opt/${USER}/chorke/academia/dev
DEV_PLAYGROUND_SRC=${MOTHER_SRC}/${SISTER_CONCERN}/dev
DEV_PLAYGROUND_DES=${DOCUMENT_DIR}/${SISTER_CONCERN}-dev-playground
if [[ ! -L ${DEV_PLAYGROUND_DES} ]]&&[[ ! -f ${DEV_PLAYGROUND_DES} ]]&&\
[[ ! -d ${DEV_PLAYGROUND_DES} ]];then ln -s ${DEV_PLAYGROUND_SRC} ${DEV_PLAYGROUND_DES};fi
| |
# ${HOME}/Documents/academia-bkp-playground -> /opt/${USER}/chorke/academia/var/backup
BKP_PLAYGROUND_DES=${DOCUMENT_DIR}/${SISTER_CONCERN}-bkp-playground
BKP_PLAYGROUND_SRC=${MOTHER_SRC}/${SISTER_CONCERN}/var/backup
mkdir -p ${BKP_PLAYGROUND_SRC}/{database,diagram,document,helm,project}
if [[ ! -L ${BKP_PLAYGROUND_DES} ]]&&[[ ! -f ${BKP_PLAYGROUND_DES} ]]&&\
[[ ! -d ${BKP_PLAYGROUND_DES} ]];then ln -s ${BKP_PLAYGROUND_SRC} ${BKP_PLAYGROUND_DES};fi
| |
# ${HOME}/Documents/${POC}-playground -> /opt/${USER}/chorke/academia/var/playground/${POC}
POC_PLAYGROUND_DIR=${MOTHER_SRC}/${SISTER_CONCERN}/var/playground
mkdir -p ${POC_PLAYGROUND_DIR}/{ansible,awscli,cypress,docker,drone}
mkdir -p ${POC_PLAYGROUND_DIR}/{ffmpeg,flask,helm,jasypt,jmeter,locust,lua}
mkdir -p ${POC_PLAYGROUND_DIR}/{maven,mediawiki,mirth,nashorn,terraform,wiki,wrk}
if [[ ! -L ${POC_PLAYGROUND_DIR} ]]&&[[ ! -f ${POC_PLAYGROUND_DIR} ]]&&\
[[ -d ${POC_PLAYGROUND_DIR} ]]&&[[ $(ls -A ${POC_PLAYGROUND_DIR}) ]];then
for POC_PLAYGROUND_SRC in ${POC_PLAYGROUND_DIR}/*;do
if [[ ! -L ${POC_PLAYGROUND_SRC} ]]&&[[ ! -f ${POC_PLAYGROUND_SRC} ]]&&\
[[ -d ${POC_PLAYGROUND_SRC} ]]&&[[ $(ls -A ${POC_PLAYGROUND_SRC}) ]];then
POC=$(basename ${POC_PLAYGROUND_SRC})
POC_PLAYGROUND_DES=${DOCUMENT_DIR}/${POC}-playground
if [[ ! -L ${POC_PLAYGROUND_DES} ]]&&[[ ! -f ${POC_PLAYGROUND_DES} ]]&&\
[[ ! -d ${POC_PLAYGROUND_DES} ]];then ln -s ${POC_PLAYGROUND_SRC} ${POC_PLAYGROUND_DES};fi
fi
done
fi
| |
ls -lah ${HOME}/{.config,Documents}/${MOTHER_CONCERN}/${SISTER_CONCERN}
rm -rf ${HOME}/{.config,Documents}/${MOTHER_CONCERN}
sudo rm -rf /opt/${USER}
|
|
Tmux
|
Tmux | |
|---|---|
sudo apt install tmux
cat << EOF | tee ${HOME}/.tmux.conf >/dev/null
set -g base-index 1
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g default-terminal 'screen-256color'
set -g history-limit 10000
set -g status-fg green
set -g status-bg black
# Window/pane split
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
EOF
|
|
Git SCM
|
Git SCM | |
|---|---|
sudo apt install -y gitk
ssh-keygen -t ed25519 -C "email.id@academia.chorke.org" -f ~/.ssh/git.academia.chorke.org_ed25519
: <<'LOG'
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/academia/.ssh/git.academia.chorke.org_ed25519
Your public key has been saved in /home/academia/.ssh/git.academia.chorke.org_ed25519.pub
The key fingerprint is:
SHA256:EIfunSYd2hNGEZ5X31cBcJPyJuuz8lHpNwwtzyYoxeY email.id@academia.chorke.org
The key's randomart image is:
+--[ED25519 256]--+
| ..+o .o+o.o|
| .+.. o.o...|
| ...o . o . o|
| ..+... oo .|
| . *S+ ++= . |
| + B +.+ * |
| o o.E o B |
| ..o. + .|
| ooo |
+----[SHA256]-----+
LOG
ls -lah ~/.ssh/
cat < ~/.ssh/git.academia.chorke.org_ed25519.pub
| |
nano ~/.ssh/config
: <<'END_COMMENT'
Host git.academia.chorke.org
HostName git.academia.chorke.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/git.academia.chorke.org_ed25519
User git
END_COMMENT
|
|
git config --global user.email "email.id@academia.chorke.org"
git config --global user.name "FULL NAME"
ssh -vT git.academia.chorke.org
|
|
# add the new key(s) to known_hosts
ssh-keyscan -H git.academia.chorke.org >> ~/.ssh/known_hosts
# remove the old key(s) from known_hosts
ssh-keygen -R git.academia.chorke.org
|
|
Podman
|
Podman | |
|---|---|
sudo apt update
sudo apt install podman
podman -v
|
|
cat << EOF | sudo tee -a /etc/containers/registries.conf >/dev/null
[registries.search]
registries=["registry.access.redhat.com", "registry.fedoraproject.org", "docker.io"]
EOF
podman search ubuntu
podman pull ubuntu
podman images
podman info
| |
Vagrant
|
Vagrant | |
|---|---|
curl -fsSL https://apt.releases.hashicorp.com/gpg\
| sudo tee /etc/apt/keyrings/hashicorp.asc >/dev/null
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}")
cat << SRC | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/hashicorp.asc]\
https://apt.releases.hashicorp.com ${DISTRIBUTION} main
SRC
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y vagrant
EXE
vagrant -v
|
|
sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils
sudo systemctl enable --now libvirt-guests.service
sudo systemctl enable --now virtlogd.service
sudo systemctl enable --now libvirtd.service
systemctl status libvirt-guests.service
systemctl status libvirtd.service
systemctl status virtlogd.service
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER
newgrp libvirt
newgrp kvm
| |
sudo systemctl disable --now libvirt-guests.service
sudo systemctl disable --now virtlogd.service
sudo systemctl disable --now libvirtd.service
sudo systemctl disable --now virtlogd-admin.socket
sudo systemctl disable --now virtlogd.socket
sudo systemctl disable --now libvirtd-admin.socket
sudo systemctl disable --now libvirtd-ro.socket
sudo systemctl disable --now libvirtd.socket
|
|
Docker
|
Docker | |
|---|---|
sudo apt install apt-transport-https ca-certificates curl software-properties-common
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg\
| sudo tee /etc/apt/keyrings/docker.asc >/dev/null
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}")
cat << SRC | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/docker.asc]\
https://download.docker.com/linux/ubuntu ${DISTRIBUTION} stable
SRC
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl status docker
sudo usermod -aG docker ${USER}
echo 'id -nG'|sudo -i -u ${USER} bash
echo 'docker ps -a'|sudo -i -u ${USER} bash
| |
yq -o=json <<'YML'| \
sudo tee /etc/docker/daemon.json >/dev/null
---
bip: 10.20.13.1/24
mtu: 1500
dns:
- 1.1.1.1
- 8.8.8.8
debug: true
YML
|
|
sudo systemctl stop docker.socket
sudo systemctl stop docker.service
sudo systemctl start docker.service
su - ${USER}
docker run --rm alpine cat /etc/resolv.conf
docker run --rm alpine cat /etc/hosts
|
|
LXD
|
LXD | |
|---|---|
sudo apt upgrade && sudo apt autoremove
sudo snap install lxd --channel=6.1/stable
sudo usermod -aG lxd ${USER}
echo 'id -nG'|sudo -i -u ${USER} bash
echo 'lxc version'|sudo -i -u ${USER} bash
|
|
sudo lxd init
:'
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]: lxd-btrfs-pool-aa
Name of the storage backend to use (btrfs, ceph, dir, lvm, powerflex) [default=btrfs]:
Create a new BTRFS pool? (yes/no) [default=yes]:
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]:
Size in GiB of the new loop device (1GiB minimum) [default=30GiB]: 100GiB
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: 10.20.0.1/24
Would you like LXD to NAT IPv4 traffic on your bridge? [default=yes]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none
Would you like the LXD server to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: yes
'
sudo ufw allow http
sudo ufw allow OpenSSH
sudo ufw allow in on lxdbr0
sudo ufw route allow in on lxdbr0
sudo ufw route allow out on lxdbr0
sudo ufw status verbose
sudo systemctl status ufw
sudo ufw enable
lxc launch images:alpine/3.20 academia &&
lxc exec academia sh
|
---
config: {}
networks:
- config:
ipv4.address: 10.20.0.1/24
ipv4.nat: "true"
ipv6.address: none
description: ""
name: lxdbr0
type: ""
project: default
storage_pools:
- config:
size: 100GiB
description: ""
name: lxd-btrfs-pool-aa
driver: btrfs
storage_volumes: []
profiles:
- config: {}
description: ""
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: lxd-btrfs-pool-aa
type: disk
name: default
projects: []
cluster: null
|
Arduino
|
Arduino | |
|---|---|
sudo apt install arduino
sudo snap install arduino
|
|
sudo wget -c https://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz -P /opt/ide/
sudo tar -xvf /opt/ide/arduino-1.8.19-linux64.tar.xz -C /opt/ide/
sudo rm -rf /opt/ide/arduino-1.8.19-linux64.tar.xz
sudo /opt/ide/arduino-1.8.19/install.sh
sudo usermod -aG dialout ${USER}
newgrp dialout
id -nG
|
|
Qt Creator
|
Qt Creator | |
|---|---|
sudo apt install qtcreator
sudo apt remove qtcreator
sudo apt auto-remove qtcreator
|
|
Microsoft
|
Microsoft | |
|---|---|
sudo apt install -y apt-transport-https \
ca-certificates curl software-properties-common wget
|
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc\
| sudo tee /etc/apt/keyrings/microsoft.asc >/dev/null
|
cat << EOF | sudo tee /etc/apt/sources.list.d/microsoft-edge.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/microsoft.asc]\
https://packages.microsoft.com/repos/edge stable main
EOF
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y microsoft-edge-stable
EXE
microsoft-edge -version
|
cat << EOF | sudo tee /etc/apt/sources.list.d/microsoft-code.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/microsoft.asc]\
https://packages.microsoft.com/repos/code stable main
EOF
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y code
EXE
code -version
|
Remote
|
Remote | |
|---|---|
sudo ufw allow 5900/tcp
sudo ufw status verbose
systemctl --user restart gnome-remote-desktop.service
systemctl --user status gnome-remote-desktop.service
gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend
|
|
DaVinci Resolve
|
DaVinci Resolve | |
|---|---|
wget -cq https://sw.blackmagicdesign.com/DaVinciResolve/v18.1.4/DaVinci_Resolve_18.1.4_Linux.zip\
?Key-Pair-Id=${KEY_PAIR_ID}==&Expires=${KEY_EXPIRES} -P ${HOME}/Downloads
unzip DaVinci_Resolve_18.1.4_Linux.zip -d ${HOME}/Downloads
sudo apt install libfuse2 libxcb-cursor0 libxcb-damage0
sudo ./DaVinci_Resolve_18.1.4_Linux.run -i
|
|
Kontena Lens
|
Kontena Lens | |
|---|---|
# install from snapcraft
sudo snap install kontena-lens --classic
curl -fsSL https://downloads.k8slens.dev/keys/gpg\
| sudo tee /etc/apt/keyrings/kontena-lens.asc >/dev/null
cat << EOF | sudo tee /etc/apt/sources.list.d/kontena-lens.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/kontena-lens.asc]\
https://downloads.k8slens.dev/apt/debian stable main
EOF
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y lens
EXE
|
|
OpenSSH Server
|
OpenSSH Server | |
|---|---|
sudo apt-get install -y openssh-client
sudo apt-get install -y openssh-server
sudo apt-get install -y openssh-sftp-server
|
|
Knowledge
|
Knowledge | |
|---|---|
tmux ls
tmux new -s my_session
tmux attach-session -t 0
tmux attach-session -t my_session
Ctrl + b % » Split pane horizontally
Ctrl + b " » Split pane vertically
Ctrl + b x » Close current pane
|
Ctrl + b c » Create a new window
Ctrl + b w » Choose window from a list
Ctrl + b 0 » Switch to window by number
Ctrl + b , » Rename the current window
Ctrl + b o » Go to the next pane
Ctrl + b ; » Toggle between pane
Ctrl + b d » Detach the session
|
lsblk
lscpu
lsusb
free -h
sudo lshw
ufw status
ufw status verbose
systemctl status ufw
apt list --installed
|
sudo ufw allow http
sudo ufw allow OpenSSH
sudo ufw allow 5900/tcp
sudo ss -tulpn | grep LISTEN
sudo ss -tulwn | grep LISTEN
sudo ss -tulpn | grep LISTEN | grep sshd
sudo ss -tulpn | grep LISTEN | grep redis
sudo ss -tulpn | grep LISTEN | grep gnome
sudo ss -tulpn | grep LISTEN | grep apache
|
sudo dmidecode -t
sudo dmidecode -t 1
sudo dmidecode -t 3
|
sudo dmidecode | grep 'SKU Number'
sudo dmidecode -s system-product-name
sudo dmidecode -s system-serial-number
|
# disk usage
du -h /var
du -sh /var
du -csh ~/Do*
du -csh /var/log /var/lib
du -sh --apparent-size /var/lib
du -h /var/ | sort -rh | head -5
sudo dpkg --remove --force-remove-reinstreq ${PACAKGE_NAME:-vim}
|
sudo dpkg -i ~/Downloads/TIB_js-studiocomm_6.16.0_linux_amd64.deb
sudo dpkg -i ~/Downloads/code_1.74.3-1673284829_amd64.deb
sudo dpkg -i ~/Downloads/teams_1.5.00.23861_amd64.deb
sudo dpkg -i ~/Downloads/anydesk_6.2.1-1_amd64.deb
sudo dpkg -i ~/Downloads/freedownloadmanager.deb
sudo dpkg -i ~/Downloads/zoom_amd64.deb
sudo apt-get install --fix-broken
sudo apt-get install -f
|
sudo apt-get install balena-etcher-electron
sudo apt-get install inetutils-traceroute
sudo apt-get install libavcodec60 ffmpeg
sudo apt-get install gedit-plugins
sudo apt-get install sublime-text
sudo apt-get install makepasswd
sudo apt-get install obs-studio
sudo apt-get install mesa-utils
sudo apt-get install filezilla
sudo apt-get install net-tools
sudo apt-get install xournalpp
sudo apt-get install neofetch
sudo apt-get install libfuse2
sudo apt-get install gtkhash
sudo apt-get install upx-ucl
sudo apt-get install hwinfo
sudo apt-get install ktouch
sudo apt-get install podman
sudo apt-get install bolt
sudo apt-get install tree
sudo apt-get install tmux
sudo apt-get install jq
sudo apt-get install mc
|
sudo snap install maas --channel=3.3/stable
sudo snap install dotnet-sdk --classic
sudo snap install powershell --classic
sudo snap install notepad-plus-plus
sudo snap install telegram-desktop
sudo snap install skype --classic
sudo snap install nvim --classic
sudo snap install code --classic
sudo snap install figma-linux
sudo snap install zoom-client
sudo snap install arduino
sudo snap install firefox
sudo snap install postman
sudo snap install drawio
sudo snap install maas
sudo snap disable mass
sudo snap install slack
sudo snap refresh drawio
sudo snap refresh firefox
sudo snap remove postman
|
ls -lah ~/.local/share/applications/
ls -lah ~/.config/autostart/
ls -lah ~/.local/share/
|
rm -rf ~/.local/share/applications/jetbrains-toolbox.desktop
rm -rf ~/.config/autostart/jetbrains-toolbox.desktop
rm -rf ~/.local/share/JetBrains/Toolbox
|
lspci | grep -i thunder
# git stashing
git stash; git checkout -b new_branch; git stash pop
git add .; git commit -m "new feature added"; git push
|
# reset time zone
timedatectl set-ntp true
timedatectl set-ntp false
timedatectl set-time '2021-12-31 23:58:00'
timedatectl set-timezone 'Asia/Kuala_Lumpur'
|
#nano ~/.bashrc
#nano ~/.zshenv
#nano ~/.profile
#nano ~/.bash_profile
export ACADEMIA_WSS="$HOME/chorke/academia"
export ACADEMIA_LOG_PATH="$HOME/.chorke/academia/var/http/logs"
|
source ~/.bashrc
source ~/.profile
source ~/.bash_profile
source ~/.zshenv
source ~/.zprofile/.zlogin
|
ssh-keygen -p -f ~/.ssh/git_academia_chorke_org_rsa
: <<'END_COMMENT'
Enter old passphrase:
Key has comment 'email.id@academia.chorke.org'
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.
END_COMMENT
| |
# comment and uncomment sql
sed -i -e 's|^|-- |g' src/main/resources/db/migration/*.sql
sed -i -e 's|^-- ||g' src/main/resources/db/migration/*.sql
sudo systemctl enable --now ssh
sudo systemctl disable --now ssh
# hide mounted drives
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
| |