admin 发表于 2023-3-2 19:25:52

阿里云Linux系统ECS云服务器安装从初始环境到完成配置全过程

<h2><strong>一、首先挂载数据盘</strong></h2>
<p><strong>阿里云ECS云服务器Linux系统格式化和挂载数据盘 <ahref="http://www.wangchao.info/216.html">http://www.wangchao.info/216.html</a></strong></p>
<h2><strong>二、使用putty登陆系统后,把系统内核升级到最新</strong></h2>
<p>yum update</p>
<h2><strong>三、删除不需要的软件包</strong></h2>
<p>yum remove Deployment_Guide-en-US finger cups-libs cups bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utils nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtools syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-tools ypbind</p>
<h2><strong>四、删除不怎么安全的软件包</strong></h2>
<p>yum remove telnet rsh ftp rcp</p>
<h2><strong>五、配置防火墙</strong></h2>
<p>1、清除已经有的iptables规则:</p>
<p>iptables -F</p>
<p>iptables -X</p>
<p>iptables -Z</p>
<p>2、开放指定端口:</p>
<p>(需要在防火墙里面留下你修改的SSH登陆端口:修改第4行,把22修改为你更换的端口)</p>
<p>iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT</p>
<p>iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT</p>
<p>iptables -A OUTPUT -j ACCEPT</p>
<p>iptables -A INPUT -p tcp –dport 22 -j ACCEPT</p>
<p>iptables -A INPUT -p tcp –dport 80 -j ACCEPT</p>
<p>iptables -A INPUT -p tcp –dport 21 -j ACCEPT</p>
<p>iptables -A INPUT -p tcp –dport 20 -j ACCEPT</p>
<p>iptables -A INPUT -j REJECT</p>
<p>iptables -A FORWARD -j REJECT</p>
<p>3、保存防火墙规则</p>
<p>service iptables save</p>
<h2><strong>六、安装LNMP环境</strong></h2>
<p>使用ECS云服务器大多数是用于放网站的,这就需要安装网站运行环境,一般主流网站程序都是PHP语言的,这里推荐LNMP一键安装包,非常稳定!</p>
<p><strong>LNMP官方图文教程:<ahref="https://lnmp.org/install.html">https://lnmp.org/install.html</a></strong></p>
<p>&nbsp;</p>
                                        <p class="post-copyright">未经允许不得转载:<ahref="https://www.wangchao.info/">王超博客</a> &raquo; <ahref="https://www.wangchao.info/223.html">阿里云Linux系统ECS云服务器安装从初始环境到完成配置全过程</a></p>
页: [1]
查看完整版本: 阿里云Linux系统ECS云服务器安装从初始环境到完成配置全过程