Comments

Latest Posts

Oracle Cloud Platform (OCP) Tips and Tricks

 Some special notes while using Oracle Cloud Platform (OCP).


Enable Password Login

vi /etc/ssh/sshd_config

PermitRootLogin yes  #allow root login
PasswordAuthentication yes #allow password authentication


CentOS 7 Install BBR

BBR stands for Bottleneck Bandwidth and RTT is a congestion control system. You can enable TCP BBR on your Linux desktop to improve overall web surfing experience. By default, Linux uses the Reno and CUBIC congestion control algorithm.


1. switch to root
2. Rebuild grub2.cfg,Command:
grub2-mkconfig -o /boot/grub2/grub.cfg
3. Run your bbr.sh


1. wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

Notes:  https://github.com/chiakge/Linux-NetSpeed


If it is Oracle VPS, following command need to execute first: grub2-mkconfig -o /boot/grub2/grub.cfg

wget --no-check-certificate -O /opt/bbr.sh https://github.com/teddysun/across/raw/master/bbr.sh && chmod 755 /opt/bbr.sh && /opt/bbr.sh


If it is GcoreLabs  VPS and stopped at [Info] rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

You will need to changebbr.sh script. Replace  www.elrepo.orgwithwc.ci. Total, there are four places to replace.

You can download those four files then put in somewhere else. 

https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
https://www.elrepo.org/elrepo-release-6-10.el6.elrepo.noarch.rpm
https://www.elrepo.org/elrepo-release-7.0-5.el7.elrepo.noarch.rpm
https://www.elrepo.org/elrepo-release-8.2-1.el8.elrepo.noarch.rpm

Verify

Runlsmod | grep bbr

If it shows tcp_bbr that means it was enabled successfully. 



Ubuntu 20.04 Install BBR


Requirements:

  • BBR requires Linux kernel version 4.9 or above. Since Ubuntu 20.04 comes with the 5.4.0 kernel, we can enable BBR right away.

Run the following command to check available congestion control algorithms,

sysctl net.ipv4.tcp_available_congestion_control

Output:

[email protected]:~# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = reno cubic

Run the below command to check the current congestion control algorithm used in your system,

sysctl net.ipv4.tcp_congestion_control

Output:

[email protected]:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = cubic


Enabling TCP BBR in Ubuntu

Open the following configuration file vi /etc/sysctl.conf to enable enable TCP BBR.

vi /etc/sysctl.conf

At the end of the config file, add the following lines.

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

Save the file, and refresh your configuration by using this command,

sysctl -p

Output:

[email protected]:~# sysctl -p
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Now, Verify if BBR is enabled in your system,

sysctl net.ipv4.tcp_congestion_control

Output:

[email protected]:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr

Done!



VNC Connection


1ssh log in   (I am using centos as root ,main folder is /root/ but following command is fine with any folder)
2、Generate auto login key. command ssh-keygen <Enter> If using password, it will be fine, but less secure.
3cat .ssh/id_rsa.pub,  Copy content of id_rsa.pub to oracle console。
4、copy VNC Parameters(linux/mac)and write to myvnc.sh (command:ssh -o ProxyCommand='ssh -W %h:%p -p 443 [email protected]' -N -L localhost:5900:XXXXXX:5900 XXXXXX
5ifconfig to check local IP 10.0.3.5 Change 'myvnc.sh   -N -L localhost:5900'. localhost change to 10.0.3.5:9988 (Note:If you have public IP,(not from NAT)use 0.0.0.0 ,Aliyun,tencent Yun all using NAT,So it has to listen on localhost IP)。
6、run sh myvnc.sh ,you might need to enter yes ,and password for your key
7、Open local firewall 9988 port.
8、From local computer: vnc view <cloud public IP>:9988 to connect

notes: https://luotianyi.vc/4199.html

DD Oracle Cloud VM

Notes: Only Ubuntu works in Oracle Cloud.
Ubuntu Environment Preparation:
#Debian/Ubuntu:
apt-get update
apt-get install -y xz-utils openssl gawk file

Download script and install image from one of moeclub.org's sharing post:
Sudo -i
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'https://api.moeclub.org/GoogleDrive/1NHKdm3xfQ3HySNCGvrzgdz7RMVCI1qGy'


After one or two minutes, you will lose your SSH connection. Please give the machine 5-10 minutes, before you manual reboot your Ubuntu VM. During reboot, the VM status will become stopping.
The VM will maintain this stopping status for 20-25 minutes, then it will become Running status.

At that time, all imaging process, system rebooting process will be completed. You will be able to RDP to this VM's public ip with port 3389. Please make sure you have add RDP port 3389 into your Network Security Groups.
Default RDP account for this Windows 7 64B image at https://api.moeclub.org/GoogleDrive/1NHKdm3xfQ3HySNCGvrzgdz7RMVCI1qGy :

username : administrator
password : www.nat.ee

After log in, please change password asap. It is best also change 3389 port to others.

The system is Chinese Windows 7 64B Ultimate version. You will need to activate it by yourself. 

The default system after installed,  memory usage will be around 366MB, and CPU usage will be less than 1%. 


Notes:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a -firmware
default root password: MoeClub.org




No comments