DA过期 Directadmin License has expired

Centos5 老古董上的 Directadmin 还在服役,登录控制面板提示: License has expired 检查License并未过期,原因是TLSv1.1与TLSv1.2无法在Centos5上正常工作,导致 Directadmin 无法正常更新License
  1. [root@hostname scripts]# ./getLicense.sh $client_id $license_id
  2. --2020-03-06 01:50:58--  https://www.directadmin.com/cgi-bin/licenseupdate?lid=$license_id&uid=$client_id
  3. Resolving www.directadmin.com... 216.144.255.179
  4. Connecting to www.directadmin.com|216.144.255.179|:443... connected.
  5. Unable to establish SSL connection.
  6. Error downloading the license file
  7. Error determining IP via myip.directadmin.com
  8. Trying license relay server...
  9. --2020-03-06 01:50:59--  https://license.directadmin.com/licenseupdate.php?lid=$license_id&uid=$client_id
  10. Resolving license.directadmin.com... 69.162.69.58, 185.42.221.168
  11. Connecting to license.directadmin.com|69.162.69.58|:443... connected.
  12. Unable to establish SSL connection.
  13. Error downloading the license file from relay server as well.
  14. Error determining IP via myip.directadmin.com
登录服务器
  1. echo 1 > /root/.insecure_download && chattr +i /root/.insecure_download ; cd /usr/local/directadmin/scripts && ./getLicense.sh $client_id $license_id && service directadmin restart || killall -TERM directadmin ; service directadmin start

U盘安装Centos6.x无法引导的解决办法

U盘引导开机,卡在这一步:Press enter key to begin installation process
打开U盘里syslinux\syslinux.cfg
把default vesamenu.c32这一行删除
新增一行
default linux timeout 3 label linux kernel vmlinuz append initrd=initrd.img

Centos yum开启repo

  1. yum --enablerepo=epel
  2. Error getting repository data for epel, repository not found
  3.  
  4. rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  5. Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  6. warning: /var/tmp/rpm-xfer.YIVKhh: Header V3 DSA signature: NOKEY, key ID 217521f6
  7. Preparing...                ########################################### [100%]
  8.    1:epel-release           ########################################### [100%]

update 2014-8-11

  1. #64位 Centos7.x
  2. rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

update:

  1. #32位 Centos5.x
  2. [root@localhost ~]#  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm 
  3. Retrieving http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  4. warning: /var/tmp/rpm-xfer.yXjRRn: Header V3 DSA signature: NOKEY, key ID 217521f6
  5. Preparing...                ########################################### [100%]
  6.    1:epel-release           ########################################### [100%]
  7.  
  8. #64位
  9. [root@localhost ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  10. Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  11. warning: /var/tmp/rpm-tmp.3lY8ZZ: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
  12. Preparing...                ########################################### [100%]
  13.    1:epel-release           ########################################### [100%]
  1. #2013年8月27 更新
  2. #RPMForget 32位 Centos5.x
  3. rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm
  4. #
  5. #RPMForget 64位 Centos5.x
  6. rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
  7. #
  8. #RPMForget 32位 Centos6.x
  9. rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
  10. #
  11. #RPMForget 64位 Centos6.x
  12. rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

Centos5 yum安装apache mysql php 开设虚拟主机等配置

yum安装apache+mysql+php,需要修改一些配置文件
由于长期使用webmin、Directadmin、Cpanel等linux下的控制面板,安装配置等都是一条龙服务
在小型vps上性能是关键,不额外安装其他没用的组件模块等等,手工搭建LAMP的时候却发现曾经熟悉的东西又都忘光了。
博客记录一下,方便以后的使用。

主要在于小细节备忘,例如:
apache虚拟主机的配置
禁止apache目录列表形式
开启htaccess的rewrite功能
/etc/hosts 的修改
apache防止域名恶意解析

  1. yum install -y httpd.i386 mysql-server php.i386 php-mysql.i386
  2. # 1. apache的配置文件,yum安装后默认路径为/etc/httpd/conf/httpd.conf
  3. # 2. 以下配置为虚拟主机模式:
  4. NameVirtualHost * #这行不能少,否则ServerName无法正确识别
  5.  
  6. # 3. 把未绑定的域名指向下面的目录(防止恶意指向)
  7. <VirtualHost *>
  8. DocumentRoot /var/www/html/404/
  9. ServerName *
  10. </VirtualHost>
  11.  
  12. <VirtualHost *>
  13. DocumentRoot /var/www/html/baiqiuyi.com/ #主路径
  14. ServerName baiqiuyi.com #主域名
  15. ServerAlias     www.baiqiuyi.com #需绑定的域名
  16.  
  17. <Directory /var/www/html/baiqiuyi.com/>
  18. Options FollowSymLinks #禁止以列表形式展开目录 (去掉Indexes)
  19. AllowOverride all #除了正确的加载rewrite的模块以外,AllowOverride的值不能为None,否则htaccess的规则将无法生效
  20.     Order allow,deny
  21.     Allow from all
  22. </Directory>
  23. </VirtualHost>
  24.  
  25. # 最后, /etc/hosts 文件里加上域名

centos配置vpn 基于pptpd

centos上配置vpn并指定出口IP

  1. 添加centos的源
  2. /etc/yum.repos.d/CentOS-Base.repo 
  3.  
  4. [doylenet]
  5. name=Doylenet custom repository for CentOS
  6. baseurl=http://files.doylenet.net/linux/yum/centos/5/i386/doylenet/
  7. gpgcheck=1
  8. gpgkey=http://files.doylenet.net/linux/yum/centos/RPM-GPG-KEY-rdoyle
  9. enabled=1
  10.  
  11. yum install ppp pptpd.i386 -y
  12.  
  13. echo 1 > /proc/sys/net/ipv4/ip_forward 
  14. sysctl -p
  15.  
  16. 修改 /etc/pptpd.conf
  17. 注释掉logwtmp
  18. 并添加IP范围
  19. localip 10.0.0.1
  20. remoteip 10.0.0.2-254
  21.  
  22. 修改 /etc/ppp/options.pptpd
  23. 添加DNS
  24. ms-dns 8.8.8.8
  25. ms-dns 8.8.4.4
  26.  
  27. 添加用户名密码
  28. /etc/ppp/chap-secrets 
  29.  
  30. iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j SNAT --to-source YourIPs
  31. iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE #或者轮询
3 123»