Skip to content

codewithmecoder/some-helpful-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Nginx

Go to file config

cd /etc/nginx/sites-available/

View file config (make sure you are in path /etc/nginx/sites-available/)

cat default

Edit

sudo nano default

After done editing make sure you restart the Nginx service

sudo systemctl restart nginx.service

Docker

List all running containers

docker ps

List all running and exited containers

docker ps -a

View the console of container

docker logs -f --tail 500 <container name>

Stop running container

docker stop <container name>

Restart container

docker restart <container name>

Clear all exited image

docker system prune -a

Jenkens

When build containers with jenkins and have problem: cannot connect to docker daemon run command below:

restart docker
sudo chmod 666 /var/run/docker.sock

Create cert with openssl rsa sha256

cd to directory that you want to put your cert files in

openssl rsa -in private.pem -pubout -out public.pem

Connect MYSQL

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'allweb17';
FLUSH PRIVILEGES;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published