Professional Documents
Culture Documents
nano /etc/apt/sources.list
## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ wily-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ wily-updates main restricted
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ wily-backports main restricted
universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ wily-backports main restricted
universe multiverse
Tambahkan hosts
1. Di server sendiri sesuaikan hosts dengan nama server, tambah
panel dan nameserver
2. Di panel tambah nama server sendiri
apt-get update
apt-get upgrade
reboot
dpkg-reconfigure dash <== no
servicespamassassinstop
updaterc.dfspamassassinremove
nano /etc/postfix/master.cf
[...]
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
[...]
nano /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
sql-mode=NO_ENGINE_SUBSTITUTION
#bind=127.0.0.1
servicemysqlrestart
aptgetinstallamavisdnewspamassassinclamavclamavdaemonzoounzipbzip2arjnomarch
lzopcabextractaptlistchangeslibnetldapperllibauthensaslperlclamavdocsdaemonlibio
stringperllibiosocketsslperllibnetidentperlziplibnetdnsperl
Errorswereencounteredwhileprocessing:
amavisdnew
E:Subprocess/usr/bin/dpkgreturnedanerrorcode(1)
Ifthiserroroccurs,makesurethatyourhostnamehasregisteredon/etc/hosts
sudonano/etc/php/7.0/fpm/php.ini
Perhatikanukuranmemory_limit=128Mdanpost_max_size = 8M
harus lebih besar dariupload_max_filesize = 2M (pada panel2-vm)
[...]
cgi.fix_pathinfo=0
[...]
date.timezone="Europe/Berlin"
[...]
apt-get install php7.0-sqlite
phpenmod crypt
nano/etc/default/pureftpdcommon
[...]
STANDALONE_OR_INETD=standalone
[...]
VIRTUALCHROOT=true
[...]
nano /etc/fstab
ubahpartisi/menjadi:
/ ext4 errors=remount-
ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0
1
mount -o remount /
quotacheckavugmquotaonavug
apt-get install vlogger webalizer awstats geoip-database
libclass-dbi-mysql-perl
nano/etc/cron.d/awstats
...andcommentouteverythinginthatfile:
#MAILTO=root
#*/10****wwwdata[x/usr/share/awstats/tools/update.sh]&&
/usr/share/awstats/tools/update.sh
#Generatestaticreports:
#1003***wwwdata[x/usr/share/awstats/tools/buildstatic.sh]&&
/usr/share/awstats/tools/buildstatic.sh
jailkitinstall
aptgetinstallbuildessentialautoconfautomakelibtoolflexbisondebhelperbinutilsgold
cd/tmp
wgethttp://olivier.sessink.nl/jailkit/jailkit2.15.tar.gz
tarxvfzjailkit2.15.tar.gz
cdjailkit2.15
./debian/rulesbinary
cd..
dpkgijailkit_2.151_*.deb
rm -rf jailkit-2.15*
installfail2ban
create
nano/etc/fail2ban/jail.local
[pureftpd]
enabled=true
port=ftp
filter=pureftpd
logpath=/var/log/syslog
maxretry=3
[dovecotpop3imap]
enabled=true
filter=dovecotpop3imap
action=iptablesmultiport[name=dovecotpop3imap,port="pop3,pop3s,imap,imap
logpath=/var/log/mail.log
maxretry=5
[postfixsasl]
enabled=true
port=smtp
filter=postfixsasl
logpath=/var/log/mail.log
maxretry=3
nano /etc/fail2ban/filter.d/pureftpd.conf
[Definition]
failregex=.*pureftpd:\(.*@<HOST>\)\[WARNING\]Authenticationfailedfor
ignoreregex=
nano /etc/fail2ban/filter.d/dovecot-pop3imap.conf
[Definition]
failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|
Aborted login \(auth failed|Aborted login \(tried to use disabled|
Disconnected \(auth failed|Aborted login \(\d+ authentication
attempts).*rip=(?P<host>\S*),.*
ignoreregex =
echo "ignoreregex =" >> /etc/fail2ban/filter.d/postfix-sasl.conf
mysql u root -p
Install ISPCOnfig
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3.1.1p1.tar.gz
cd ispconfig3_install/install/
php -q install.php
/etc/nginx/nginx.conf
Edit/etc/nginx/sitesavailable/default
http://www.kangerik.com/cara-mengatasi-masalah-error-nginx-413-request-
entity-too-large/
dump database
database lama
mysqldump u root p {nama database} > {database.sql}
show databases
SIMAK:
1. Mysql gunakan mysqli di function.php karena ini php7.0 pakai mysqli
2. Kalau tidak pakai 2 php (catatan ada di telegram pak putra)
3. Jika menggunakan dua domain dalam 1 directory, gunakan
aliasdomain
4. Tambahkan directive di nano /etc/nginx/sites-
available/simak.unud.ac.id.vhost
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
Liat eror
/var/log/ispconfig/httpd/{nama website}/error.log
Cek database
show databases;
include_path='.:/usr/share/php'
Reset password ISPConfig
mysql -u root -p
use dbispconfig;
UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';
quit;
http://relativitynetworks.com/index.php?topic=64.0
https://webepidemic.com/backup-mysql-database-with-cron-job/
https://www.howtoforge.com/community/threads/information-regarding-the-backup-
tab-in-ispconfig-3-0-3.49677/
http://beadmin.2tl.eu/post/script-to-backup-your-websites-and-
databases#.WKVkCfJj3T8