Postagens

Mostrando postagens de 2018

Enable Apache SSL

# Enable SSL $ sudo a2enmod ssl # Enable Site $ sudo a2ensite default-ssl # Edit /etc/apache2/ports.conf NameVirtualHost *:80 NameVirtualHost *:443 <VirtualHost *:80>    ServerName mysite.example.com    DocumentRoot /usr/local/apache2/htdocs    Redirect permanent /secure https://mysite.example.com/secure </VirtualHost>

Ubuntu timezone - Daylight Saving Time

# Check Time Zone Database (tzdata/zoneinfo) # List Next Year $ zdump -v /usr/share/zoneinfo/America/Sao_Paulo # Filter 2018 $ zdump -v /usr/share/zoneinfo/America/Sao_Paulo | grep 2018 Use zdump to view the information # If needed update tzdata package

Install Syslog Server - Ubuntu

# Install syslog-ng package $ sudo apt install syslog-ng $ sudo mkdir /var/log/syslog-ng $ sudo cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.log.bak # Server configuration $ sudo vi /etc/syslog-ng/syslog-ng.conf @version: 3.5 @include "scl.conf" @include "`scl-root`/system/tty10.conf" options { chain_hostnames(off); flush_lines(0); use_dns(yes); use_fqdn(no);           owner("root"); group("adm"); perm(0640); stats_freq(0);           bad_hostname("^gconfd$"); # default 514/UDP source s_local { udp(); }; destination d_local { file("/var/log/syslog-ng/messages_${HOST}"); }; log { source(s_local); destination(d_local); }; # Restart sudo systemctl start syslog-ng sudo systemctl enable syslog-ng

Configure proxy for APT on Ubuntu

$ sudo vi /etc/apt/apt.conf Add this line: Acquire::http::Proxy "http://address:port";

Install Zabbix 4.0 LTS with MySQL database on Ubuntu 16.04 LTS

Install Zabbix 4.0 LTS with MySQL database on Ubuntu 16.04 LTS # Adding Apt Repository $ wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-2+xenial_all.deb $ sudo dpkg -i zabbix-release_4.0-2+xenial_all.deb $ sudo apt update # Install Zabbix server, frontend, agent $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent $ sudo apt install php7.0-bcmath php7.0-mbstring php7.0-xml # Create Database for Zabbix Server $ sudo mysql -u root -p mysql> create database zabbix character set utf8 collate utf8_bin; mysql> GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'zabbix'; mysql> quit; # Import Initial Schema and Data $ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix # Config Database for Zabbix server $ sudo vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password # Config PHP $ sudo vi /etc/zabbix/apache.conf php_value date.timezon

Install Zabbix 3.4 with MySQL database on Ubuntu 16.04 LTS

Install Zabbix 3.4 with MySQL database on Ubuntu 16.04 LTS # Adding Apt Repository $ wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb $ sudo dpkg -i zabbix-release_3.4-1+xenial_all.deb $ sudo apt update # Install Zabbix server, frontend, agent $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent $ sudo apt install php7.0-bcmath php7.0-mbstring php7.0-xml # Create Database for Zabbix Server $ sudo mysql -u root -p mysql> create database zabbix character set utf8 collate utf8_bin; mysql> GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'zabbix'; mysql> quit; # Import Initial Schema and Data $ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix # Config Database for Zabbix server $ sudo vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password # Config PHP $ sudo vi /etc/zabbix/apache.conf php_value date.timezone Am

Docuware 6.9 Install

# Docuware 6.9 Install / Migrate Install Windows Server 2012 Change hostname and add to domain Update Windows Server Create local user with administrators group Add local user to "Log on as a service" in GPEDIT.msc Install Web Server Role (IIS) and features Basic Authetication Default document Static Content ASP.NET (4.5) HTTP Redirect Windows Authentication WebSocket Protocol HTTP Activation Install SQL Server Update SQL Server Enable TCP/IP Protocol and TCP Port 1433 Create SQL local user and grant sysadmin and securityadmin in Server Roles Restore Database (Shrink if necessary) Install module "Authentication Server" and "Docuware Administration" Run "%ProgramFiles(x86)\Docuware\Setup Components\Docuware.Tools.DWSystemUpgrader" Change configuration database connections Change FileCabinet Path Install Docuware Restore FileCabinet Folder If need Execute the "DocuWare.Tools.

Cat a File, Without the Comments

# How to cat a file, without the comments $ cat /etc/squid/squid.conf | egrep -v "(^#.*|^$)"

Remote Management on Server 2012 R2 & Hyper-V (Workgroup)

# Client Add "<IP> <servername>" on C:\Windows\System32\drivers\etc\hosts > winrm quickconfig > winrm set winrm/config/client '@{TrustedHosts="Server_Hostname"}' # Server Create same Username and Password on Server and add to Administrators Group

Install Zabbix 3.2 with MySQL database on Ubuntu 16.04 LTS

Install Zabbix 3.2 for Ubuntu 16.04 LTS # Adding Apt Repository $ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb $ sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb $ sudo apt update # Install Zabbix server, frontend, agent $ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent $ sudo apt install php7.0-bcmath php7.0-mbstring php7.0-xml # Create Database for Zabbix Server $ sudo mysql -u root mysql> create database zabbix character set utf8 collate utf8_bin; mysql> GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'zabbix'; mysql> quit; # Import Initial Schema and Data $ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix # Config Database for Zabbix server $ sudo vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password # Config PHP $ sudo vi /etc/zabbix/apache.conf php_value date.time