Projekt

Allgemein

Profil

Setup erpnext14 » Historie » Revision 2

Revision 1 (Jeremias Keihsler, 26.08.2022 15:02) → Revision 2/4 (David Ayers, 11.10.2022 15:47)

h1. Setup erpnext14 

 this is taken from David's bash-history ... needs some tidy up :-) 

 <pre><code class="shell"> 
 # less /etc/ssh/sshd_config 
 sudo apt install Ubuntu Server etckeeper  
 sudo git config --global --edit 
 # German sudoedit /etc/hosts 
 # German no dead keys emacs 
 # Ubuntu Server sudoedit /etc/hosts 
 # enp1s0: sudo apt install emacs-nox 
 # <static net>/<net> export EDITOR=emacs 
 # <static IP> emacs 
 # <static gateway> #sudo apt install irqbalance locate screen emacs-nox aptitude apticron fail2ban rkhunter chkrootkit logwatch htop atop strace nmap mtr-tiny arp-scan arping ufw 
 # <dns IP 1>,<dns IP 2>,<dns IP 3> sudo aptitude search ufs 
 # -with LVM full disk sudo aptitude search ufw 
 # <hostname> sudo apt show ufw 
 # frappe <SecretPassword> sudoedit /etc/inputrc  
 exit 
 # Install openssh server sudo less /var/log/mail.log  
 sudo tail -f /var/log/mail.log  
 man generic 
 # Retrieve SSH key from Launchpad exit 
 # Do not allow password 

 sudo apt update 
 sudo apt full-upgrade  
 sudo apt search ufw 
 # unattended-upgrades.service 

 sudoedit /etc/hosts man apt 
 # add line 
 # <static IP>     <hostname.domain> 

 sudo apt install etckeeper list ufw 
 sudo git config --global --edit apt irqbalance locate screen aptitude apticron fail2ban rkhunter chkrootkit logwatch htop atop strace nmap mtr-tiny arp-scan arping 
 # name = root 
 # email = <hostname.domain> 

 # my personal prefrences 
 sudo apt install emacs-nox list irqbalance locate screen aptitude apticron fail2ban rkhunter chkrootkit logwatch htop atop strace nmap mtr-tiny arp-scan arping 
 export EDITOR=emacs 

 sudoedit /etc/inputrc 
 # "\e[5~": history-search-backward 
 # "\e[6~": history-search-forward 

 # setup core services 
 sudo apt install locate aptitude apticron fail2ban rkhunter chkrootkit 
 logwatch atop nmap arp-scan arping  
 sudoedit /etc/postfix/main.cf 
 # Postfix als Satellitensystem einrichten export EDITOR=emacs 
 # <hostname>.<domain> sudoedit /etc/postfix/main.cf 
 # <smtp-relay>.<domain> 

 mail -s "test" ayers@intars.at < /etc/hostname 
 sudoedit /etc/aliases 
 #root:           noc@domain man aliases  
 sudo newaliases  
 man aliases  
 man postalias  
 mail -s "test" root < /etc/hostname 
 #alert:          alert@domain cat /etc/aliases 
 sudoedit /etc/aliases 
 sudo newaliases 

  
 man virtual  
 sudoedit /etc/postfix/main.cf 
 sudoedit /etc/mailname  
 mail -s "test" root < /etc/hostname 
 sudo su 
 exit 
 cat /etc/postfix/generic 
 #root@<hostname>.<domain>           noc@domain sudo ls postconf /etc/postfix/generic 
 #frappe@<hostname>.<domain>         noc@domain 

 sudoedit sudo postconf -m 
 cat /etc/postfix/main.cf 
 # smtp_generic_maps = hash:/etc/postfix/generic 

 sudo postmap /etc/postfix/generic 


 sudo apt install backup-manager 
 # /var/archives mail -s "atler" alert 
 # /etc /home/frappe /usr/local /var/backups 

 sudoedit /etc/ssh/sshd_config /etc/aliases 
 #PermitRootLogin prohibit-password 


 sudoedit /etc/rkhunter.conf /etc/postfix/generic 
 # MAIL-ON-WARNING=alert ls 
 # ALLOW_SSH_ROOT_USER=prohibit-password sudo newaliases  
 sudo postmap /etc/postfix/generic 
 # SCRIPTWHITELIST=/usr/bin/lwp-request mail -s "atler" alert 
 # ALLOWHIDDENDIR=/etc/.git mail -s "atler" alert < /etc/hostname  
 less /etc/postfix/main.cf 
 # ALLOWHIDDENFILE=/etc/.gitignore sudo apt install backup-manager 
 # ALLOWHIDDENFILE=/etc/.etckeeper sudoedit /etc/rkhunter.conf 
 export EDITOR=emacs 
 sudoedit /etc/rkhunter.conf 
 sudo rkhunter --propupd 
 sudo rkhunter --check --sk 



 # ERPnext 
 sudo ufw allow 22,25,143,80,443,3306,3022,8000/tcp grep -iA 1 warn /var/log/rkhunter.log 
 sudoedit /etc/rkhunter.conf 
 sudoedit /etc/ssh/sshd_config 
 sudo ufw enable 

 grep -iA 1 warn /var/log/rkhunter.log 
 sudoedit /etc/rkhunter.conf 
 sudoedit /etc/ssh/sshd_config 
 screen 
 sudo apt install python3-minimal build-essential python3-setuptools 
 sudo ufw allow 22,25,143,80,443,3306,3022,8000/tcp 
 sudo ufw enable 
 sudo apt install git python3-dev python3.10-dev python3-setuptools python3- 
 pip python3-pip python3-distutils redis-server 
 sudo apt install python3.10-venv 
 sudo apt update 

  
 sudo apt install xvfb libfontconfig wkhtmltopdf 

 
 sudo passwd root 

 sudo apt install mariadb-server mariadb-client libfontconfig wkhtmltopdf 
 sudo mysql_secure_installation 
 # pwd 
 # Switch to unix_socket authentication: Y 
 # Change the root password? [Y/n] y 
 # password: pwd 
 # Remove anonymous users? [Y/n] y 
 # Disallow root login remotely? [Y/n] y 
 # Remove test database and access to it? [Y/n] y 

 # Reload privilege tables now? [Y/n] y 

 mysql -u root -p 
 ALTER USER root@localhost IDENTIFIED VIA mysql_native_password; 
 SET PASSWORD = PASSWORD(‘pwd’); 
 FLUSH PRIVILEGES; 
 quit 
 rm .mysql_history 

 sudoedit /etc/mysql/conf.d/erpnext.cnf 
 #[mysqld] 
 #character-set-client-handshake = FALSE 
 #character-set-server = utf8mb4 
 #collation-server = utf8mb4_unicode_ci 

 #[mysql] 
 #default-character-set = utf8mb4 

 sudo reboot 

 wget https://deb.nodesource.com/setup_16.x 
 less setup_16.x 
 # Wow... add someones key to be trusted by system apt to install nodejs :-/ not cool but lets just get done. libfontconfig 
 chmod +x setup_16.x 
 sudo -E setup_16.x 
 sudo apt install nodejs 

 cd 
 tee -a ~/.bashrc<<EOF 
 PATH=$PATH:~/.local/bin/ 
 EOF 
 source ~/.bashrc 

 sudo mkdir /home/bench 
 sudo chown -R frappe /home/bench 
 cd /home/bench 
 sudo npm install -g yarn 

 pip3 install frappe-bench 
 bench init frappe --verbose --frappe-branch v14.4.3 # 
 https://github.com/frappe/frappe/tags 
 cd frappe 


 bench start 


 xvfb  
 </code></pre>