- 購買雲服務器
- 購買彈性ip,彈性ip就是公網ip
- 配置安全組入站規則,ping通ip
-
更換yum源,
- mv /etc/yum.repos.d/CentOS.repo /etc/yum.repos.d/CentOS.repo_bak
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/rep...
- 更新 yum makecache yum -y update
出現Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"
,安全組配置出站規則
-
安裝nginx
- yum install gcc-c++
- yum install -y pcre-devel
- yum install -y zlib-devel
- yum install -y openssl openssl-devel
- wget -c https://nginx.org/download/ng...
- tar -zxvf nginx-1.15.12.tar.gz
- cd nginx-1.15.12
- 使用默認配置 ./configure
- make
- make install
- 查看安裝目錄 whereis nginx
- cd /usr/local/nginx/sbin
- 啓動 /usr/local/nginx, 瀏覽器能夠正常訪問nginx頁面
- 查詢nginx進場 ps aux|grep nginx
- 其他命令
./nginx -s stop
./nginx -s quit
./nginx -s reload
- 開機啓動: vim /etc/rc.local, 增加/usr/local/nginx/sbin/nginx
- 設置執行權限 chmod 755 rc.local
- reboot 後應該能正常打開頁面
出現the HTTP rewrite module requires the PCRE library
, yum -y install pcre-devel
出現the HTTP gzip module requires the zlib library
, yum install -y zlib-devel
-
安裝node
- wget https://npm.taobao.org/mirror...
- tar xvf node-v10.13.0.tar.gz
- cd ./node-v10.13.0
- ./configure
- make, make install
- node -v 顯示版本,安裝完畢
make耗時較長
-
安裝mysql
- 檢查是否已經安裝 rpm -qa | grep mysql
- wget -i -c http://dev.mysql.com/get/mysq...
- rpm -ivh mysql57-community-release-el7-10.noarch.rpm
- yum -y install mysql-community-server
-
安裝pip
- yum -y install epel-release
- yum -y install python-pip
- yum clean all
- pip -V 正常顯示
- pip install --upgrade pip 可能需要升級版本
未完待續