RHEL 6.5----CDN(lumanger)
RHEL 6.5----CDN(lumanger)
主机名 | IP | 服务 |
master | 192.168.30.130 | CDN(LuManager) |
slave | 192.168.30.131 | DNS |
软件安装包下载地址及安装方法
http://www.zijidelu.org/thread-47148-1-1.html
安装
master上安装LuMangaer
[[email protected] ~]# mkdir /zijidelu [[email protected] ~]# cd /zijidelu/ [[email protected] zijidelu]# wget http://down.zijidelu.org/zijidelu_install.tar.gz [[email protected] zijidelu]# wget http://down.zijidelu.org/LuNamp_last.tar.gz [[email protected] zijidelu]# wget http://down.zijidelu.org/LuManager_last.tar.gz [[email protected] zijidelu]# ll -h total 182M -rw-r--r-- 1 root root 2.1M Dec 2 2015 LuManager_last.tar.gz -rw-r--r-- 1 root root 180M Apr 9 2014 LuNamp_last.tar.gz -rw-r--r-- 1 root root 39K Dec 5 2015 zijidelu_install.tar.gz [[email protected] zijidelu]# tar -xf zijidelu_install.tar.gz [[email protected] zijidelu]# cd zijidelu_install [[email protected] zijidelu_install]# mv ../Lu* . #将LuManager.tar.gz和LuNamp_last.tar.gz移动到zijidelu_install目录下 [[email protected] zijidelu_install]# ls common.inc.sh i.sh lun_install_config.sh zijidelu_install.sh config.inc.sh LuManager_last.tar.gz sh zijidelu_update.sh gogogo LuNamp_last.tar.gz update.sh [[email protected] zijidelu_install]# ./i.sh -y # This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + [2] USA download mirror + [1] China telecom download mirror + [0] Cancel. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 请选择一个下载点,然后回车! Please select a download mirror and press enter! 1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + [2] Install LuManager 2.1.2 + [1] Install LuManager 1.1.10 + [0] Cancel. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 请输入您的选择,然后回车! Please choosing your option and press enter! 2 useradd: warning: the home directory already exists. Not copying any file from skel directory into it. useradd: warning: the home directory already exists. Not copying any file from skel directory into it. useradd: warning: the home directory already exists. Not copying any file from skel directory into it. useradd: warning: the home directory already exists. Not copying any file from skel directory into it. useradd: warning: the home directory already exists. Not copying any file from skel directory into it. useradd: warning: the home directory already exists. Not copying any file from skel directory into it. 要使用rpm包来安装LuNamp吗(安装速度更快)?[Y/n] Do you want use RPM package to install LuNamp(faster)? [Y/n] Y --2018-05-24 15:20:21-- http://down.zijidelu.org/rpms/lun2.7/LuNamp_last.x86_64.reh6.rpm Resolving down.zijidelu.org... 115.29.195.102 Connecting to down.zijidelu.org|115.29.195.102|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 165173928 (158M) [application/x-redhat-package-manager] Saving to: “LuNamp_last.x86_64.reh6.rpm” 修复完成! LuManager was repaired successfully! 24 May 15:45:47 ntpdate[51286]: the NTP socket is in use, exiting pg_ctl: another server might be running; trying to start server anyway server starting PgSQL 启动成功! PgSQL was started successfully. Apache_LuManager 启动成功! Apache_LuManager was started successfully. PgSQL 已经在运行状态! PgSQL is already running! 180524 15:45:51 mysqld_safe Logging to '/home/mysql_data/master.err'. 180524 15:45:51 mysqld_safe Starting mysqld daemon with databases from /home/mysql_data MySQL 启动成功! MySQL was started successfully. The pid file: /var/run/lu_mysqld.pid 1 Starting php_fpm done Nginx和php-cgi 启动成功! Nginx and php-cgi ware started successfully. Pure-ftpd 启动成功! Pure-ftpd was started successfully. Apache_LuManager 已经在运行状态! Apache_LuManager is already running! PgSQL 已经在运行状态! PgSQL is already running! Starting test LuNamp status ........................ LuManager in good condition. PgSQL in good condition. Nginx in good condition. Apache in good condition. MySQL in good condition. Pure-ftpd in good condition. Thank you for choosing LuNamp and LuManager! [Website support: zijidelu.org] LuManager安装完成,谢谢您的使用! LuManager was successfully installed, Thank you for choose it! 请使用http://IP:8888或http://domain:8888访问后台管理系统(IP就是您的服务器IP,domain即是指向该IP的域名)。 Please use "http://your ip:8888" or "http://your domain:8888" and login LuManager to manager your system! 为保证所有程序都能正常使用,需重启系统,立即重启吗?[Y/n] In order to LuManager normal operation, You must reboot the system, reboot now?[Y/n]
Y
Broadcast message from [email protected]
(/dev/pts/0) at 15:52 ...
The system is going down for reboot NOW!
You have mail in /var/spool/mail/root
slave上安装DNS
[[email protected] ~]# yum install -y bind bind-chroot bind-utils [[email protected] ~]# service named start Generating /etc/rndc.key: [ OK ] Starting named: [ OK ] [[email protected] ~]# vim /var/named/chroot/etc/named.conf ........... options { listen-on port 53 { any; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; recursion yes; # dnssec-enable yes; # dnssec-validation yes; # dnssec-lookaside auto; ...........只需修改这些 [[email protected] ~]# vim /var/named/chroot/etc/named.rfc1912.zones .........末尾添加 zone "sishen.cn" IN { type master; file "sishen.zone"; allow-update { none; }; }; # 创建sishen.zone文件 [[email protected] ~]# cd /var/named/chroot/var/named/ [[email protected] named]# cp -p named.localhost sishen.zone [[email protected] named]# vim sishen.zone $TTL 1D @ IN SOA dns.sishen.cn root.sishen.cn. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS dns.sishen.cn. dns A 192.168.30.131 source A 192.168.30.131 wwww A 192.168.30.130 修改完成后重启named服务 [[email protected] ~]# service named restart Stopping named: . [ OK ] Starting named: [ OK ]
在slave安装httpd
[[email protected] ~]# yum install -y httpd [[email protected] ~]# cp -r /etc/pa* /var/www/html/ #创建测试文件 [[email protected] ~]# vim /etc/httpd/conf.d/welcome.conf # # This configuration file enables the default "Welcome" # page if there is no default index page present for # the root URL. To disable the Welcome page, comment # out all the lines below. # #<LocationMatch "^/+$"> # Options -Indexes # ErrorDocument 403 /error/noindex.html #</LocationMatch> 重启httpd服务 [[email protected] ~]# service httpd restart Stopping httpd: [FAILED] Starting httpd: [ OK ]
配置CDN
启动LuManager [[email protected] ~]# lu-start 24 May 16:19:34 ntpdate[3953]: the NTP socket is in use, exiting PgSQL 已经在运行状态! PgSQL is already running! Apache_LuManager 启动成功! Apache_LuManager was started successfully. PgSQL 已经在运行状态! PgSQL is already running! MySQL 已经在运行状态! MySQL is already running! Starting php_fpm done Nginx和php-cgi 启动成功! Nginx and php-cgi ware started successfully. Pure-ftpd 启动成功! Pure-ftpd was started successfully. Apache_LuManager 已经在运行状态! Apache_LuManager is already running! PgSQL 已经在运行状态! PgSQL is already running! Starting test LuNamp status ........................ LuManager in good condition. PgSQL in good condition. Nginx in good condition. Apache in good condition. MySQL in good condition. Pure-ftpd in good condition. Thank you for choosing LuNamp and LuManager! [Website support: zijidelu.org]
win客户端打开浏览器输入192.168.30.131:8888
首先添加一个ftp空间,这是一个bug,否则没办法进行下一步。
如上如所示,如果帐户名使用的是ftp作为用户名,就会抛出错误。
添加完FPT空间后,添加网站
配置完成后,会发现CDN服务器上一些文件的变化
[[email protected] ~]# cat /etc/hosts #lum_proxy_store start 192.168.30.131 source.sishen.cn #lum_proxy_store end #lum_local_domains start 127.0.0.1 ::1 localhost.localdomain localhost 1.lum www.sishen.cn #lum_local_domains end 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.30.130 master
修改nameserver使其指向192.168.30.131
[[email protected] ~]# vim /etc/resolv.conf # Generated by NetworkManager #nameserver 119.29.29.29 nameserver 192.168.30.131
win7客户端测试
如果想更改管理员密码则