2020阿里云centos8安装DirectAdmin

我买的阿里云一般是t6双核小内存的所以需要设置swap

dd if=/dev/zero of=/swapfile bs=2M count=2048
mkswap /swapfile
swapon /swapfile
/swapfile swap swap defaults 0 0
vim /etc/fstab #添加上去
/swapfile swap swap defaults 0 0

添加一个网卡设置外网ip

vi /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0:0
BOOTPROTO=none
ONPARENT=yes
IPADDR=8.8.8.8 #换自己的外网ip
NETMASK=255.255.255.0
ONBOOT=yes

重启

reboot

最笨的方法屏蔽对阿里云不友好的节点 https://files.directadmin.com/services/custombuild/servers.txt 获取节点
只留files12 这个是香港节点只有几百K但特别稳定

vi /etc/hosts
200.200.200.200 files-lt.directadmin.com files-de.directadmin.com files-fr.directadmin.com files2.directadmin.com directadmin.mirror.it2go.eu files6.directadmin.com files7.directadmin.com files8.directadmin.com files9.directadmin.com files10.directadmin.com files11.directadmin.com files13.directadmin.com files15.directadmin.com files16.directadmin.com files18.directadmin.com files19.directadmin.com files20.directadmin.com files22.directadmin.com files23.directadmin.com files24.directadmin.com files25.directadmin.com damirror.unix-solutions.be files27.directadmin.com files28.directadmin.com directadmin.mirror.liteserver.nl
#强制解析阿里云国内节点上友好点的服务器
192.169.82.155 update.directadmin.com
185.42.221.168 files.directadmin.com

开始安装


echo 1 > /root/.lan
yum install -y epel-release
yum install -y screen
screen -S idcbaike
yum -y upgrade
yum install -y wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl patch quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 db4-devel cyrus-sasl-devel perl-ExtUtils-Embed autoconf automake libtool which patch mailx bzip2-devel lsof glibc.i686 openssl098e.i686 libstdc++.i686
wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh

安装过程要看清ip和网卡是不是对

安装完后

Server Manager>IP Management>Add ip>添加内网ip

点击外网ip选择>LINK IP>选择内网ip后>取消DNS选项后>LINK

最后重启服务器

赞(0)
未经允许不得转载:IDC百科 » 2020阿里云centos8安装DirectAdmin