web server fix
This commit is contained in:
@@ -4,4 +4,8 @@ sudo systemctl stop firewalld
|
|||||||
sudo systemctl disable firewalld
|
sudo systemctl disable firewalld
|
||||||
sudo systemctl mask firewalld
|
sudo systemctl mask firewalld
|
||||||
sudo systemctl enable iptables
|
sudo systemctl enable iptables
|
||||||
sudo iptables -F
|
sudo iptables -F
|
||||||
|
|
||||||
|
function instalar() {
|
||||||
|
yum list installed "$1" &>/dev/null && echo "$1 já instalado" || sudo yum install -y "$1"
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ sudo ifconfig enp0s8 $IP_EXTERNAL netmask 255.255.255.0
|
|||||||
sudo ifconfig enp0s9 $IP_INTERNAL netmask 255.255.255.0
|
sudo ifconfig enp0s9 $IP_INTERNAL netmask 255.255.255.0
|
||||||
|
|
||||||
# instalar mod security e apache
|
# instalar mod security e apache
|
||||||
function instalar() {
|
|
||||||
yum list installed "$1" &>/dev/null && return || sudo yum install -y "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
instalar epel_release
|
instalar epel_release
|
||||||
instalar httpd
|
instalar httpd
|
||||||
instalar mod_security
|
instalar mod_security
|
||||||
|
|||||||
@@ -7,16 +7,19 @@ IP="10.60.0.2"
|
|||||||
sudo ifconfig enp0s8 $IP netmask 255.255.255.0
|
sudo ifconfig enp0s8 $IP netmask 255.255.255.0
|
||||||
sudo route add default gw 10.60.0.1
|
sudo route add default gw 10.60.0.1
|
||||||
|
|
||||||
# instalar node
|
# instalar packages
|
||||||
yum list installed nodejs &>/dev/null && echo "Node already installed..." || sudo yum install -y nodejs
|
instalar nodejs
|
||||||
|
|
||||||
# instalar juice-shop se nao existir
|
# instalar juice-shop se nao existir
|
||||||
if [[ ! -d $HOME/juice-shop ]]; then
|
jspath="/var/juice-shop"
|
||||||
|
if [[ ! -d "$jspath" ]]; then
|
||||||
|
mkdir "$jspath"
|
||||||
curl -o js.tar.gz "https://github.com/juice-shop/juice-shop/releases/download/v20.0.0/juice-shop-20.0.0_node24_linux_x64.tgz"
|
curl -o js.tar.gz "https://github.com/juice-shop/juice-shop/releases/download/v20.0.0/juice-shop-20.0.0_node24_linux_x64.tgz"
|
||||||
tar -xzvf js.tar.gz $HOME/juice-shop
|
tar -xzvf js.tar.gz "$jspath"
|
||||||
|
rm js.tar.gz
|
||||||
|
cd "$jspath"
|
||||||
|
npm i
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# correr juice shop via npm
|
# correr juice shop via npm
|
||||||
cd $HOME/juice-shop
|
|
||||||
npm install
|
|
||||||
npm start
|
npm start
|
||||||
|
|||||||
Reference in New Issue
Block a user