-
Notifications
You must be signed in to change notification settings - Fork 138
/
centos_install.sh
executable file
·58 lines (56 loc) · 2.06 KB
/
centos_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
until sudo yum -y update
do
sleep 1
done
until sudo yum -y upgrade
do
sleep 1
done
until sudo yum install -y epel-release
do
sleep 1
done
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
until sudo yum groupinstall -y development
do
sleep 1
done
until sudo yum install -y gcc-c++ python3 python3-devel ImageMagick ffmpeg Xvfb dbus-x11 libcgroup libcgroup-tools traceroute tcpdump psmisc python-devel
do
sleep 1
done
sudo dbus-uuidgen --ensure
python3 -m pip install --upgrade --user pip
until python3 -m pip install --user -r .github/workflows/requirements.txt
do
sleep 1
done
curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash -
until sudo yum -y install nodejs
do
sleep 1
done
sudo npm install -g lighthouse
sudo npm update -g
echo "[google-chrome]" | sudo tee /etc/yum.repos.d/google-chrome.repo
echo "name=google-chrome" | sudo tee -a /etc/yum.repos.d/google-chrome.repo
echo "baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64" | sudo tee -a /etc/yum.repos.d/google-chrome.repo
echo "enabled=1" | sudo tee -a /etc/yum.repos.d/google-chrome.repo
echo "gpgcheck=1" | sudo tee -a /etc/yum.repos.d/google-chrome.repo
echo "gpgkey=https://www.webpagetest.org/keys/google/linux_signing_key.pub" | sudo tee -a /etc/yum.repos.d/google-chrome.repo
until sudo yum -y install google-chrome-stable google-chrome-beta google-chrome-unstable firefox
do
sleep 1
done
echo '# Limits increased for wptagent' | sudo tee -a /etc/security/limits.conf
echo '* soft nofile 250000' | sudo tee -a /etc/security/limits.conf
echo '* hard nofile 300000' | sudo tee -a /etc/security/limits.conf
echo '# wptagent end' | sudo tee -a /etc/security/limits.conf
echo 'net.ipv4.tcp_syn_retries = 4' | sudo tee -a /etc/sysctl.d/50-wptagent.conf
sudo fc-cache -f -v
sudo sysctl -p
echo 'Reboot is recommended before starting testing'
# Running command used to test
# python3 wptagent.py -vvvv --xvfb --dockerized --testurl www.google.com