共计 1259 个字符,预计需要花费 4 分钟才能阅读完成。
- 购买云服务器
- 购买弹性 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 可能需要升级版本
未完待续
正文完