Archive for February, 2019

Feb 14 2019

Cara melihat Versi Linux Ubuntu

Published by under LinuX

lsb_release -a

Comments Off on Cara melihat Versi Linux Ubuntu

Feb 12 2019

Delete file di linux dengan proses find

Published by under LinuX

You can delete X days older files using find utility in your script.

find /path/to/files* -mtime +90 -exec rm {} \;

This will delete 90 Days old files

kalo folder tinggal tambahi -rf

find /path/to/files* -mtime +90 -exec rm -rf {} \;

ini untuk mendelete file bukan folder

Comments Off on Delete file di linux dengan proses find

Feb 12 2019

Menjalankan proses di putty agar tetap jalan ketika disconect

Published by under LinuX

Dengan proses yang namanya screen

caranya install dulu aplikasinya contohnya ini di ubuntu

#apt-get install screen

kemudian setelah selesai jalankan screen

#screen

akan muncul seperti dibawah ini

Screen version 4.01.00devel (GNU) 2-May-06

Copyright (c) 2010 Juergen Weigert, Sadrul Habib Chowdhury
Copyright (c) 2008, 2009 Juergen Weigert, Michael Schroeder, Micah Cowan,
Sadrul Habib Chowdhury
Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 Juergen Weigert, Michael
Schroeder
Copyright (c) 1987 Oliver Laumann

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program (see the file COPYING); if not, see http://www.gnu.org/licenses/,
or contact Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,

[Press Space for next page; Return to end.]

tingal ketik prosesnya contohnya

#wget https://nchc.dl.sourceforge.net/project/winscp/WinSCP/5.13.7/WinSCP-5.13.7-Setup.exe

setelah tekan enter bisa lngsung di close puttynya tapi proses tetap jalan di belakng layar

untuk mengembalikan proses screennya lagi tinggal ketik

#screen -d -r

maka proses akan kembali terimakasih

 

Comments Off on Menjalankan proses di putty agar tetap jalan ketika disconect

Feb 08 2019

Let’s Encrypt di Sentora

Published by under LinuX

Langkah Langkah mendapatkan certifikat SSL dari Let’s Encrypt

apt-get install git
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
cd /opt/letsencrypt/
service apache2 stop
./letsencrypt-auto certonly –standalone d contoh.com
service apache2 start

Changing Sentora port:
On Sentora Panel go to Admin -> Module Admin -> Apache Config > Override a Virtualhost [Select VHost] ->
Tick Port Override.
Forward Port 80 to Overriden Port: 443
Custom Entry:
(Don’t forget to replace domain.com with your domain’s URL below:)
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/domain.com/chain.pem
# Keeping bellow for future upgrades.
# Requires Apache >= 2.4
SSLCompression off
Save Vhost.

curl -L -o /usr/local/sbin/le-renew http://do.co/le-renew
chmod +x /usr/local/sbin/le-renew
le-renew contoh.com
nano /etc/crontab
0 4 * * 1 /usr/local/sbin/le-renew contoh.com >> /var/log/le-renew.log
php -q /etc/sentora/panel/bin/daemon.php
service httpd restart

kalo ada masalah ketika mau cari letsencrip seeprti ini

Installing Python packages…
/opt/eff.org/certbot/venv/bin/python: No module named pip.__main__; ‘pip’ is a p ackage and cannot be directly executed
Traceback (most recent call last):
File “/tmp/tmp.d0gXaMVLJb/pipstrap.py”, line 177, in <module>
sys.exit(main())
File “/tmp/tmp.d0gXaMVLJb/pipstrap.py”, line 149, in main
pip_version = StrictVersion(check_output([python, ‘-m’, ‘pip’, ‘–version’])
File “/usr/lib/python2.7/subprocess.py”, line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘[‘/opt/eff.org/certbot/venv/bin/python’, ‘-m’, ‘pip’, ‘–version’]’ returned non-zero exit status 1

caranya mudah tinggal edit di letsencrypt-auto

cd /opt/letsencrypt

nano letsencrypt-auto

ganti seperti dibawah ini

pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
dengan
pip_version = StrictVersion(check_output(['pip', '--version'])

and
command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
dengan
command = ['pip', 'install', '--no-index', '--no-deps', '-U']

kemudian jalankan

./letsencrypt-auto certonly –no-self-upgrade — standalone -d contoh.com

ingat ketika menjalankan letsencrypt apache service dimatikan dulu biar berhasil

kalo diatas masih belum bisa bisa menggunakan langkah ini

1.rm ./certbot-auto*

wget https://raw.githubusercontent.com/certbot/certbot/75499277be6699fd5a9b884837546391950a3ec9/certbot-auto

2.ganti seperti dibawah ini

pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
dengan
pip_version = StrictVersion(check_output(['pip', '--version'])

and
command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
dengan
command = ['pip', 'install', '--no-index', '--no-deps', '-U']

3. kemudian jalankan ini

chmod +x ./certbot-auto ./certbot-auto –no-self-upgrade

terimakasih semoga bermanfaat

sumber https://community.letsencrypt.org/t/pip-error-with-certbot-auto/88200/5

Comments Off on Let’s Encrypt di Sentora

Feb 07 2019

Published by under WallPapers

No responses yet