{"id":19457,"date":"2017-03-11T06:53:05","date_gmt":"2017-03-10T22:53:05","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/11\/proxmox-ununtu-16-04-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a\/"},"modified":"2017-03-11T06:53:05","modified_gmt":"2017-03-10T22:53:05","slug":"proxmox-ununtu-16-04-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\/11\/proxmox-ununtu-16-04-lxc-%e5%88%9d%e5%a7%8b%e7%92%b0%e5%a2%83%e8%a8%ad%e5%ae%9a\/","title":{"rendered":"Proxmox &#8211; Ununtu 16.04 LXC \u521d\u59cb\u74b0\u5883\u8a2d\u5b9a"},"content":{"rendered":"<p>1. \u5c07\u66f4\u65b0\u7684 Server \u90fd\u6307\u5411\u570b\u5bb6\u9ad8\u901f\u7db2\u8def\u4e2d\u5fc3 <br \/>$ <span style=\"color: #ff0000;\">sudo cp \/etc\/apt\/sources.list \/etc\/apt\/sources.list.$(date +%F)<\/span> <br \/>$ <span style=\"color: #ff0000;\">sudo sed -i &#8216;s\/archive.ubuntu.com\/free.nchc.org.tw\/g&#8217; \/etc\/apt\/sources.list<\/span> <br \/><span style=\"color: #ff0000;\"><\/span>\u00a0 <br \/>\u6e05\u9664\u6240\u6709\u7684 <br \/>$ <span style=\"color: #ff0000;\">sudo apt-get clean all<\/span> <br \/>\u66f4\u65b0\u5957\u4ef6\u5eab <br \/>$ <span style=\"color: #ff0000;\">sudo apt-get update[@more@]<\/span>2. \u9032\u884c\u66f4\u5957\u66f4\u65b0 <br \/>$ <span style=\"color: #ff0000;\">sudo apt-get upgrade<\/span> <\/p>\n<p>3. \u88dc\u8db3\u7f3a\u5c11\u7684\u5957\u4ef6 <br \/>$ <span style=\"color: #ff0000;\">sudo apt-get install vim zip unzip mailutils ntpdate<\/span> <\/p>\n<p>4. \u8b93\u7d42\u7aef\u6a5f\u7a0b\u5f0f\u53ef\u4ee5\u8f38\u5165\u53ca\u986f\u793a\u4e2d\u6587 <br \/>$ <span style=\"color: #ff0000;\">sudo locale-gen en_US.UTF-8<\/span> <br \/>$ <span style=\"color: #ff0000;\">sudo update-locale LANG=en_US.UTF-8<\/span> <br \/>$ <span style=\"color: #ff0000;\">sudo update-locale LANGUAGE=en_US.UTF-8<\/span> <\/p>\n<p>5. \u6642\u5340\u53ca\u9810\u8a2d\u7de8\u8f2f\u5668\u8a2d\u5b9a <br \/>$ <span style=\"color: #ff0000;\">sudo tail -2 \/etc\/profile<\/span> <br \/><span style=\"color: #0000ff;\">export TZ=&#8221;Asia\/Taipei&#8221;<\/span> <br \/><span style=\"color: #0000ff;\">export EDITOR=&#8221;\/usr\/bin\/vim&#8221;<\/span><\/p>\n<p>6.\u5b89\u88dd Apache Web Server<br \/>$ <span style=\"color: #ff0000;\">sudo apt-get install apache2<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl enable apache2.service<\/span><br \/><span style=\"color: #0000ff;\">apache2.service is not a native service, redirecting to systemd-sysv-install<\/span><br \/><span style=\"color: #0000ff;\">Executing \/lib\/systemd\/systemd-sysv-install enable apache2<\/span><br \/>$ <span style=\"color: #ff0000;\">systemctl start apache2.service<\/span><\/p>\n<p>7. \u5b89\u88dd MariaDB SQL Server<br \/>$ <span style=\"color: #ff0000;\">sudo apt install mariadb-server<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl enable mysql<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl start mysql<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo<\/span> <span style=\"color: #ff0000;\">\/usr\/bin\/mysql_secure_installation<\/span><\/p>\n<p>8. \u5b89\u88dd PHP7<br \/>$ <span style=\"color: #ff0000;\">sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi\u00a0 php7.0 libapache2-mod-php7.0 php7.0-gd php7.0-bz2 php7.0-mbstring php7.0-zip<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl restart apache2.service<\/span><\/p>\n<p>\u8a2d\u5b9a\u6a94<br \/>MSQL <br \/><span style=\"color: #0000ff;\">\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/span><br \/>Apache<br \/><span style=\"color: #0000ff;\">\/etc\/apache2\/conf-available\/security.conf<\/span><br \/>PHP<br \/><span style=\"color: #0000ff;\">\/etc\/php\/7.0\/apache2\/php.ini<\/span><\/p>\n<p>9. \u5b89\u88dd snmpd<br \/>$ <span style=\"color: #ff0000;\">sudo<\/span> <span style=\"color: #ff0000;\">apt-get install snmpd snmp<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo<\/span> <span style=\"color: #ff0000;\">echo &#8216;rocommunity public&#8217; &gt; \/etc\/snmp\/snmpd.conf<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo<\/span>\u00a0 <span style=\"color: #ff0000;\">chmod 600 \/etc\/snmp\/snmpd.conf<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl enable snmpd.service<\/span><br \/>$ <span style=\"color: #ff0000;\">sudo systemctl start snmpd.service<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5c07\u66f4\u65b0\u7684 Server \u90fd\u6307\u5411\u570b\u5bb6\u9ad8\u901f\u7db2\u8def\u4e2d\u5fc3 $ sudo cp \/etc\/apt\/sources.l &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/11\/proxmox-ununtu-16-04-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; Ununtu 16.04 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":[191,119],"tags":[],"class_list":["post-19457","post","type-post","status-publish","format-standard","hentry","category-c-104943","category-c-78464"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["685324"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19457"}],"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=19457"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19457\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}