Server Migration Memo

Source: Internet
Author: User
Tags php server frps
Digitalocean's gift quota was exhausted, and then the IP was also wall. So he returned to the bosom of vultr. This article we will share with you the server Migration Memo tutorial, hope to help everyone.

Basic settings

Create user

    1. AddUser
      The home directory, System shell version is automatically specified for the created user, and the user password is entered when it is created.

    2. Useradd
      The above basic settings need to be specified using the parameter option, and if no parameters are used, the user created has no password, no home directory, and no shell version specified.

To add an ordinary user to the sudo group, you typically use two methods:

    1. Modify the/etc/sudoers file

      ...            # User Privilege Specification      root all= (all:all) All # Allow members of the            group sudo to execute any command      %SU Do all= (All:all) All//Add your own username ...            
    1. Execute command add user to sudo

Usermod-a-G sudo ' username '//note change to your own username

Change root password

passwd User Name

File Remote Copy

Tar-czvf/tmp/etc.tar.gz/etc <== after packaging, compress tar-xzvf/tmp/etc.tar.gz with gzip

Password-Free Login

Ssh-copy-id-i ~/.ssh/id_rsa.pub Remote-host

Package Installation

Mysql

MySQL Add user

CREATE USER ' wtser ' @ ' localhost ' identified by ' password '; GRANT all privileges on *. * to ' wtser ' @ ' localhost ';

Dump data

Mysqldump-u User-ppassword databaseName > Sqlfilename

Revocer data

CREATE DATABASE menagerie;mysql>  ' use database_name; ' mysql>  ' source path/to/file.sql; '

Shadowsocks

Chacha20

    1. Compile and install Libsodium:

      Apt-get Update      apt-get install build-essential      wget https://download.libsodium.org/libsodium/releases/ LATEST.tar.gz      tar-zxf LATEST.tar.gz      cd libsodium-1.0.3      ./configure && make && make Install
    1. To repair a dynamic link library:

Edit /etc/ld.so.conf The file, add a row /usr/local/lib and save. Run commandldconfig

Nodejs

You can manually compile the installation yourself, but it is a bit slow, it is recommended to install with Nodesource

Nginx (for Plex seafile etc ... )

Pm2

Ghost Blog

Creating timed Tasks and daemons

Crontab timed Task (Certbot-renew,rss spider)

Systemed Daemon (ss, Frp,hubot)

    # SYSTEMD Unit File Example FRP    [unit]    DESCRIPTION=FRP    after=network.target        [Service]    type= Simple        WORKINGDIRECTORY=/HOME/WTSER/SERVICE/FRP    user=wtser    execstart=/home/wtser/service/frp/frps- C/home/wtser/service/frp/frps.ini    execstop=    restart=always        [Install]    wantedby= Multi-user.target    ~

Digitalocean's gift quota was exhausted, and then the IP was also wall. So he returned to the bosom of vultr.

Related recommendations:

The most comprehensive PHP server performance optimization configuration scheme

Introduction to Master-slave configuration in MySQL server

How JavaScript operates server control code examples

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.