Crmgo Blog

Linux

← Blog

Linux

3ptoxyActiveDirectoryCentOSDebianFTPIP v.6JiraKVMLibreOfficeLomixMYSQLMuninNginxOpenSUSEOpenWRTPostfixRedmineSQUIDSVNUbuntuUbuntu 12.04Ubuntu 13.04VPNZabbixapachebackupbindcactidhcpejabberdfsckgrepiptablesispmanagerpostgresqlrdesktopremastersysroutesambascreensedsnmptartcpdumptftp-serverthunderbirdtruecriptvideovimvsftpGeneral questionsMailWorking with foldersFontswith files

Posts: 189

KVM, USB Device Passthrough

KVM, USB Device Passthrough

· KVM

Find out which bus the USB device is on: # lsusb Bus 007 Device 002: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash Drive Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0001 Linux…

Installing TrueCrypt

Installing TrueCrypt

· Linux

Installing additional packages: For CentOS 6: yum install libfuse2 fuse-utils dmsetup For CentOS 7: yum install fuse fuse-devel device-mapper Installing TrueCrypt: Warning! Version 7.2 does not support encryption, so download version 7.1a: tar -xzvf truecrypt-7.1a-linux-console-x64.tar.gz sh truecrypt-7.1a-setup-console-x64 Create folders where we will...

Installing Owncloud 9 + Nginx + MariaDB on CentOS 7

Installing Owncloud 9 + Nginx + MariaDB on CentOS 7

· Linux

If the repository is not connected: sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm Install packages: yum -y install nginx mariadb mariadb-server php-fpm php-cli php-gd php-mcrypt php-mysql php-pear php-xml bzip2 wget Start MariaDB: systemctl start mariadb systemctl enable mariadb.service mysql_secure_installation php-fpm: vim /etc/php-fpm.d/www.conf mkdir -p /var/lib/php/session…

Configuring Encryption

Configuring Encryption

· Postfix

Information from Google: vim /etc/postfix/main.cf smtp_use_tls = yes smtp_tls_mandatory_ciphers = high smtp_tls_mandatory_protocols=!SSLv2,!SSLv3 tls_high_cipherlist = ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK smtpd_tls_mandatory_ciphers = high smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache service postfix restart

DKIM + Postfix + CentOS 7 (digital signature for email)

DKIM + Postfix + CentOS 7 (digital signature for email)

· Linux

server:/ # apt-get install opendkim opendkim-tools Create a separate folder for OpenDKIM and move the configuration file to this folder. For compatibility, leave a link in the previous location. 1 2 3 4 server:/ # mkdir /etc/opendkim server:/ # chown opendkim:opendkim /etc/opendkim server:/ #…

Checking the file system and disk for bad sectors

Checking the file system and disk for bad sectors

· Linux

sudo fsck -y -f -c /dev/sda1 If you see an error, you most likely need to unmount this partition: sudo umount /dev/sda1 Keys and parameters of the fsck command: y — always answer yes to all questions (there is an alternative: key p — starts the check in…

MySQL: Identifying Long-Running Queries

MySQL: Identifying Long-Running Queries

· MYSQL

[mysqld] long_query_time=1 log-slow-queries=/var/log/mysql/log-slow-queries.log long_query_time = 10 mkdir /var/log/mysql touch /var/log/mysql/log-slow-queries.log chown mysql.mysql -R /var/log/mysql

CentOS 7, Installing Jira

CentOS 7, Installing Jira

· Jira

Create the database and user: mysql -p Download the binary from https://www.atlassian.com/software/jira/download chmod a+x atlassian-jira-software-7.2.2-x64.bin ./atlassian-jira-software-7.2.2-x64.bin Answer the prompts. After installation, you can access Jira on port 8080. To connect to MySQL, we need the MySQL connector; download it from: http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.39.tar.gz tar…

Configuring Squid with NCSA Authentication

Configuring Squid with NCSA Authentication

· SQUID

yum install squid vim /etc/squid/squid.conf Attention! In version 3.3, the line needs to be replaced with If you have x64: Create a user: if apache is not installed: yum install httpd-tools # htpasswd -c /etc/squid/internet_users admin 1234567 To add another user, use: # htpasswd…

Reading Lines from Files

Reading Lines from Files

· sed

Example 1: Output specific lines by their line numbers using the sed command. The command allows viewing only the desired lines with explicitly specified line numbers. Syntax: $ sed -n -e Xp -e Yp FILENAME sed: command,…

ssh without a password

ssh without a password

· Linux

ssh-keygen -t rsa, press Enter at every prompt, then run: ssh-copy-id -i ~/.ssh/id_rsa root@machine.domain.com

Redmine 3.3 + Unicorn + Nginx on CentOS 7

Redmine 3.3 + Unicorn + Nginx on CentOS 7

· Redmine

Heads-up on the pitfalls: the bundle doesn't install with MariaDB 10; I had to reinstall version 5.5. Before installing MariaDB 5.5, you need to remove everything from /var/lib/mysql. After that, download Redmine 3.3.0 and extract it to a convenient folder. Let's move the files to one of the directories designated for web applications…

Управление виртуальными машинами KVM с помощью virsh

Управление виртуальными машинами KVM с помощью virsh

· KVM

Текстовая утилита virsh предназначена для управления гостевыми системами и гипервизором. virsh использует libvirt API и служит альтернативой xm и графическому менеджеру виртуальных машин ( virt-manager ). Непривилегированные пользователи могут выполнять доступ в только в режиме чтения. С помощью virsh можно…

KVM Configuration Files

KVM Configuration Files

· KVM

The configuration of virtual machines is stored in XML files in the /etc/libvirt/qemu/ directory. To display the configuration of a VM named freebsd, enter: or After creating virtual machines using virt-manager or virt-install, XML files describing the virtual machine configuration will be created in the /etc/libvirt/qemu/ directory. To edit…

KVM, cloning error in CentOS 7

KVM, cloning error in CentOS 7

· KVM

When cloning a VM, an unpleasant bug occurs related to its configuration file. This file contains a section where `test` is the VM name. When cloning using the command: `virt-clone -o test -n test2 -f /tmp/test2.img`, the name in the path does not change with…

MySQL Replication Master - Slave

MySQL Replication Master - Slave

· MYSQL

Step 1. Configuring the Master mkdir /var/log/mysql/ touch /var/log/mysql/mysql-bin.log chown -R mysql:mysql /var/log/mysql/ On the server that will act as the master, you need to make changes to my.cnf: Restart MySQL: Step 2. Replication Permissions Next, you need to create a user profile from which the…