Skip to content

Instantly share code, notes, and snippets.

@alanchavezgar
Created November 7, 2023 19:40
Show Gist options
  • Save alanchavezgar/43fcd585a2e04881f7e2bf482a2a9e28 to your computer and use it in GitHub Desktop.
Save alanchavezgar/43fcd585a2e04881f7e2bf482a2a9e28 to your computer and use it in GitHub Desktop.

Autor: Carlos Fuentes

add certificate

sudo wget -q -O /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT \
  http://swksvr_FQDN/pub/RHN-ORG-TRUSTED-SSL-CERT
sudo rhnreg_ks --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT \
  --serverUrl=https://swksvr_FQDN/XMLRPC --activationkey=activation_key
sudo yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin

install dependencies

sudo yum install gcc-c++

install git

sudo yum install git

install zsh

sudo yum install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.zshrc
echo "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
source ~/.zshrc
brew update
brew install gcc

install rbenv

brew install rbenv ruby-build
brew reinstall libyaml
export LC_ALL=en_US.UTF-8 
echo 'export LC_ALL=en_US.UTF-8' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL -l
source ~/.zshrc

mysql

wget https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-7.noarch.rpm 
sudo yum install -y mysql-community-server
sudo systemctl enable mysqld
sudo systemctl start mysqld
sudo grep 'password' /var/log/mysqld.log
sudo mysql_secure_installation
mysql -uroot -p
sudo yum install mysql-devel
CREATE USER 'user'@'localhost' IDENTIFIED BY '123456!';
GRANT ALL PRIVILEGES ON *.* TO 'carlos'@'localhost' WITH GRANT OPTION;

aws cli

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install  
./aws/install -i /usr/local/aws-cli -b /usr/local/bin 
sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
sudo chmod -R 755 /usr/local/aws-cli
aws --version
aws configure

update sqlite

wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz
tar xzvf sqlite-autoconf-3290000.tar.gz
cd sqlite-autoconf-3290000
./configure --prefix=/opt/sqlite/sqlite3
make
sudo make install
/opt/sqlite/sqlite3/bin/sqlite3 --version
gem uninstall sqlite3
gem install sqlite3 -- --with-sqlite3-include=/opt/sqlite/sqlite3/include \ --with-sqlite3-lib=/opt/sqlite/sqlite3/lib

git

ssh-keygen -t rsa -b 4096 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_rsa
vim ~/.ssh/config 
  Host github.com
    Hostname ssh.github.com
    Port 443
git clone [email protected]:regalii/nbg-api.git

install mongoDB

install-mongodb-community-edition

https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-red-hat/

sudo nano /etc/yum.repos.d/mongodb-org-7.0.repo
[mongodb-org-7.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/7.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc
sudo yum install -y mongodb-org
sudo systemctl start mongod
sudo systemctl status mongod 
sudo systemctl enable mongod

open ports

sudo firewall-cmd --zone=public --permanent --add-port 3000/tcp
sudo firewall-cmd --zone=public --permanent --add-port 3001/tcp
sudo firewall-cmd --zone=public --permanent --add-port 5000/tcp
sudo firewall-cmd --reload

copy files from devcloud to local

scp -r -P 2222 [email protected]:/home/dc-user/proyects/nbg-catalogs/coverage coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment