linux
- 切換使用者
sudo -i
- 遠端登入伺服器
然後 輸入密碼ssh root@公網ip
- 檢視目前路徑
pwd
- 删除檔案
rm 檔案名
rm -rf 檔案夾名
- 檢視目前網絡資訊
ifconfig
-
建立name的目錄mkdir name
-
複制一個檔案cp file1 file2
-
将webdata移動到/bin/usr目錄下mv webdata /bin/usr
-
是将 /usr/lib/下所有的東西移到/zone/中mv /usr/lib/* /zone
-
移動隐藏檔案mv blog-copy/.[^.]* blog
nvm
-
安裝指定版本nvm install 版本号
-
檢視所有版本nvm list
-
使用哪個版本nvm use 版本号
-
設定預設版本nvm alias default stable
阿裡雲伺服器安裝環境
-
安裝gityum install git
- 安裝nvm
git clone https://github.com/cnpm/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` 激活nvm echo ". ~/.nvm/nvm.sh" >> /etc/profile source /etc/profile nvm list-remote 列出Node.js的所有版本。 nvm install stable 安裝穩定版 nvm use install stable
- 安裝nginx
mkdir -p /usr/local/src/nginx-files cd /usr/local/src/nginx-files wget http://www.zlib.net/zlib-1.2.11.tar.gz wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz wget http://nginx.org/download/nginx-1.10.3.tar.gz 解壓到目前目錄 tar zxvf nginx-1.10.3.tar.gz tar zxvf pcre-8.40.tar.gz tar zxvf zlib-1.2.11.tar.gz tar zxvf openssl-1.1.0e.tar.gz 然後打開解壓的nginx檔案夾 cd nginx-1.10.3 yum install gcc gcc-c++ ncurses ncurses-devel bison libgcrypt perl automake autoconf libtool make 在該目錄下安裝編譯檔案 #增加系統使用者 www groupadd www useradd -r -g www www ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-poll_module --with-select_module --with-pcre=/usr/local/src/nginx-files/pcre-8.40 --with-zlib=/usr/local/src/nginx-files/zlib-1.2.11 --with-openssl=/usr/local/src/nginx-files/openssl-1.1.0e make make install 這樣基本酒操作完成了,接下來啟動nginx /usr/local/nginx/sbin/nginx