Giter VIP home page Giter VIP logo

wiki_by_nha's Introduction

Wiki_by_nha

all things I always forget

Host remotely

Expose postgres port: 5432

docker run --name posttest -d -p 5432:5432 -e POSTGRES_PASSWORD=dongbang009095 postgres:alpine

List all opening ports

netstat -tulpn

Flutter build error:

  • Firebase For Flutter Execution failed for task ':app:transformClassesWithDexForDebug': update gradle and google service

Flutter build flavor

###IOS flutter run -d 350F9D48-A958-4551-88D5-21243897CB14 --flavor lop9_ios -t lib/main_lop9_ios.dart

Jav Spring running

ps -A |grep java kill -9 8959 java -jar MySchool-0.5.3.jar -d

Copy file to host

scp path_to_file root@ip:/direct_path

Ubuntu free space

sudo apt-get autoclean sudo apt-get autoremove

Uninstalled Docker using:


Installed again using:

curl -fsSL https://get.docker.com/ | sh

chkconfig docker on

service docker start

The result of last command is:
Redirecting...

sort by size

du -hs * | sort -h

java service manager

What follows is the easiest way to install a Java application as system service in Linux.

Let's assume you are using systemd (which any modern distro nowadays does):

Firstly, create a service file in /etc/systemd/system named e.g. javaservice.service with this content:

[Unit]
Description=Java Service

[Service]
User=nobody
# The configuration file application.properties should be here:
WorkingDirectory=/data 
ExecStart=/usr/bin/java -Xmx256m -jar application.jar --server.port=8081
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Secondly, notify systemd of the new service file:

systemctl daemon-reload and enable it, so it runs on boot:

systemctl enable javaservice.service Eventually, you can use the following commands to start/stop your new service:

systemctl start javaservice
systemctl stop javaservice
systemctl restart javaservice
systemctl status javaservice

#log
journalctl -u ezquiz -f

Open a port

sudo ufw allow from any to any port 10000 proto tcp

wiki_by_nha's People

Contributors

nhapcs avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.