You can add: [arch=amd64]
deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main
Author Archives: Vitalijus Ryzakovas
extract deb
apt install binutils
ar vx nginx_1.10.0-0ubuntu0.16.04.4_all.deb
wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or director
apt-get install libxrender1
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash curl: (22) The requested URL returned error: 404
Ubuntu 20 install Ruby 3
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
curl: (22) The requested URL returned error: 404
curl -fsSL https://raw.githubusercontent.com/rbenv/rbenv-installer/main/bin/rbenv-installer | bash
Installing rbenv with git…
Initialized empty Git repository in /root/.rbenv/.git/
Updating origin
remote: Enumerating objects: 2960, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 2960 (delta 62), reused 91 (delta 51), pack-reused 2843
Receiving objects: 100% (2960/2960), 577.31 KiB | 7.60 MiB/s, done.
Resolving deltas: 100% (1850/1850), done.
From https://github.com/rbenv/rbenv
* [new branch] master -> origin/master
* [new tag] v0.1.0 -> v0.1.0
* [new tag] v0.1.1 -> v0.1.1
* [new tag] v0.1.2 -> v0.1.2
* [new tag] v0.2.0 -> v0.2.0
* [new tag] v0.2.1 -> v0.2.1
* [new tag] v0.3.0 -> v0.3.0
* [new tag] v0.4.0 -> v0.4.0
* [new tag] v1.0.0 -> v1.0.0
* [new tag] v1.1.0 -> v1.1.0
* [new tag] v1.1.1 -> v1.1.1
* [new tag] v1.1.2 -> v1.1.2
* [new tag] v1.2.0 -> v1.2.0
Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
Already on ‘master’
make: Entering directory ‘/root/.rbenv/src’
gcc -fPIC -c -o realpath.o realpath.c
gcc -shared -Wl,-soname,../libexec/rbenv-realpath.dylib -o ../libexec/rbenv-realpath.dylib realpath.o
make: Leaving directory ‘/root/.rbenv/src’
Installing ruby-build with git…
Cloning into ‘/root/.rbenv/plugins/ruby-build’…
remote: Enumerating objects: 12195, done.
remote: Counting objects: 100% (888/888), done.
remote: Compressing objects: 100% (302/302), done.
remote: Total 12195 (delta 604), reused 773 (delta 529), pack-reused 11307
Receiving objects: 100% (12195/12195), 2.54 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (8071/8071), done.
All done!
/root/.rbenv/bin/rbenv install 3.0.2
Downloading ruby-3.0.2.tar.gz…
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
Installing ruby-3.0.2…
Installed ruby-3.0.2 to /root/.rbenv/versions/3.0.2
mongodb create admin user
Mongodb 3:
use admin
db.createUser(
{
user: "username",
pwd: "password",
roles: [ "root" ]
}
)
MongoDB older:
db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})<
/code>
mysql change user host to any
RENAME USER 'user'@'localhost' TO 'user'@'%';
autoremove only linux
apt-get autoremove -s | sed -ne 's/Remv \(linux[^[]*\)\[.*/\1/gp' | xargs apt-get remove -y
MySecureShell
MySecureShell is a solution which has been made to bring more features to sftp/scp protocol given by OpenSSH. By default, OpenSSH brings a lot of liberty to connected users which imply to trust in your users. The goal of MySecureShell is to offer the power and security of OpenSSH, with enhanced features (like ACL) to restrict connected users.
wget ERROR: The certificate of ‘repo.zabbix.com’ is not trusted
vim /etc/ca-certificates.conf
comment line mozilla/DST_Root_CA_X3.crt
update-ca-certificates -f -v
Clearing symlinks in /etc/ssl/certs…
done.
Updating certificates in /etc/ssl/certs…
Doing .
150 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d…
done.
This will update update /etc/ssl/certs on Debian 9
pure-pw useradd xargs pass password
( echo ${password} ; echo ${password} ) | pure-pw useradd ftp_user -
u ftpuser -g ftpgroup -d /www/dir/ > /dev/
null 2>&1
postgresql vacumm disk space
Run vacuumdb without increasing disk space:
service postgresql stop
mv /var/lib/postgresql/9.5/main /mnt/new_disk
ln -s /mnt/new-disk/main /var/lib/postgresql/9.5
chown postgres:postgres /mnt/new-disk
service postgresql start
vacuumdb –all –full
service postgresql stop
rm /var/lib/postgresql/9.5/main
mv /mnt/new_disk/main /var/lib/postgresql/9.5
service postgresql start
mongo db.adminCommand drop database
mongo db_name --eval "printjson(db.dropDatabase())"
/snap/sentry/usr/lib/python2.7/multiprocessing/synchronize.py”, line 75, in __init__ sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) OSError: [Errno 13] Permission denied
vim /var/lib/snapd/apparmor/profiles/snap.sentry.sentry
add: /dev/shm/* mrwlkix,
apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.sentry.sentry
sentry cleanup --days 31
curl list ftp
curl -P - --insecure "ftp://192.168.0.100:21" --user "user:password"
iptables add if not exists
iptables -C -INPUT -s 1.1.1.1 -j ACCEPT || iptables -A -INPUT -s 1.1.1.1 -j ACCEPT