標籤: lxc

Install server on LXC-ProxmoxVE

在 proxmox VE 安裝一個虛擬機(以centOS為例) update:2019/10/17

  1. 先升級 yum , 之後我們將用 yum 來安裝所有的套件
    yum -y update
  2. 安裝 nano 編輯器
    yum -y install nano
  3. 安裝net-tools (ifconfig,netstat,traceroute)
    yum -y install net-tools
    yum -y install traceroute
  4. 如果是在proxmos ve 內要裝pppoe, /etc/pve/lxc 內的 *.conf 加入 (還有 lxc 必須設定為 privileged)
    lxc.cgroup.devices.allow: c 108:0 rwm
    lxc.mount.entry = /dev/ppp dev/ppp none bind,optional,create=file
  5. 安裝 rp-pppoe (如果要架設server,建議安裝這個透過這個取得真實ip)
    yum -y install rp-pppoe
    pppoe-setup 設定
    adsl-start
  6. 安裝lamp
    yum -y install httpd mod_ssl openssl mariadb-server
    yum -y install epel-release
    yum -y install yum-utils
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
    yum-config-manager –enable remi-php73
    yum install -y php php-mysqlnd php-pdo php-xml php-pear php-devel php-mbstring re2c gcc-c++ gcc
    systemctl enable httpd
    systemctl start httpd
    systemctl enable mariadb
    systemctl start mariadb
  7. 接著馬上更改 mariadb的密碼
    mysql
    USE mysql;
    UPDATE user SET Password=password(‘your-new-password’) WHERE User=’root’;
  8. 安裝ssh sshd
    yum -y install openssh openssh-server
    systemctl start sshd
    systemctl enable sshd
  9. 安裝常用工具 wget lynx
    yum -y install wget
    yum -y install lynx
  10. 安裝ftpd
    yum -y install pure-ftpd
    systemctl enable pure-ftpd
    systemctl start pure-ftpd