This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show laradoc PUID (process UID in docker) / Linux UID | |
awk -F\: '{print "Group " $1 " with GID=" $3}' /etc/group | grep laradock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LC_parameter=$(curl $2) ssh -o SendEnv=LC_parameter $1@jh bash << 'END' | |
ssh es bnw reg $LC_parameter | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# where is node_exporter bin by its port (9100) | |
sudo fuser 9100/tcp | |
#Sample outputs: | |
#9100/tcp: 4966 | |
sudo ls -l /proc/4966/exe | |
#Sample outputs: | |
#lrwxrwxrwx 1 ubuntu ubuntu 0 Apr 13 13:27 /proc/4966/exe -> /usr/local/bin/node_exporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo groupadd --system prometheus | |
sudo useradd -s /sbin/nologin --system -g prometheus prometheus | |
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz | |
tar zxvf node_exporter-0.18.1.linux-amd64.tar.gz | |
sudo cp node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/node_exporter | |
sudo nano /etc/systemd/system/node_exporter.service | |
==================================== isi node_exporter.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/phalcon/cphalcon | |
cd cphalcon/build | |
git checkout origin/3.4.x | |
sudo ./install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find storage/ -type d -exec chmod 775 {} \; | |
find storage/ -type f -exec chmod 664 {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just change in Tar.php line 639 | |
$v_att_list = & func_get_args(); | |
to | |
$v_att_list = func_get_args(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install php7.2-redis | |
# force install | |
sudo pecl install -f redis-4.3.0 | |
# show current version | |
php --ri redis | |
# sometime an error appear | |
# PHP Fatal error: Cannot use result of built-in function in write context in /usr/share/php/Archive/Tar.php on line 639 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref https://ayesh.me/Ubuntu-PHP-7.2 | |
# remove existing phalcon repo | |
curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash | |
rm -rf /etc/apt/sources.list.d/phalcon* | |
sudo apt-get update | |
# add ondrejphp repo | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -H -u syarif bash -c 'ssh-keygen' |