- 购买云服务器
- 购买弹性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 可能需要升级版本
未完待续