ubuntu configuration python, Red

Configure ubuntu's Mysql, python, redis and other environments###

The blogger’s ubuntu version is Ubuntu 16.04.2 and uses Alibaba cloud server, which is also available after configuration by Amazon and Tencent.

1 Configure the version of python####

Upgrade the packages in your ubuntu to the latest.

apt-get update

View current version

python -V

Switch version

python2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150

Install pip module

wget https://bootstrap.pypa.io/get-pip.py  --no-check-certificate
sudo python get-pip.py

2 Install Redis and enable remote access

Install Redis

apt-get install redis-server

Enable redis remote access

bind 0.0.0.0 #Comment out or change ip to 0.0.0.0

Configure redis authentication password to increase security is not local access after all

# requirepass foobared find this
requirepass 123456   #Remove the comment and modify the password you want

The most important one is that we need to restart our redis-server service so that its configuration can run

/etc/init.d/redis-server stop  #stop
/etc/init.d/redis-server start  #start up
/etc/init.d/redis-server restart #Reboot

3 Install mysql and enable mysql master-slave synchronization (configure Tencent Cloud's mysql server)

Install Mysql, you need to set your password during the process, and the user name is root by default

apt-get install mysql-server

To be continued

Recommended Posts

ubuntu configuration python, Red
ubuntu 18.04 early configuration
Ubuntu16 upgrade Python3
ubuntu18.04 install python2
Relearn ubuntu --python3
ubuntu12.04 install python3
Ubuntu nfs configuration
Ubuntu20.04 configuration notes
Ubuntu 14.04 configuration record
ubuntu18.04 install python
ubuntu16.04 upgrade python2
Ubuntu18.04 switch Python version
Install python3.6 under Ubuntu 16.04
Ubuntu16.04 switch python version
Python MySQLd under Ubuntu
Ubuntu configuration development environment
Ubuntu 18.04 network card configuration
Python function-Bunch configuration loading
[python] python2 and python3 under ubuntu
Ubuntu development environment configuration
Install Python3 on Ubuntu 14.04
Network configuration under Ubuntu
Python virtual environment: Ubuntu16.04
023. Ubuntu common personalized configuration
Install python in Ubuntu
Install Python3 on Ubuntu 16.04
Python3 configuration and entry.md
Install Python3.7 on Ubuntu
Ubuntu install the latest Python 3.
Install Python 3.7 on Ubuntu 18.04 LTS
ubuntu sets python2.5 environment variables
ubuntu18.04 compile and install python3.8
ubuntu view python installation path
Ubuntu16.04 installation and simple configuration
ubuntu build python development environment
Ubuntu16.04 install SVN and configuration
Ubuntu PostgreSQL installation and configuration
ubuntu offline installation python environment
Ubuntu environment variables and ADB configuration
Ubuntu 20.04 best configuration guide for engineers
Ubuntu 20.04 best configuration guide for engineers
How to write python configuration file
Ubuntu16.04 configuration OpenCV3.4.2 and basic use
How to install Python 3.8 on Ubuntu 18.04
Python Chinese encoding setting under ubuntu
Install Python virtual environment on Ubuntu 18.04
Install TensorFlow (python2.7 version) on Ubuntu
Ubuntu 19.1 installation and configuration Chinese environment
Configuration and beautification after Ubuntu installation (1)
Nginx installation and configuration load (ubuntu12.04)
Ubuntu configuration source and installation software
Install the latest Python 3.6 version on Ubuntu
Detailed tutorial on installing python3.7 for ubuntu18
Error when installing Python module on Ubuntu
Ubuntu 20.04 best configuration guide (required for newbies)
JDK environment variable configuration method under ubuntu
Ubuntu17.04 configuration method to replace domestic sources
Ubuntu install PHP and PHP Nginx configuration method
How to install Python2 on Ubuntu20.04 ubuntu/focal64
Deploy python3 and nginx projects on ubuntu18.04
Ubuntu 18.04 LTS configuration network tutorial through Netplan