Misskey install and retired list.md

This commit is contained in:
Sophia Atkinson 2022-11-05 18:43:45 -07:00
parent a1aa63526a
commit d8c78934d4
3 changed files with 78 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# This has been retired. Please refer to the README.md for scripts.
_______________________________________________________________________
## Update & Upgrade

59
scripts/misskeyinstall.sh Normal file
View File

@ -0,0 +1,59 @@
#!/bin/bash
while true
do
read -r -p "Would you like to install Misskey? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
NODE_LTS= "18.12.1"
PASSWD_GEN=$(openssl rand -base64 10)
sudo apt update && apt upgrade -y
sudo apt install postgresql postgresql-contrib -y
sudo systemctl start postgresql.service
sudo apt install npm -y
sudo apt install redis-server -y
sudo apt install ffmpeg -y
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install node
nvm install v$NODE_LTS
nvm use v$NODE_LTS
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
sudo -i -u postgres
psql
CREATE USER misskey WITH PASSWORD '$PASSWD_GEN';
CREATE DATABASE misskey;
GRANT ALL PRIVILEGES ON DATABASE misskey to misskey;
ALTER DATABASE misskey OWNER TO misskey;
\q
exit
adduser --disabled-password --disabled-login misskey
su - misskey
git clone -b master https://github.com/misskey-dev/misskey.git
git checkout master
yarn
cp .config/example.yml .config/default.yml
sed -e "s|user: example-misskey-user = ''user: = 'misskey'|" >> .config/default.yml
sed -e "s|user: example-misskey-pass = ''user: = '$PASSWD_GEN'|" >> .config/default.yml
NODE_ENV=production yarn build
yarn run init
exit
sudo wget -O /etc/systemd/system/misskey.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/misskey.service
sudo systemctl daemon-reload
sudo systemctl enable misskey.service
sudo systemctl start misskey.service

17
systemd/misskey.service Normal file
View File

@ -0,0 +1,17 @@
[Unit]
Description=Misskey daemon
[Service]
Type=simple
User=misskey
ExecStart=npm start
WorkingDirectory=/home/misskey/misskey
Environment="NODE_ENV=production"
TimeoutSec=60
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=misskey
Restart=always
[Install]
WantedBy=multi-user.target