Utitlities- script and doc -- to setup xrdp, cuda libraries or other development tools on server
The adduser command creates a new user, plus a group and home directory for that user.
sudo adduser newuser
You can replace newuser with any username you wish. The system will add the new user; then prompt you to enter a password. Enter a great secure password, then retype it to confirm.
To add user to sudo group, you can run command:
sudo usermod -aG sudo newuser
Replace newuser with the username that you entered previously.
To install miniconda and Python, run below command. You can change base python version if required.
# Download the Miniconda installer script from the Anaconda repository
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sudo chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3
echo 'export PATH=$PATH:/opt/miniconda3/bin' >> ~/.bashrc
source ~/.bashrc
conda init bash
source ~/.bashrc
conda
or if you want to install miniconda in user home directory, you can run below command
CONDA_AUTO_UPDATE_CONDA=false && PATH=~/miniconda/bin:$PATH && curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh && chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p ~/miniconda && rm ~/miniconda.sh && conda install -y python==3.8.1
To install conda, run commands.
sudo apt-get update
wget https://repo.anaconda.com/archive/Anaconda3-2023.07-1-Linux-x86_64.sh
sudo chmod +x Anaconda3-2023.07-1-Linux-x86_64.sh
./Anaconda3-2023.07-1-Linux-x86_64.shh
source ~/.bashrc
conda info
- Option to enable docker compose Ubuntu 18:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test"
sudo apt update -y
sudo apt install -y docker-ce
To use compose command now you can run
docker compose
- Old way -- dash inside command i.e. docker-compose Docker compose mannual installation on ubuntu 18 e2enetwork cloud server.
mkdir -p /usr/local/lib/docker/cli-plugins
sudo curl -SL https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
i. Open bashrc file by running command $ sudo nano /etc/bash.bashrc
ii. Append cuda library path
export PATH="/usr/local/cuda-11.8/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH"
iii. Reload bashrc by running source /etc/bash.bashrc
iv. Run nvcc --version
command
On ubuntu system you can run command:
sudo iptables -A INPUT -p tcp --dport xxxxx -j ACCEPT
Example to open 8010 port you can run:
sudo iptables -A INPUT -p tcp --dport 8010 -j ACCEPT
-
Downlaod
setup_xrdp.bash
on server and allow execution permission.wget https://raw.githubusercontent.com/Nivratti/server_setup_utilities/main/setup_remote_desktop.sh sudo chmod +x setup_remote_desktop.sh
-
Setup xrdp by running command.
./setup_remote_desktop.sh
Install tweak tools: to fix folder icon not showing issue in Ubuntu 18 on e2enetwork server.
sudo add-apt-repository universe
sudo apt install gnome-tweaks
Run tweak tools and change appearance setting to humanity.
gnome-tweaks
To install chrome, run below commands from user account instead of root.
sudo apt-get install -y fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb