{"id":19456,"date":"2017-03-10T06:28:04","date_gmt":"2017-03-09T22:28:04","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/10\/proxmox-centos-7-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a\/"},"modified":"2017-03-10T06:28:04","modified_gmt":"2017-03-09T22:28:04","slug":"proxmox-centos-7-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/10\/proxmox-centos-7-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a\/","title":{"rendered":"Proxmox &#8211; CentOS 7 LXC \u521d\u59cb\u74b0\u5883\u8a2d\u5b9a"},"content":{"rendered":"<p>1. \u5b89\u88dd OpenSSH Server <br \/># <span style=\"color: #ff0000;\">yum install openssh-server<\/span> <\/p>\n<p>\u8a2d\u5b9a\u958b\u6a5f\u6642\u555f\u52d5 OpenSSH Server <br \/># <span style=\"color: #ff0000;\">systemctl enable sshd.service<\/span> <\/p>\n<p>\u555f\u52d5 OpenSSH Server <br \/># <span style=\"color: #ff0000;\">systemctl start sshd.service<\/span>[@more@]2. \u4fee\u6539\u5957\u4ef6\u66f4\u65b0\u4f86\u6e90 <br \/># <span style=\"color: #ff0000;\">cp \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.$(date +%F)<\/span> <\/p>\n<p>\u5c07 mirrorlist\u00a0\u90a3\u4e00\u884c\u7684\u524d\u9762\u52a0\u4e0a #\u00a0\u8a3b\u89e3 <br \/>\u00a0# <span style=\"color: #ff0000;\">sed -i &#8216;s,mirrorlist=http:\/\/mirrorlist.centos.org,#mirrorlist=http:\/\/mirrorlist.centos.org,&#8217; \/etc\/yum.repos.d\/CentOS-Base.repo<\/span> <br \/>\u628a #baseurl\u00a0\u524d\u9762\u7684 #\u00a0\u53bb\u9664 <br \/># <span style=\"color: #ff0000;\">sed -i &#8216;s,#baseurl=http:\/\/mirror.centos.org,baseurl=http:\/\/mirror.centos.org,&#8217; \/etc\/yum.repos.d\/CentOS-Base.repo<\/span> <br \/>\u5c07 <span style=\"color: #0000ff;\">http:\/\/mirror.centos.org\/centos\/<\/span>\u00a0\u66ff\u63db\u6210 <span style=\"color: #ff0000;\">ftp:\/\/140.111.74.109\/CentOS\/<\/span> <br \/># <span style=\"color: #ff0000;\">sed -i &#8216;s,http:\/\/mirror.centos.org\/centos\/,ftp:\/\/140.111.74.109\/CentOS\/,&#8217; \/etc\/yum.repos.d\/CentOS-Base.repo<\/span> <br \/>\u5b89\u88dd EPEL \u5957\u4ef6\u5eab <br \/># <span style=\"color: #ff0000;\">yum install epel-release<\/span> <br \/>\u53bb\u9664\u820a\u7684 yum cache <br \/># <span style=\"color: #ff0000;\">yum clean all<\/span> <br \/>\u958b\u59cb\u9032\u884c\u66f4\u65b0 <br \/># <span style=\"color: #ff0000;\">yum update<\/span><\/p>\n<p>3.\u88dc\u8db3\u7f3a\u5c11\u7684\u5957\u4ef6 <br \/># <span style=\"color: #ff0000;\">yum install which vim nano yum-utils net-tools bind-utils mlocate zip unzip wget iptables-services ntpdate <\/span><span style=\"color: #ff0000;\">net-snmp net-snmp-utils bzip2 lsof less<br \/><\/span><span style=\"color: #ff0000;\"><span style=\"color: #000000;\">#<\/span> <span style=\"color: #ff0000;\">yum install <\/span>fail2ban ssmtp logwatch cronie <br \/> <\/span> <br \/># <span style=\"color: #ff0000;\">systemctl enable fail2ban.service<\/span><br \/># <span style=\"color: #ff0000;\">systemctl start fail2ban.service<\/span><\/p>\n<p>4. \u8a2d\u5b9a\u6642\u5340\u53ca\u9810\u8a2d\u7de8\u8f2f\u5668 <br \/># <span style=\"color: #ff0000;\">tail -2 \/etc\/profile<\/span> <br \/><span style=\"color: #0000ff;\">export EDITOR=&#8221;\/usr\/bin\/vim&#8221;<\/span> <br \/><span style=\"color: #0000ff;\">export TZ=&#8221;Asia\/Taipei&#8221;<\/span><\/p>\n<p>5. \u5b89\u88dd LAMP<br \/># <span style=\"color: #ff0000;\">yum install httpd mariadb mariadb-server php php-mysql php-gd php-pear php-xml php-xmlrpc php-mbstring php-soap<\/span><br \/>php-bcmath php-dba php-embedded php-enchant php-fpm php-intl php-mysqlnd php-odbc php-pspell php-recode php-soap php-xmlrpc rrdtool-php uuid-php php-pecl-memcache<\/p>\n<p>6. \u8a2d\u5b9a\u958b\u6a5f\u6642\u555f\u52d5<br \/># <span style=\"color: #ff0000;\">systemctl enable httpd.service<\/span><br \/># <span style=\"color: #ff0000;\">systemctl enable mariadb.service<\/span><br \/># <span style=\"color: #ff0000;\">systemctl start httpd.service<\/span><br \/>#<span style=\"color: #ff0000;\"> systemctl start mariadb.service<\/span><\/p>\n<p>7. \u8a2d\u5b9a MariaDB SQL Server<br \/># <span style=\"color: #ff0000;\">\/usr\/bin\/mysql_secure_installation<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5b89\u88dd OpenSSH Server # yum install openssh-server \u8a2d\u5b9a\u958b\u6a5f\u6642 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/10\/proxmox-centos-7-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Proxmox &#8211; CentOS 7 LXC \u521d\u59cb\u74b0\u5883\u8a2d\u5b9a\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,191],"tags":[],"class_list":["post-19456","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-104943"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["685322"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19456"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19456"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19456\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}