General
- Server monitoring
- Apt-get: repository setup
- Compression tools
- ssh without a password and (Mac)
- Setup wap space
- Probing new hardware
- Activating services (equivalent to ntsysv)
- Habilitando as atualizações automáticas
- Desabilitando as atualizações automáticas
- fdisk
- mount
- Disk: tune2fs -i 3d /dev/sda1
- Unattended script execution: nohup Rscript a.R > result.txt &
Proxy, Firewall, and DNS
- Proxy setup
- Setup DNS server
- Setup ethernet name (eth0, eth1,…)
- Setup firewall (iptables) (passive FTP)
- Setup router (ubuntu)
- Enabel router (dns lookup)
- Setup DHCP server
- Setup apache as a reverse proxy
- Setup apache as a reverse proxy (mod_proxy)
- Setup RStudio behind a proxy
NFS
Open Journal System (OJS)
Java
Oracle
Python
PDF Support
- sudo apt-get install pdfmod
- sudo apt-get install pdftoppm
- pdftoppm input.pdf outputname -png
WordPress
- CREATE DATABASE WP_USER;
- CREATE USER ‘WP_USER’@’localhost’ IDENTIFIED BY ‘PASSWORD’;
- GRANT ALL PRIVILEGES ON WP_USER.* TO ‘WP_USER’@’localhost’;
MySQL
- Instalation
- Backup
- mysqldump –force –opt –user=$USER –password=$PASSWORD –databases $db | gzip -c > $OUTPUT/$db.gz
- Restore
- gzip -d $db.gz
- mysql -u root -p $db < $db
- Remote calls
- CREATE USER ‘user’@’%’ IDENTIFIED BY ‘senha’;
- GRANT ALL ON *.* TO user@’%’ WITH GRANT OPTION ;
PostgreSQL
- Backup
su - postgres -c "/usr/bin/pg_dump $db | gzip -c > $DIR/$db.gz"
- Restore
gunzip $db.gz
su - postgres -c "psql -d $db -f $DIR/$db"
- Change postgres password
- su -l postgres
- psql
- alter user postgres with password ‘<senha>’;
- Remote Access
- Edit postgresql.conf
- Change: listen = ‘*’
- Edit pg_hba.conf
- Include: host all all 0.0.0.0 0.0.0.0 md5
- Edit postgresql.conf
- Main
Locale
- locale-gen pt_BR pt_BR.UTF-8
- dpkg-reconfigure locales
- apt-get dist-upgrade
- vi /etc/default/locale
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_CTYPE=en_US.UTF-8Se
[:en]General
- Server monitoring
- Apt-get: repository setup
- Compression tools
- ssh without a password and (Mac)
- Setup wap space
- Probing new hardware
- Activating services (equivalent to ntsysv)
- Habilitando as atualizações automáticas
- Desabilitando as atualizações automáticas
- fdisk
- mount
- Disk: tune2fs -i 3d /dev/sda1
- Unattended script execution: nohup Rscript a.R > result.txt &
Proxy, Firewall, and DNS
- Proxy setup
- Setup DNS server
- Setup ethernet name (eth0, eth1,…)
- Setup firewall (iptables) (passive FTP)
- Setup DHCP server
- Setup apache as a reverse proxy
NFS
Open Journal System (OJS)
Java
Oracle
Python
PDF Support
- sudo apt-get install pdfmod
- sudo apt-get install pdftoppm
- pdftoppm input.pdf outputname -png
WordPress
- CREATE DATABASE WP_USER;
- CREATE USER ‘WP_USER’@’localhost’ IDENTIFIED BY ‘PASSWORD’;
- GRANT ALL PRIVILEGES ON WP_USER.* TO ‘WP_USER’@’localhost’;
MySQL
- Instalation
- Backup
- mysqldump –force –opt –user=$USER –password=$PASSWORD –databases $db | gzip -c > $OUTPUT/$db.gz
- Restore
- gzip -d $db.gz
- mysql -u root -p $db < $db
- Remote calls
- GRANT ALL PRIVILEGES ON $db.* TO ‘$USER’@’%’ IDENTIFIED BY ‘$PASSWORD’ WITH GRANT OPTION;
PostgreSQL
- Backup
su - postgres -c "/usr/bin/pg_dump $db | gzip -c > $DIR/$db.gz"
- Restore
gunzip $db.gz
su - postgres -c "psql -d $db -f $DIR/$db"
- Version 9.4
Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
Import the repository signing key, and update the package lists
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo apt-key add -
sudo apt-get update
- Remote Access
- Edit postgresql.conf
- Change: listen = ‘*’
- Edit pg_hba.conf
- Include: host all all 0.0.0.0 0.0.0.0 md5
- Edit postgresql.conf
- Main
Locale
- locale-gen pt_BR pt_BR.UTF-8
- dpkg-reconfigure locales
- apt-get dist-upgrade
- vi /etc/default/locale
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_CTYPE=en_US.UTF-8Se