Last active
December 11, 2018 04:03
-
-
Save tutysara/0bb92a8aac71be725eda18cf196c9511 to your computer and use it in GitHub Desktop.
install_edx.sh
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
apt-get update | |
apt-get install -y apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
eog \ | |
git \ | |
htop \ | |
mosh \ | |
nodejs \ | |
npm \ | |
python-software-properties \ | |
software-properties-common \ | |
tmux \ | |
telnet \ | |
unzip \ | |
vim \ | |
wget \ | |
x11-apps \ | |
xsel \ | |
xpra | |
locale-gen en_US en_US.UTF-8 | |
dpkg-reconfigure locales | |
apt-get update -y | |
apt-get upgrade -y | |
# sshd config | |
sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config && \ | |
sed -i s/.*ChallengeResponseAuthentication.*/ChallengeResponseAuthentication\ no/ /etc/ssh/sshd_config && \ | |
# sed -i s/.*PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_config && \ | |
sed -i s/.*UsePAM.*/UsePAM\ no/ /etc/ssh/sshd_config | |
# add user | |
useradd -m -s /bin/bash tutysara | |
usermod -aG sudo tutysara | |
cp -r ~/.ssh ~tutysara/ | |
chown tutysara:tutysara ~tutysara/.ssh | |
chown tutysara:tutysara ~tutysara/.ssh/* | |
### user config | |
su - tutysara | |
cp /etc/skel/.bashrc ~/.bashrc | |
git config --global user.email "tutysara@gmail.com" | |
git config --global user.name "tutysara" | |
### config ssh | |
chmod 700 /home/tutysara | |
chmod 700 /home/tutysara/.ssh/ | |
chmod 600 /home/tutysara/.ssh/authorized_keys | |
### config tmux | |
echo "set -g mouse on" >> ~/.tmux.conf | |
# Clean up APT when done. | |
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
reboot | |
#then, after your server comes back .... | |
## login as user | |
cd ~ | |
wget https://raw.githubusercontent.com/lpm0073/edx.scripts/master/edx.platform-install.sh | |
chmod 755 edx.platform-install.sh | |
sudo nohup ./edx.platform-install.sh & | |
# check progress | |
# /edx/bin/supervisorctl status | |
# htop | |
#sudo | |
sudo -Hu edxapp bash | |
cp /edx/app/edxapp/lms.auth.json /edx/app/edxapp/lms.auth.json.orig | |
cp /edx/app/edxapp/cms.auth.json /edx/app/edxapp/cms.auth.json.orig | |
cp /edx/app/edxapp/lms.env.json /edx/app/edxapp/lms.env.json.orig | |
cp /edx/app/edxapp/cms.env.json /edx/app/edxapp/cms.env.json.orig | |
vi /edx/app/edxapp/lms.auth.json | |
vi /edx/app/edxapp/cms.auth.json | |
vi /edx/app/edxapp/lms.env.json | |
vi /edx/app/edxapp/cms.env.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment