HCIE 实验

    server {
        listen       80;
        server_name  01.sooele.com;
        listen 443;


        ssl on;

        ssl_certificate /root/sooele.com.crt;#你的文件位置

        ssl_certificate_key /root/sooele.com.key;#你的文件位置

        ssl_session_timeout 5m;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置

        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置

        ssl_prefer_server_ciphers on;
        #charset koi8-r;

        #access_log  logs/yourcrm.access.log  main;

        location / {
            root   //etc/nginx/conf.d/01.sooele.com;
            index  index.html index.html;
        }

        error_page  404              /404.html;

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /var/sites/yourcrm;
        }

        location ~ \.php$ {
            root           /var/sites/yourcrm;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html/$fastcgi_script_name;
            include        fastcgi_params;
        }
        
    }
SFS挂载:
mount -t nfs -overs=3,timeo=600,nolock,rsize=1048576,wsize=
mount -t nfs -overs=3,timeo=600,nolock,rsize=1048576,wsize=
echo -e "192.168.0.22:/ /video nfs vers=3,timeo=600,nolock,
echo -e "192.168.0.217:/ /video nfs vers=3,timeo=600,nolock

192.168.0.217:/ /video nfs vers=3,timeo=600,nolock,rsize=10



EVS:硬盘挂载
fdiks /**/**  格式化
mkfs.ext4 /dev/***   
mount /dev/vdb /opt
mount | grep opt
mount /dev/vdb1 /opt
echo -e "/dev/vdb1\t/opt\text4\tdefaults\t1 1" >>/etc/fstab
wget https://hcie-lab-2020.obs.cn-north-4.myhuaweicloud.com/mysql-community-release-el7-5.noarch.rpm



CHANGE MASTER TO MASTER_HOST='172.16.0.89', MASTER_USER='copy',MASTER_PASSWORD='sooele0000', MASTER_LOG_FILE='mysql-bin.000004',


CHANGE MASTER TO MASTER_HOST='步骤 17 中 ECS-DB01 的内网 ip', MASTER_USER='copy',MASTER_PASSWORD='sooele0000', MASTER_LOG_FILE='




CREATE TABLE IF NOT EXISTS `users` (`id` INT UNSIGNED AUTO_INCREMENT, `firstname`VARCHAR(100) NOT NULL, `lastname` VARCHAR(100) 


CHANGE MASTER TO MASTER_HOST='172.16.0.43', MASTER_USER='copy',MASTER_PASSWORD='[email protected]', MASTER_LOG_FILE='mysql-bin.000001',


create user 'copy'@'172.17.%' identified by '[email protected]';

GRANT ALL PRIVILEGES ON . TO ‘copy’@’%’ IDENTIFIED BY ‘123456’

grant replication slave on *.* to 'copy'@'%' identified by '[email protected]';

create user 'root'@'%' identified by '123456';
grant replication slave on *.* to 'root'@'%' identified by '123456';


wget https://hcie-lab-2020.obs.cn-north-4.myhuaweicloud.com/Mycat-server-1.6-RELEASE20161028204710-linux.tar.g

PHP网页输出mycat(mysql)

<html> 
<body> 
 
<?php 
echo "<table style='border: solid 1px black;'>";  echo "<tr><th>Id</th><th>Firstname</th><th>Lastname</th></tr>"; 
 
class TableRows extends RecursiveIteratorIterator {     function __construct($it) {         parent::__construct($it, self::LEAVES_ONLY);     } 
 
    function current() {         return "<td style='width: 150px; border: 1px solid black;'>" . parent::current(). "</td>";     } 
 
    function beginChildren() {         echo "<tr>"; 
    } 
 
    function endChildren() {         echo "</tr>" . "\n"; 
    } 
} 
 
$servername = "172.16.0.165"; 
$username = "root"; 
$password = "[email protected]!"; 
$dbname = "copydb"; 
$dbport = 3310; 
 
try { 
    $conn = new PDO("mysql:host=$servername;port=$dbport;dbname=$dbname", $username, $password); 
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 
    $stmt = $conn->prepare("SELECT id, firstname, lastname FROM users"); 
    $stmt->execute(); 
 
    // set the resulting array to associative 
    $result = $stmt->setFetchMode(PDO::FETCH_ASSOC); 
 
    foreach(new TableRows(new RecursiveArrayIterator($stmt->fetchAll())) as $k=>$v) {         echo $v; 
    } 
} 
catch(PDOException $e) { 
    echo "Error: " . $e->getMessage(); 
} 
$conn = null; echo "</table>"; 
?> 
 
</body> 
</html> 
APPLICATION_ID: Demo-for-microservice
service_description:
  name: provider # 微服务名称,同应用下的不同微服务需要有不同的名称
  version: 0.0.1 # 微服务版本号
cse:
  service: # 服务中心信息,其中 address 为服务中心地址
    registry:
      address: https://cse.cn-north-4.myhuaweicloud.com
      instance:
        watch: false # 使用 pull 模式连接服务中心
  config: # 配置中心信息,其中 address 为配置中心地址
    client:
      serverUri: https://cse.cn-north-4.myhuaweicloud.com
      refreshMode: 1
      refresh_interval: 5000
  monitor: # 只有从本地接入云上 CSE 时需要配置 monitor 地址,云上集群部署时可以通过服务发现接入 monitor
    client:
      serverUri: https://cse.cn-north-4.myhuaweicloud.com
  rest:
    address: 0.0.0.0:8080 # 微服务端口,请确保该端口号无冲突

  credentials: #本地连接华为云时需要配置 AK/SK,如果是在云上 ServiceStage 部署则不需要。直接删掉 credentials 配置即可
    accessKey:     # 请填写 AK
    secretKey:      # 请填写 SK
    project: cn-north-4

akskCustomCipher: default # 这里的值与 sc/cc/monitor 的地址相对应,如果配置的是域名, CSEJavaSDK 可以自动截取出 project

发表评论