unix optimization azure vps swap file

***********
choose B1S for free usage during 12 month.
src: https://azure.microsoft.com/en-us/free/free-account-faq/
750 hours of Azure B1S General Purpose Virtual Machines for Linux 12 months
disk: ssd premium
the problem is disk IO max limit. 16.9 MB/s
solvation: increase swap. by the way - it's completely disabled by default!
sudo dd if=/dev/zero of=/swapspace bs=1M count=2000
sudo mkswap /swapspace
sudo swapon /swapspace
watch -n 1 cat /proc/swaps
grep SwapTotal /proc/meminfo

src:
https://askubuntu.com/questions/566745/allocate-swap-after-ubuntu-14-04-lts-installation
https://bogdancornianu.com/change-swap-size-in-ubuntu/
https://www.tecmint.com/commands-to-monitor-swap-space-usage-in-linux/


clear: apt autoclean xbcnbnm от headers

after it can be installed firefox: sudo apt-get install firefox

before continue: sudo apt-get update
CAUTIONS: !!!!!!!!!RDP: firefox freeze in a ~10 minutes and cause os to stuck.

*********** RDP:
src: https://www.youtube.com/watch?v=YMeprVU0yIw

step 2.a replace with: sudo apt-get install gnome-session-flashback
echo "gnome-session --session=gnome-flashback-metacity --disable-acceleration-check & gnome-panel" > ~/.xsession
src: http://c-nergy.be/blog/?p=10043


1) Install the XRDP Remote Desktop Server software
    a. sudo apt-get install xrdp 

2) Pick Your Favorite Desktop Environment to Install or Install All

    a) Install the Gnome Desktop
       sudo apt-get install gnome-session-fallback
       echo "gnome-session --session=gnome-fallback" > ~/.xsession

    b) Install Lubuntu Desktop
       sudo apt-get install lubuntu-desktop
       echo "lxsession -s Lubuntu -e LXDE" > ~/.xsession

    c) Install the KDE Desktop
       sudo apt-get install kde-workspace-data
       sudo apt-get install kde-full
       sudo apt-get install kde-desktop
       sudo apt-get install kde-standard
       sudo apt-get install kde-plasma-desktop
       echo "startkde"  [greater than] ~/.xsession

    d) Install Xubuntu Desktop or Xfce4
       sudo apt-get install xubuntu-desktop
       sudo apt-get install xfce4
       echo "xfce4-session" > ~/.xsession

4) Reset the xserver
    a. sudo /etc/init.d/xrdp restart

*********** ftp:
useradd -m -d /PATH/TO/FOLDER USERNAME
sudo passwd ftpuser

src: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Step_by_Step_Guide/s1-starting-create-account.html
sudo apt-get install vsftpd


/etc/vsftpd4.conf
listen_ipv6=NO

/etc/init.d/vsftpd restart


*********** zsh:

sudo apt-get install zsh
chsh -s $(which zsh)
echo $SHELL
$SHELL --version
src: https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH


sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
src: https://github.com/robbyrussell/oh-my-zsh

node:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
src: https://github.com/creationix/nvm#install-script

*********** mysql:
Install and setup mysql to connect from anywhere remotely
DOES NOT WORK WITH mysql_secure_installation! (https://dev.mysql.com/doc/refman/5.5/en/mysql-secure-installation.html)
On Ubuntu, Install mysql using:
sudo apt-get install mysql-server
Have just the below in /etc/mysql/my.cnf
[mysqld]
#### Unix socket settings (making localhost work)
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock

#### TCP Socket settings (making all remote logins work)
port            = 3306
bind-address = 0.0.0.0
Login into DB from server using
mysql -u root -p

Create DB user using the below statement
% it's wildcard in mysql.
grant all privileges on *.* to ‘username’@‘%’ identified by ‘password’;
Open firewall:
sudo ufw allow 3306
Restart mysql

sudo service mysql restart

add root password and allow network conenctions:
update user set authentication_string=PASSWORD("1234") where User='root';
update user set Host='%' where User='root';

src: https://stackoverflow.com/a/44664662/2910338
https://help.ubuntu.com/community/MysqlPasswordReset

************* java
java install: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04
if JAVA_HOME =.../bin/ then:
echo "export JAVA_HOME=$($JAVA_HOME)../" >> ~/.zshrc
sudo apt-get install maven
----------------

Комментарии

Популярные сообщения из этого блога

kafka конспект однако

Дэвид Рок: Ваш мозг на работе - Разговоры в Гугле

Отслеживание Процесса загрузки с PHP и JavaScript