2019年6月28日 星期五

msinfo32

CentOS7 安裝 PHP7 module Beast

busybox=/usr/local/bin/busybox
wget -q https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-x86_64 -O  ${busybox}&&chmod a+x ${busybox}||exit 1

yum -y install gcc make php-devel

wget https://github.com/liexusong/php-beast/archive/master.zip
busybox unzip master.zip
cd php-beast-master
phpize
./configure
make
make install

echo "extension=beast" >/etc/php.d/20-beast.ini

CentOS 7.6 install PHP 7.3

yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y yum-utils
yum-config-manager --disable remi-php54
yum-config-manager --enable remi-php73

yum install php

Linux Capabilities - Ping

ping: socket: Operation not permitted

setcap cap_net_raw+p /bin/ping

Nginx Reverse Proxy SSL 設定

產生私鑰
openssl genrsa -des3 -out privkey.key 1024

產生 CSR
openssl req -new -key privkey.key -out ca.csr < <EOF
TW
Taiwan
Taipei
INIC
G
MIS
email


EOF

openssl rsa -in privkey.key -out privkey_nopass.key

建立自我簽署的CA
openssl x509 -req -days 365 -in ca.csr -signkey privkey_nopass.key -out ca.crt

編輯 /etc/nginx/conf.d/ssl.conf
server
  {
    listen       443 ssl;
#    server_name  aaa.com.;

     ### SSL log files ###
#     access_log /var/logs/ssl-access.log;
#     error_log /var/logs/ssl-error.log;

     ### SSL cert files ###
     ssl_certificate    ssl/ca.crt;
     ssl_certificate_key        ssl/privkey_nopass.key;

     ### Add SSL specific settings here ###
     keepalive_timeout  60;

    location /b {
        proxy_pass http://192.168.10.101/b;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
        proxy_max_temp_file_size 0;
    }
}

Proxmox import ova into VM

tar -xvf *.ova
qemu-img convert -f vmdk disk001.vmdk  -O qcow2 disk001.qcow2

qm importdisk targetvmid  disk001.vmdk   local -format qcow2
qm importdisk targetvmid  disk001.qcow2 local -format qcow2