入手一台ECS 2核4G 3年1650-安装软件笔记
root 登陆
蕾丝边命令 哈哈
# lsb_release -a
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core
傻瓜安装
○ yum安装jdk
# yum -y list java*
# yum -y install java-1.8.0-openjdk*
# whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz
○ openresty
依赖 安装
luajit2.1-beta3
# wget http://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz
# tar -xvf LuaJIT-2.1.0-beta3.tar.gz
# cd LuaJIT-2.1.0-beta3
# make
# sudo make install
==== Successfully installed LuaJIT 2.1.0-beta3 to /usr/local ====
Note: the development releases deliberately do NOT install a symlink for luajit
You can do this now by running this command (with sudo):
ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit
提示我们 需要建立软链接
# ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit
查看版本
# luajit -v
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/
源码安装openresty
# wget https://openresty.org/download/openresty-1.13.6.1.tar.gz
# tar -xvf openresty-1.13.6.1.tar.gz
# cd openresty-1.13.6.1
# ./configure --prefix=/opt/openresty --with-luajit
##需要先创建/opt/openresty目录
如果报错如下:
./configure: error: the HTTP rewrite module requires the PCRE library.
尝试安装
#yum -y install pcre-devel
错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
解决办法:
# yum -y install openssl openssl-devel
我们可以指定各种选项,比如
./configure --prefix=/opt/openresty \
--with-luajit \
--without-http_redis2_module \
--with-http_iconv_module \
--with-http_postgres_module
具体用法参考./configure–help 或者官方文档
gmake
gmake install
环境变量配置
# echo "export PATH=$PATH:/opt/openresty/nginx/sbin/" >>/etc/profile && source /etc/profile
启动并加载配置文件
# nginx -c /opt/openresty/nginx/conf/nginx.conf
# nginx -t
查看并开启防火墙,以及开放80
# systemctl status firewalld
# systemctl start firewalld
# firewall-cmd --add-port=80/tcp --permanent
用root用户执行下面3个命令:
允许http服务通告防火墙
1 #firewall-cmd --add-service=http
在永久配置中 添加http服务
2 #firewall-cmd --permanent --add-service=http
在不改变状态的条件下重新加载防火墙
3 #firewall-cmd --reload
○ mariadb安装
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构