Skip to content

Instantly share code, notes, and snippets.

View DevSecOpsGuy's full-sized avatar
🏦
Working from home

Showeb Arif Siddiquie DevSecOpsGuy

🏦
Working from home
View GitHub Profile
@DevSecOpsGuy
DevSecOpsGuy / ruby.sh
Last active October 6, 2019 19:27
Ruby on Ubuntu 18.04 LTS
sudo apt update && sudo apt upgrade -y
cd ~/Downloads/
sudo wget https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.zip
sudo apt-get install unzip -y &&
sudo unzip ruby-2.5.3.zip -d ~/Downloads/
cd ruby-2.5.3 && sudo ./configure && sudo make && sudo make install
ruby --version
@DevSecOpsGuy
DevSecOpsGuy / vi
Created October 6, 2019 19:29 — forked from IngmarBoddington/vi
vi shortcuts
COMMAND MODE
i = Enter insert mode
o = Insert after current line (enter insert mode)
O = Insert before current line (enter insert mode)
a = Append after current character (enter insert mode)
A = Append at end of line (enter inset mode)
u = undo
@DevSecOpsGuy
DevSecOpsGuy / redis.sh
Created October 6, 2019 19:56
Redis on Ubuntu 18.04
sudo apt update && sudo apt upgrade -y
sudo apt-get install redis-server -y
sudo vi /etc/redis/redis.conf
:setnu
make line
559 maxmemory 256
and
590 maxmemory-policy allkeys-lru
:wq
@DevSecOpsGuy
DevSecOpsGuy / rabbitmq.sh
Created October 6, 2019 20:19
RabbitMQ Server on Ubuntu 18.04
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install rabbitmq-server
sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server
sudo systemctl status rabbitmq-server
sudo rabbitmqctl add_user admin "your_password"
sudo rabbitmqctl set_user_tags admin administrator
@DevSecOpsGuy
DevSecOpsGuy / sublime.sh
Created October 7, 2019 15:27
Sublime Text 3
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo add-apt-repository "deb https://download.sublimetext.com/ apt/stable/"
sudo apt update
sudo apt install sublime-text
@DevSecOpsGuy
DevSecOpsGuy / wordpress.sh
Last active October 7, 2019 20:02
WordPress into LAMP stack server on Ubuntu 18.04
mysql -u root -p
CREATE DATABASE wordpressdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT:
sudo nano /etc/apache2/sites-available/wordpress.conf
<Directory /var/www/wordpress/>
AllowOverride All
@DevSecOpsGuy
DevSecOpsGuy / ftp.sh
Created October 8, 2019 18:08
FTP server on Ubuntu 18.04 LTS
sudo apt update
sudo apt install vsftpd
sudo cp -v /etc/vsftpd.conf /etc/vsftpd.conf.bk
sudo nano /etc/vsftpd.conf
Uncomment below lines.
write_enable=YES
local_umask=022
chroot_local_user=YES
@DevSecOpsGuy
DevSecOpsGuy / samba.sh
Last active October 9, 2019 15:26
Samba Server(SMB/CIFS) on Ubuntu 18.04 LTS
sudo apt update
sudo apt install samba
sudo systemctl status nmbd
sudo ufw allow 'Samba'
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
@DevSecOpsGuy
DevSecOpsGuy / ssh.sh
Last active October 15, 2019 13:40
Enable SSH in Ubuntu 18.04 LTS
sudo apt-get install openssh-server
sudo service ssh status
sudo nano /etc/ssh/sshd_config
set PermitRootLogin yes
set PasswordAuthentication yes
set PermitEmptyPasswords yes
@DevSecOpsGuy
DevSecOpsGuy / rocketchat.sh
Last active October 15, 2019 14:15
Rocket.Chat
sudo useradd -m -U -r -d /opt/rocket rocket
sudo usermod -a -G rocket www-data
sudo chmod 750 /opt/rocket
su - rocket
sudo passwd rocket
su - rocket
curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz
tar -xzf /tmp/rocket.chat.tgz -C /tmp
cd /temp
cd Rocket.Chat/programs/server