Tag: it

Gitlab

Setup HTTPS for Gitlab

Generate a new private key and a Certificate Signing Request openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.reqopenssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.req Generate a certificate signing request (CSR) for an existing private key openssl req -new -key example.com.key -out example.com.reqopenssl req -new -key example.com.key -out example.com.req Edit Gitlab …

WEB Servers

Configuring HTTPS server – Nginx

Generate a new private key and a Certificate Signing Request openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.reqopenssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.req Generate a certificate signing request (CSR) for an existing private key openssl req -new -key example.com.key -out example.com.reqopenssl req -new -key example.com.key -out example.com.req Edit nginx …

Debian

How to mount Windows share on Debian

Install mount.cifs mount.cifs mounts a Linux CIFS filesystem. It is usually invoked indirectly by the mount command when using the “-t cifs” option. This command only works in Linux, and the kernel must support the cifs filesystem. The CIFS protocol is the successor to the SMB protocol and is supported by most Windows servers and …

Apache, Debian

Apache web server SSL authentication

Mutual authentication or two-way authentication refers to two parties authenticating each other at the same time, being a default mode of authentication in some protocols (IKE, SSH) and optional in others (TLS). By default the TLS protocol only proves the identity of the server to the client using X.509 certificate and the authentication of the …

Linux

Move directory to another server

* Compress directory tar cvzf myfolder.tar.gz myfolder/tar cvzf myfolder.tar.gz myfolder/ * Copy directory scp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gzscp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gz * Extract directory contents on new server tar -xvzf myfolder.tar.gz -C /path/to/myfoldertar -xvzf myfolder.tar.gz -C /path/to/myfolder

MySQL

Copying MySQL database to another server

* Export database from old server: mysqldump -u[username] -p[password] db_name > db_backupmysqldump -u[username] -p[password] db_name > db_backup * Copy backup to new server: scp db_backup [username]@[ip_address_or_hostname]:/home/[username]/db_backupscp db_backup [username]@[ip_address_or_hostname]:/home/[username]/db_backup * Import database to new server: mysql -u [username] -p -h localhost db_name < db_backupmysql -u [username] -p -h localhost db_name < db_backup

Linux

OpenSSH server installation

To install the OpenSSH server application on your Ubuntu server system: Installation sudo apt-get install openssh-serversudo apt-get install openssh-server Backup original configuration file sudo cp / etc/ssh/sshd_config / etc/ssh/sshd_config.originalsudo cp / etc/ssh/sshd_config / etc/ssh/sshd_config.original sudo chmod a-w / etc/ssh/sshd_config.originalsudo chmod a-w / etc/ssh/sshd_config.original Generate SSH keys During the process you will be prompted for a …