{"id":2082,"date":"2025-01-14T10:09:06","date_gmt":"2025-01-14T02:09:06","guid":{"rendered":"http:\/\/blog.infinity.idv.tw\/?p=2082"},"modified":"2025-01-14T10:11:38","modified_gmt":"2025-01-14T02:11:38","slug":"librenms-rocky-linux-9-5-%e5%ae%89%e8%a3%9d-%e8%a8%ad%e5%ae%9a-%e6%95%99%e5%ad%b8","status":"publish","type":"post","link":"http:\/\/blog.infinity.idv.tw\/?p=2082","title":{"rendered":"LibreNMS Rocky Linux 9.5 \u5b89\u88dd \u8a2d\u5b9a \u6559\u5b78"},"content":{"rendered":"<pre><font size=\"4\">\u53c3\u8003\uff1a<\/font><a href=\"https:\/\/wiki.freedomstu.com\/books\/librenms\/page\/librenms-rocky-linux-8\"><font size=\"4\">https:\/\/wiki.freedomstu.com\/books\/librenms\/page\/librenms-rocky-linux-8<\/font><\/a><\/pre>\n<pre><\/pre>\n<pre><font size=\"4\">\u958b\u555fcockpit&nbsp; IP:9090<\/font><\/pre>\n<pre><font size=\"4\">[root@localhost ~]# systemctl enable --now cockpit.socket<\/font><\/pre>\n<pre><\/pre>\n<pre><font size=\"4\">$ sudo<code> dnf install epel-release <\/code>-y<\/font><\/pre>\n<pre><font size=\"4\">$ sudo<code> dnf install neofetch <\/code>\u2013y<\/font><\/pre>\n<pre><font size=\"4\">&nbsp;<\/font><\/pre>\n<p><font size=\"4\">Webmin\uff1a\u597d\u7528\u7684web\u4ecb\u9762\u4f5c\u696d\u7cfb\u7d71\u7ba1\u7406\u5de5\u5177<\/font><\/p>\n<p><font size=\"4\">Webmin \u5b98\u65b9\u7db2\u7ad9\uff1a<\/font><a href=\"http:\/\/www.webmin.com\"><font size=\"4\">http:\/\/www.webmin.com<\/font><\/a><\/p>\n<p><font size=\"4\">\u5148\u5b89\u88dd\u76f8\u4f9d\u6a94\u6848<\/font><\/p>\n<p><font size=\"4\">[root@mail2 ~]# dnf install perl-lib perl-open perl-Encode-Detect<\/font><\/p>\n<p><font size=\"4\">\u5148\u6293\u5230P\u4e0a<\/font><\/p>\n<p><font size=\"4\">https:\/\/sourceforge.net\/projects\/webadmin\/files\/webmin\/2.000\/webmin-2.000-1.noarch.rpm\/download?use_mirror=altushost-swe&amp;use_mirror=altushost-swe&amp;r=<\/font><\/p>\n<p><font size=\"4\">\u7136\u5f8c\u900f\u904eWINSCP\u4e0a\u50b3\u5230LINUX<\/font><\/p>\n<p><font size=\"4\">\u5b89\u88ddWEBMIN RPM<\/font><\/p>\n<p><font size=\"4\">rpm -ivh webmin-2.000-1.noarch.rpm<\/font><\/p>\n<p><font size=\"4\">\u9632\u706b\u7246\u958b\u555fWEBMIN 10000 PORT<\/font><\/p>\n<p><font size=\"4\">\u5230GUI\u5b89\u88dd\u9632\u706b\u7246APP<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image004-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image004-3.jpg\"><img loading=\"lazy\" width=\"456\" height=\"252\" title=\"clip_image004\" style=\"display: inline; background-image: none;\" alt=\"clip_image004\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image004_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">\u65b0\u589e10000 PORT<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image006-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image006-3.jpg\"><img loading=\"lazy\" width=\"396\" height=\"318\" title=\"clip_image006\" style=\"display: inline; background-image: none;\" alt=\"clip_image006\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image006_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<pre><font size=\"4\">&nbsp;<\/font><\/pre>\n<p><b><font size=\"4\">\u505c\u7528ipv6<\/font><\/b><\/p>\n<p><b><font size=\"4\">sysctl net.ipv6.conf.all.disable_ipv6=1<\/font><\/b><\/p>\n<p><b><font size=\"4\">sysctl net.ipv6.conf.default.disable_ipv6=1<\/font><\/b><\/p>\n<p><b><font size=\"4\"><\/font><\/b><\/p>\n<p><b><font size=\"4\">\u95dc\u9589SELinux \u4e0d\u95dc\u9589FTP\u7b49\u670d\u52d9\u6703\u7570\u5e38<\/font><\/b><\/p>\n<p><b><font size=\"4\">[root@www2 ~]# vi \/etc\/selinux\/config<\/font><\/b><\/p>\n<p><b><font size=\"4\">SELINUX=disabled<\/font><\/b><\/p>\n<p><b><font size=\"4\">\u91cd\u65b0\u958b\u6a5f<\/font><\/b><\/p>\n<p><font size=\"4\">\u5b89\u88ddSENDMAIL<\/font><\/p>\n<p><font size=\"4\">[root@librenms ~]# dnf install sendmail*<\/font><\/p>\n<p><font size=\"4\">\u958b\u6a5f\u555f\u52d5SENDMAIL<\/font><\/p>\n<p><font size=\"4\">[root@librenms ~]# systemctl enable sendmail.service<\/font><\/p>\n<p><font size=\"4\">\u8a2d\u5b9aroot\u6536\u4fe1\u4eba<\/font><\/p>\n<p><font size=\"4\">[root@librenms ~]# vim \/etc\/aliases<\/font><\/p>\n<p><font size=\"4\">root: <\/font><a><font size=\"4\">roger.lin@t3ex-techiview.com<\/font><\/a><\/p>\n<p><b><font size=\"4\">\u5728\u5bb6\u76ee\u9304\u65b0\u589e .vimrc<\/font><\/b><\/p>\n<p><b><font size=\"4\">set nu<\/font><\/b><\/p>\n<p><b><font size=\"4\">set tabstop=4<\/font><\/b><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd <code>Nginx<\/code> \u5148\u6c7a\u689d\u4ef6<\/font><\/p>\n<p><font size=\"4\">1<\/font><\/p>\n<p><font size=\"4\">dnf install yum-utils -y<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u8a2d\u5b9a <code>yum<\/code> \u5b58\u5132\u5eab\uff0c\u5728\u6b64\u76ee\u9304\u4e0b\u65b0\u589e\u4e00\u500b <code>vim \/etc\/yum.repos.d\/nginx.repo<\/code> \u5c6c\u65bc <\/font><a href=\"https:\/\/nginx.org\/en\/linux_packages.html\"><font size=\"4\">\u5b98\u65b9\u63d0\u4f9b\u8f09\u9ede<\/font><\/a><\/p>\n<p><font size=\"4\">[nginx-stable]<\/font><\/p>\n<p><font size=\"4\">name=nginx stable repo<\/font><\/p>\n<p><font size=\"4\">baseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/<\/font><\/p>\n<p><font size=\"4\">gpgcheck=1<\/font><\/p>\n<p><font size=\"4\">enabled=1<\/font><\/p>\n<p><font size=\"4\">gpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key<\/font><\/p>\n<p><font size=\"4\">module_hotfixes=true<\/font><\/p>\n<p><font size=\"4\">[nginx-mainline]<\/font><\/p>\n<p><font size=\"4\">name=nginx mainline repo<\/font><\/p>\n<p><font size=\"4\">baseurl=http:\/\/nginx.org\/packages\/mainline\/centos\/$releasever\/$basearch\/<\/font><\/p>\n<p><font size=\"4\">gpgcheck=1<\/font><\/p>\n<p><font size=\"4\">enabled=0<\/font><\/p>\n<p><font size=\"4\">gpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key<\/font><\/p>\n<p><font size=\"4\">module_hotfixes=true<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u6703\u5efa\u8b70\u4f7f\u7528 stable \u7a69\u5b9a\u7248\u672c\uff0c\u5982\u679c\u60f3\u4f7f\u7528\u6bd4\u8f03\u6700\u65b0\u7684\u7248\u672c\u8acb\u4f7f\u7528 nginx-mailine \u6703\u4ee5\u7576\u6642\u5b98\u65b9\u91cb\u51fa\u7684\u7248\u672c\u70ba\u4e3b\uff0c\u76ee\u524d BUBU \u662f\u4f7f\u7528\u5b98\u65b9\u6bd4\u8f03\u65b0\u7248\u70ba\u4e3b<\/font><\/p>\n<p><font size=\"4\">yum-config-manager &#8211;enable nginx-mainline<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd nginx \u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">dnf install MariaDB-server \u2013y<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u555f\u52d5\u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">systemctl start nginx ; systemctl enable nginx<\/font><\/p>\n<h6><strong><font size=\"4\">\u5b89\u88dd\u8cc7\u6599\u5eab<\/font><\/strong><\/h6>\n<p><font size=\"4\">\u00b7 \u5728\u4f86\u6e90\u5eab\u76ee\u9304\u4e0b\u65b0\u589e\u52a0 MariaDB.repo \u589e\u52a0\u4e0a\u53bb\uff0c\u5148\u5230 <\/font><a href=\"https:\/\/mariadb.org\/download\/?t=repo-config&amp;d=Red+Hat+EL+8+%28x86_64%29&amp;v=10.9&amp;r_m=ossplanet\"><font size=\"4\">MariaDB \u4f86\u6e90\u5eab\u67e5\u770b<\/font><\/a><\/p>\n<p><font size=\"4\"># \u65b0\u589e\u52a0MariaDB\u5b89\u88dd\u6a94<\/font><\/p>\n<p><font size=\"4\">vim \/etc\/yum.repos.d\/MariaDB.repo<\/font><\/p>\n<p><font size=\"4\"># MariaDB 10.11 RedHat repository list &#8211; created 2025-01-10 14:22 UTC<\/font><\/p>\n<p><font size=\"4\"># https:\/\/mariadb.org\/download\/<\/font><\/p>\n<p><font size=\"4\">[mariadb]<\/font><\/p>\n<p><font size=\"4\">name = MariaDB<\/font><\/p>\n<p><font size=\"4\">baseurl = https:\/\/ftp.ubuntu-tw.org\/mirror\/mariadb\/yum\/10.11\/rocky9-amd64\/<\/font><\/p>\n<p><font size=\"4\">module_hotfixes=1<\/font><\/p>\n<p><font size=\"4\">gpgkey=https:\/\/ftp.ubuntu-tw.org\/mirror\/mariadb\/yum\/RPM-GPG-KEY-MariaDB<\/font><\/p>\n<p><font size=\"4\">gpgcheck=1<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u589e\u52a0\u5b8c\u7562\u5f8c\u5728\u4e0b\u547d\u4ee4\u5b89\u88dd<\/font><\/p>\n<p><font size=\"4\">dnf install MariaDB-server \u2013y<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u555f\u52d5 mariadb \u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">systemctl start mariadb ; systemctl enable mariadb<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u8cc7\u6599\u5eab\u5b89\u88dd\u53ca\u8a2d\u5b9a<\/font><\/p>\n<p><font size=\"4\">mariadb-secure-installation # \u8a2d\u5b9a\u8cc7\u6599\u5eab\u7684root\u5bc6\u78bc<\/font><\/p>\n<p><font size=\"4\">NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<\/font><\/p>\n<p><font size=\"4\">SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!<\/font><\/p>\n<p><font size=\"4\">In order to log into MariaDB to secure it, we&#8217;ll need the current<\/font><\/p>\n<p><font size=\"4\">password for the root user. If you&#8217;ve just installed MariaDB, and<\/font><\/p>\n<p><font size=\"4\">haven&#8217;t set the root password yet, you should just press enter here.<\/font><\/p>\n<p><font size=\"4\">Enter current password for root (enter for none): <\/font><\/p>\n<p><font size=\"4\">OK, successfully used password, moving on&#8230;<\/font><\/p>\n<p><font size=\"4\">Setting the root password or using the unix_socket ensures that nobody<\/font><\/p>\n<p><font size=\"4\">can log into the MariaDB root user without the proper authorisation.<\/font><\/p>\n<p><font size=\"4\">You already have your root account protected, so you can safely answer &#8216;n&#8217;.<\/font><\/p>\n<p><font size=\"4\">Switch to unix_socket authentication [Y\/n] &lt;&#8212;&#8211; \u76f4\u63a5\u6309\u4e0b enter \u9375<\/font><\/p>\n<p><font size=\"4\">Enabled successfully!<\/font><\/p>\n<p><font size=\"4\">Reloading privilege tables..<\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">You already have your root account protected, so you can safely answer &#8216;n&#8217;.<\/font><\/p>\n<p><font size=\"4\">Change the root password? [Y\/n] &lt;&#8212;&#8211; \u76f4\u63a5\u6309\u4e0b enter \u9375<\/font><\/p>\n<p><font size=\"4\">New password: &lt;&#8212;&#8211; \u8f38\u5165 root \u5bc6\u78bc<\/font><\/p>\n<p><font size=\"4\">Re-enter new password: &lt;&#8212;&#8211; \u518d\u6b21\u8f38\u5165 root \u5bc6\u78bc<\/font><\/p>\n<p><font size=\"4\">Password updated successfully!<\/font><\/p>\n<p><font size=\"4\">Reloading privilege tables..<\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">By default, a MariaDB installation has an anonymous user, allowing anyone<\/font><\/p>\n<p><font size=\"4\">to log into MariaDB without having to have a user account created for<\/font><\/p>\n<p><font size=\"4\">them. This is intended only for testing, and to make the installation<\/font><\/p>\n<p><font size=\"4\">go a bit smoother. You should remove them before moving into a<\/font><\/p>\n<p><font size=\"4\">production environment.<\/font><\/p>\n<p><font size=\"4\">Remove anonymous users? [Y\/n] <\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">Normally, root should only be allowed to connect from &#8216;localhost&#8217;. This<\/font><\/p>\n<p><font size=\"4\">ensures that someone cannot guess at the root password from the network.<\/font><\/p>\n<p><font size=\"4\">Disallow root login remotely? [Y\/n] <\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">By default, MariaDB comes with a database named &#8216;test&#8217; that anyone can<\/font><\/p>\n<p><font size=\"4\">access. This is also intended only for testing, and should be removed<\/font><\/p>\n<p><font size=\"4\">before moving into a production environment.<\/font><\/p>\n<p><font size=\"4\">Remove test database and access to it? [Y\/n] <\/font><\/p>\n<p><font size=\"4\">&#8211; Dropping test database&#8230;<\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">&#8211; Removing privileges on test database&#8230;<\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">Reloading the privilege tables will ensure that all changes made so far<\/font><\/p>\n<p><font size=\"4\">will take effect immediately.<\/font><\/p>\n<p><font size=\"4\">Reload privilege tables now? [Y\/n] <\/font><\/p>\n<p><font size=\"4\">&#8230; Success!<\/font><\/p>\n<p><font size=\"4\">Cleaning up&#8230;<\/font><\/p>\n<p><font size=\"4\">All done! If you&#8217;ve completed all of the above steps, your MariaDB<\/font><\/p>\n<p><font size=\"4\">installation should now be secure.<\/font><\/p>\n<p><font size=\"4\">Thanks for using MariaDB!<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5728 server.cnf \u6a94\u624b\u52d5\u589e\u52a0\u4ee5\u4e0b\u5167\u5bb9 vim \/etc\/my.cnf.d\/server.cnf<\/font><\/p>\n<p><font size=\"4\">[mysqld]<\/font><\/p>\n<p><font size=\"4\">innodb_file_per_table=1<\/font><\/p>\n<p><font size=\"4\">lower_case_table_names=0<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u65b0\u589e\u52a0 LibreNMS \u8868\u55ae mariadb -u root -p<\/font><\/p>\n<p><font size=\"4\">CREATE DATABASE librenms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<\/font><\/p>\n<p><font size=\"4\">CREATE USER &#8216;librenms&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;password&#8217;; &lt;&#8212;&#8211; \u9019\u88e1\u7684 password \u4fee\u6539\u6210\u60a8\u81ea\u5df1\u8a18\u7684\u4f4f\u5bc6\u78bc \u4f7f\u7528winpex@29 \u9019\u7d44<\/font><\/p>\n<p><font size=\"4\">GRANT ALL PRIVILEGES ON librenms.* TO &#8216;librenms&#8217;@&#8217;localhost&#8217;;<\/font><\/p>\n<p><font size=\"4\">FLUSH PRIVILEGES;<\/font><\/p>\n<p><font size=\"4\">Exit<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u91cd\u555f\u8cc7\u6599\u5eab<\/font><\/p>\n<p><font size=\"4\">systemctl restart mariadb<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u8a2d\u5b9a\u8cc7\u6599\u5eab <code>root<\/code> \u514d\u5bc6\u78bc\u5c31\u53ef\u4ee5\u767b\u5165\uff0c\u8acb\u53c3\u8003\u672c\u7bc7\u9032\u884c\u4fee\u6539 <\/font><a href=\"https:\/\/wiki.freedomstu.com\/books\/%E8%B3%87%E6%96%99%E5%BA%AB%E9%96%8B%E7%99%BC%E8%A8%98%E9%8C%84\/page\/mariadb-root\"><font size=\"4\">MariaDB root \u53ef\u7a7a\u767d\u767b\u5165<\/font><\/a><\/p>\n<p><font size=\"4\"><b>\u5b89\u88dd<\/b><b> php <\/b><b>\u670d\u52d9<\/b><\/font><\/p>\n<p><font size=\"4\">\u00b7 Rocky Linux 8 \u9810\u8a2d\u7248\u672c\u662f PHP 7.2 \u7248\uff0c\u90a3\u5982\u679c\u60f3\u8981\u4f7f\u7528\u6bd4\u8f03\u65b0\u7684\u7248\u672c\u7684\u8a71\u9700\u8981\u65b0\u589e\u52a0\u4f86\u6e90\u5eab\u5b89\u88dd<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd epel-release \u5957\u4ef6\u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">dnf install -y epel-release<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd\u5b98\u65b9\u6240\u63d0\u4f9b\u4f86\u6e90\u5eab\u7248\u672c<\/font><\/p>\n<p><font size=\"4\">dnf install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-9.5.rpm -y<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u67e5\u8a62\u76ee\u524d\u53ef\u5b89\u88dd\u7684\u7248\u672c<\/font><\/p>\n<p><font size=\"4\">dnf module list php \u2013y<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image008.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image008-1.jpg\"><img loading=\"lazy\" width=\"702\" height=\"197\" title=\"clip_image008\" style=\"display: inline; background-image: none;\" alt=\"clip_image008\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image008_thumb-1.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">\u00b7 \u5c07 PHP \u5b89\u88dd\u7248\u672c\u9810\u8a2d\u6210 8.4 \u7248\u672c<\/font><\/p>\n<p><font size=\"4\">dnf module reset php -y<\/font><\/p>\n<p><font size=\"4\">dnf module enable php:remi-8.4 \u2013y<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd php \u53ca\u5176\u4ed6\u5fc5\u8981\u5957\u4ef6<\/font><\/p>\n<p><font size=\"4\">dnf install -y bash-completion cronie fping git ImageMagick mtr net-snmp net-snmp-utils nmap php-fpm php-cli php-common php-curl php-gd php-gmp php-json php-mbstring php-process php-snmp php-xml php-zip php-mysqlnd python3 python3-PyMySQL python3-redis python3-memcached python3-pip python3-systemd gcc python3-devel rrdtool unzip<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd Composer \u4f5c\u66f2\u5bb6<\/font><\/p>\n<p><font size=\"4\"># \u5c07dirs\u66f4\u6539\u70ba\u6211\u5011\u5e0c\u671b\u5c07composer\u5b89\u88dd\u5230\u7684\u4f4d\u7f6e<\/font><\/p>\n<p><font size=\"4\">cd \/usr\/local\/bin<\/font><\/p>\n<p><font size=\"4\"># \u5b89\u88dd composer<\/font><\/p>\n<p><font size=\"4\">curl -sS https:\/\/getcomposer.org\/installer | php<\/font><\/p>\n<p><font size=\"4\"># \u91cd\u65b0\u547d\u540d composer<\/font><\/p>\n<p><font size=\"4\">mv composer.phar composer<\/font><\/p>\n<h6><font size=\"4\"><strong>\u5b89\u88dd<\/strong><strong> Librenms <\/strong><strong>\u670d\u52d9<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u65b0\u589e\u52a0 librenms \u4f7f\u7528\u8005<\/font><\/p>\n<p><font size=\"4\">useradd librenms -d \/opt\/librenms -M -r -s &#8220;$(which bash)&#8221;<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u4e0b\u8f09 Librenms \u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">cd \/opt<\/font><\/p>\n<p><font size=\"4\">git clone <\/font><a href=\"https:\/\/github.com\/librenms\/librenms.git\"><font size=\"4\">https:\/\/github.com\/librenms\/librenms.git<\/font><\/a><\/p>\n<p><font size=\"4\">\u00b7 \u8a2d\u5b9a\u6b0a\u9650<\/font><\/p>\n<p><font size=\"4\">chown -R librenms:librenms \/opt\/librenms<\/font><\/p>\n<p><font size=\"4\">chmod 771 \/opt\/librenms<\/font><\/p>\n<p><font size=\"4\">setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/<\/font><\/p>\n<p><font size=\"4\">setfacl -R -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd LibreNMS \u53ca php \u76f8\u95dc\u5957\u4ef6<\/font><\/p>\n<p><font size=\"4\">su &#8211; librenms<\/font><\/p>\n<p><font size=\"4\">.\/scripts\/composer_wrapper.php install &#8211;no-dev<\/font><\/p>\n<p><font size=\"4\">Exit<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong> php <\/strong><strong>\u670d\u52d9<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u5b89\u88dd\u597d PHP \u8981\u53bb\u4fee\u6539 \u300c<code>vim \/etc\/php.ini<\/code>\u300d \u8a2d\u5b9a\u6a94<\/font><\/p>\n<p><font size=\"4\">\u4fee\u6539\u6642\u5340<\/font><\/p>\n<p><font size=\"4\">[Date]<\/font><\/p>\n<p><font size=\"4\">\u4fee\u6539\u524d<\/font><\/p>\n<p><font size=\"4\">;date.timezone = <\/font><\/p>\n<p><font size=\"4\">\u4fee\u6539\u5f8c<\/font><\/p>\n<p><font size=\"4\">date.timezone = Asia\/Taipei<\/font><\/p>\n<p><font size=\"4\">\u5b58\u6a94<\/font><\/p>\n<p><font size=\"4\">:wq<\/font><\/p>\n<p><font size=\"4\"># \u6307\u4ee4\u4fee\u6539<\/font><\/p>\n<p><font size=\"4\">sed -i &#8220;s|^;date.timezone =.*$|date.timezone = Asia\/Taipei|&#8221; \/etc\/php.ini<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u65b0\u589e\u52a0 librenms PHP-FPM \u8a2d\u5b9a\u6a94<\/font><\/p>\n<p><font size=\"4\">cp \/etc\/php-fpm.d\/www.conf \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">vim \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u8a2d\u5b9a librenms PHP-FPM vim \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">\u5c07\u539f\u662f [www] \u4fee\u6539\u70ba [librenms]<\/font><\/p>\n<p><font size=\"4\">user = librenms<\/font><\/p>\n<p><font size=\"4\">group = librenms<\/font><\/p>\n<p><font size=\"4\">listen = \/run\/php-fpm-librenms.sock<\/font><\/p>\n<p><font size=\"4\"># \u6307\u4ee4\u4fee\u6539<\/font><\/p>\n<p><font size=\"4\">sed -i &#8216;s\/\\[www\\]\/\\[librenms\\]\/g&#8217; \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">sed -i &#8220;s|^user = apache.*$|user = librenms|&#8221; \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">sed -i &#8220;s|^group = apache.*$|group = librenms|&#8221; \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">sed -i &#8220;s|^listen = \/run\/php-fpm\/www.sock.*$|listen = \/run\/php-fpm-librenms.sock|&#8221; \/etc\/php-fpm.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u8a2d\u5b9a\u958b\u6a5f\u81ea\u52d5\u555f\u52d5\u53ca\u91cd\u555f\u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">systemctl enable php-fpm ; systemctl restart php-fpm<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong> Web <\/strong><strong>\u670d\u52d9<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u65b0\u589e\u52a0 LibreNMS \u8a2d\u5b9a\u6a94<\/font><\/p>\n<p><font size=\"4\">vim \/etc\/nginx\/conf.d\/librenms.conf<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u5c07\u4ee5\u4e0b\u5167\u5bb9\u8cbc\u5230 librenms.conf \u7de8\u8f2f server_name \u4fee\u6539\u6210\u7ad9\u53f0\u4f4d\u7f6e<\/font><\/p>\n<p><font size=\"4\">server {<\/font><\/p>\n<p><font size=\"4\">listen 80;<\/font><\/p>\n<p><font size=\"4\">server_name librenms.winpex-gl.com;<\/font><\/p>\n<p><font size=\"4\">root \/opt\/librenms\/html;<\/font><\/p>\n<p><font size=\"4\">index index.php;<\/font><\/p>\n<p><font size=\"4\">charset utf-8;<\/font><\/p>\n<p><font size=\"4\">gzip on;<\/font><\/p>\n<p><font size=\"4\">gzip_types text\/css application\/javascript text\/javascript application\/x-javascript image\/svg+xml text\/plain text\/xsd text\/xsl text\/xml image\/x-icon;<\/font><\/p>\n<p><font size=\"4\">location \/ {<\/font><\/p>\n<p><font size=\"4\">try_files $uri $uri\/ \/index.php?$query_string;<\/font><\/p>\n<p><font size=\"4\">}<\/font><\/p>\n<p><font size=\"4\">location ~ [^\/]\\.php(\/|$) {<\/font><\/p>\n<p><font size=\"4\">fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<\/font><\/p>\n<p><font size=\"4\">fastcgi_param PATH_INFO $fastcgi_path_info;<\/font><\/p>\n<p><font size=\"4\">fastcgi_pass unix:\/run\/php-fpm-librenms.sock;<\/font><\/p>\n<p><font size=\"4\">fastcgi_split_path_info ^(.+\\.php)(\/.+)$;<\/font><\/p>\n<p><font size=\"4\">include fastcgi_params;<\/font><\/p>\n<p><font size=\"4\">}<\/font><\/p>\n<p><font size=\"4\">location ~ \/\\.(?!well-known).* {<\/font><\/p>\n<p><font size=\"4\">deny all;<\/font><\/p>\n<p><font size=\"4\">}<\/font><\/p>\n<p><font size=\"4\">}<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u91cd\u555f\u670d\u52d9<\/font><\/p>\n<p><font size=\"4\">systemctl restart nginx<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong> lnms <\/strong><strong>\u670d\u52d9<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u555f\u7528 lnms<\/font><\/p>\n<p><font size=\"4\">ln -s \/opt\/librenms\/lnms \/usr\/bin\/lnms<\/font><\/p>\n<p><font size=\"4\">cp \/opt\/librenms\/misc\/lnms-completion.bash \/etc\/bash_completion.d\/<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong> SNMP <\/strong><strong>\u670d\u52d9<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u5f9e\u6a23\u7248\u8907\u88fd\u4e00\u4efd<\/font><\/p>\n<p><font size=\"4\">cp \/opt\/librenms\/snmpd.conf.example \/etc\/snmp\/snmpd.conf<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u7de8\u8f2f\u8a2d\u5b9a\u6a94\u5c07 \u300cRANDOMSTRINGGOESHERE\u300d \u4fee\u6539\u6216\u9810\u8a2d public<\/font><\/p>\n<p><font size=\"4\">vim \/etc\/snmp\/snmpd.conf<\/font><\/p>\n<p><font size=\"4\"># Change RANDOMSTRINGGOESHERE to your preferred SNMP community string<\/font><\/p>\n<p><font size=\"4\">com2sec readonly default public<\/font><\/p>\n<p><font size=\"4\">group MyROGroup v2c readonly<\/font><\/p>\n<p><font size=\"4\">view all included .1 80<\/font><\/p>\n<p><font size=\"4\">access MyROGroup &#8220;&#8221; any noauth exact all none non<\/font><\/p>\n<p><font size=\"4\">syslocation Rack, Room, Building, City, Country [Lat, Lon]<\/font><\/p>\n<p><font size=\"4\">syscontact Your Name &lt;roger.lin@t3ex-techiview.com&gt;<\/font><\/p>\n<p><font size=\"4\">#OS Distribution Detection<\/font><\/p>\n<p><font size=\"4\">extend distro \/usr\/bin\/distro<\/font><\/p>\n<p><font size=\"4\">#Hardware Detection<\/font><\/p>\n<p><font size=\"4\"># (uncomment for x86 platforms)<\/font><\/p>\n<p><font size=\"4\">#extend manufacturer &#8216;\/bin\/cat \/sys\/devices\/virtual\/dmi\/id\/sys_vendor<\/font><\/p>\n<p><font size=\"4\">#extend hardware &#8216;\/bin\/cat \/sys\/devices\/virtual\/dmi\/id\/product_name&#8217;<\/font><\/p>\n<p><font size=\"4\">#extend serial &#8216;\/bin\/cat \/sys\/devices\/virtual\/dmi\/id\/product_serial&#8217;<\/font><\/p>\n<p><font size=\"4\"># (uncomment for ARM platforms)<\/font><\/p>\n<p><font size=\"4\">#extend hardware &#8216;\/bin\/cat \/sys\/firmware\/devicetree\/base\/model&#8217;<\/font><\/p>\n<p><font size=\"4\">#extend serial &#8216;\/bin\/cat \/sys\/firmware\/devicetree\/base\/serial-number&#8217;<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u4e0b\u8f09 librenms-agent \u5957\u4ef6<\/font><\/p>\n<p><font size=\"4\">curl -o \/usr\/bin\/distro https:\/\/raw.githubusercontent.com\/librenms\/librenms-agent\/master\/snmp\/distro<\/font><\/p>\n<p><font size=\"4\">chmod +x \/usr\/bin\/distro<\/font><\/p>\n<p><font size=\"4\">systemctl enable snmpd &amp;&amp; systemctl restart snmpd<\/font><\/p>\n<h6><strong><font size=\"4\">\u8a2d\u5b9a\u6392\u7a0b<\/font><\/strong><\/h6>\n<p><font size=\"4\">\u00b7 \u5f9e Librenms \u76ee\u9304\u4e0b\u8907\u88fd\u5230 cron.d \u88e1\u9762<\/font><\/p>\n<p><font size=\"4\">#cp \/opt\/librenms\/librenms.nonroot.cron \/etc\/cron.d\/librenms<\/font><\/p>\n<p><font size=\"4\">cp \/opt\/librenms\/dist\/librenms.cron \/etc\/cron.d\/librenms<\/font><\/p>\n<p><font size=\"4\">cp \/opt\/librenms\/dist\/librenms-scheduler.cron \/etc\/cron.d\/librenms<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong> logrotate<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u8907\u88fd logrotate \u8a2d\u5b9a\u6a94<\/font><\/p>\n<p><font size=\"4\">#cp \/opt\/librenms\/misc\/librenms.logrotate \/etc\/logrotate.d\/librenms<\/font><\/p>\n<p><font size=\"4\">cp \/opt\/librenms\/misc\/librenms.logrotate \/etc\/logrotate.d\/librenms<\/font><\/p>\n<h6><font size=\"4\"><strong>\u8a2d\u5b9a<\/strong><strong>hosts<\/strong><\/font><\/h6>\n<p><font size=\"4\">[root@librenms opt]# vim \/etc\/hosts<\/font><\/p>\n<p><font size=\"4\">127.0.0.1 localhost librenms librenms.XXX.com librenms.XXX.com<\/font><\/p>\n<p><font size=\"4\">::1 localhost localhost.localdomain localhost6 localhost6.localdomain6<\/font><\/p>\n<p><font size=\"4\"><br \/><\/font><\/p>\n<p><font size=\"4\">\u8a2d\u5b9a\u5167\u90e8DNS\u89e3\u6790<\/font><\/p>\n<p><font size=\"4\">IP \u5c0d\u61c9 librenms.XXX.com<\/font><\/p>\n<p><\/p>\n<h6><font size=\"4\"><strong>\u958b\u59cb\u5b89\u88dd<\/strong><strong> LibreNMS<\/strong><\/font><\/h6>\n<p><font size=\"4\">\u00b7 \u958b\u555f\u700f\u7060\u5668\u8f38\u5165 <code><a href=\"http:\/\/librenms.XXX.com\/\">http:\/\/librenms.XXX.com\/<\/a><\/code> (\u7ad9\u53f0\u4f4d\u7f6e)<\/font><\/p>\n<p><font size=\"4\">1. \u6aa2\u6e2c\u5b89\u88dd\u74b0\u5883\u662f\u5426\u6709\u6b63\u5e38\uff0c\u5982\u679c\u51fa\u73fe\u7570\u5e38\u8981\u628a\u7f3a\u7684\u5957\u4ef6\u90fd\u5b89\u88dd\u8d77\u4f86\u624d\u80fd\u6b63\u5e38\u904b\u884c<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image011-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image011-3.jpg\"><img loading=\"lazy\" width=\"508\" height=\"386\" title=\"clip_image011\" style=\"display: inline; background-image: none;\" alt=\"clip_image011\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image011_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">2. \u586b\u5165\u8981\u9023\u63a5\u7684\u8cc7\u6599\u5eab\u540d\u7a31\u53ca\u767b\u5165\u5e33\u865f\u53ca\u5bc6\u78bc<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image013-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image013-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"480\" title=\"clip_image013\" style=\"display: inline; background-image: none;\" alt=\"clip_image013\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image013_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">3. \u6703\u81ea\u52d5\u5efa\u7acb\u8cc7\u6599\u5eab\u88e1\u9762\u8868\u55ae<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image015-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image015-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"569\" title=\"clip_image015\" style=\"display: inline; background-image: none;\" alt=\"clip_image015\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image015_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image017-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image017-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"778\" title=\"clip_image017\" style=\"display: inline; background-image: none;\" alt=\"clip_image017\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image017_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">4. \u78ba\u8a8d\u5b8c\u6210\u7684\u756b\u9762\uff0c\u76f4\u63a5\u6309\u4e0b\u4e0b\u4e00\u500b\u5716\u793a\u7e7c\u7e8c<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image019-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image019-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"408\" title=\"clip_image019\" style=\"display: inline; background-image: none;\" alt=\"clip_image019\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image019_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">5. \u586b\u5165\u8981\u5efa\u7acb\u7684\u7cfb\u7d71\u7ba1\u7406\u54e1\u7684\u5e33\u865f\u3001\u5bc6\u78bc\u53ca\u96fb\u5b50\u90f5\u4ef6 admin Hiview\u9019\u7d44\u5bc6\u78bc<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image021-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image021-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"422\" title=\"clip_image021\" style=\"display: inline; background-image: none;\" alt=\"clip_image021\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image021_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image023-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image023-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image023-3.jpg\"><img loading=\"lazy\" width=\"702\" height=\"510\" title=\"clip_image023\" style=\"display: inline; background-image: none;\" alt=\"clip_image023\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image023_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/font><\/a><\/p>\n<p><font size=\"4\">7. \u5b89\u88dd\u5b8c\u6210\u4e86\u7684\u756b\u9762\uff0c\u53ef\u4ee5\u9ede\u9078 Finish Install \u9019\u500b\u9078\u9805\u78ba\u8a8d\u8aaa\u670d\u52d9\u662f\u5426\u6709\u6b63\u78ba\u5b89\u88dd\u5b8c\u6210<\/font><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image025-2.jpg\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image025-3.jpg\"><img loading=\"lazy\" width=\"701\" height=\"426\" title=\"clip_image025\" style=\"display: inline; background-image: none;\" alt=\"clip_image025\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image025_thumb.jpg\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image026-2.png\"><font size=\"4\"><a href=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image026-3.png\"><img loading=\"lazy\" width=\"544\" height=\"417\" title=\"clip_image026\" style=\"display: inline; background-image: none;\" alt=\"clip_image026\" src=\"http:\/\/blog.infinity.idv.tw\/wp-content\/uploads\/2025\/01\/clip_image026_thumb.png\" border=\"0\"><\/a><\/font><\/a><\/p>\n<h5><font size=\"4\"><strong>\u6700\u5f8c\u78ba\u8a8d<\/strong><strong> Final steps<\/strong><\/font><\/h5>\n<p><font size=\"4\">\u00b7 \u5982\u679c\u5b89\u88dd\u6709\u554f\u984c\uff0c\u8acb\u5728\u300clibrenms\u300d\u76ee\u9304\u4e0b\u4ee5\u300croot\u300d\u8eab\u4efd\u904b\u884c\u300c validate.php \u300d<\/font><\/p>\n<p><font size=\"4\">cd \/opt\/librenms<\/font><\/p>\n<p><font size=\"4\">.\/validate.php<\/font><\/p>\n<p><font size=\"4\">\u00b7 \u4ee5 librenms \u6b0a\u9650\u4f86\u57f7\u884c\u78ba\u8a8d<\/font><\/p>\n<p><font size=\"4\">sudo su &#8211; librenms<\/font><\/p>\n<p><font size=\"4\">.\/validate.php<\/font><\/p>\n<pre><font size=\"4\">php -r \"copy('https:\/\/getcomposer.org\/installer', 'composer-setup.php');\"<\/font><\/pre>\n<pre><font size=\"4\">php -r \"if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"<\/font><\/pre>\n<pre><font size=\"4\">php composer-setup.php<\/font><\/pre>\n<pre><font size=\"4\">php -r \"unlink('composer-setup.php');\"<\/font><\/pre>\n<pre><font size=\"4\">mv composer.phar \/usr\/local\/bin\/composer<\/font><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\uff1ahttps:\/\/wiki.freedomstu.com\/books\/librenms\/page\/librenms-rocky-linux-8<\/p>\n<p>\u958b\u555fcockpit&nbsp; IP:9090<br \/>\n[root@localhost ~]# systemctl enable &#8211;now cockpit.socket<\/p>\n<p>$ sudo dnf install epel-release -y<br \/>\n$ sudo dnf install neofetch \u2013y<br \/>\n&nbsp;<\/p>\n<p>Webmin\uff1a\u597d\u7528\u7684web\u4ecb\u9762\u4f5c\u696d\u7cfb\u7d71\u7ba1\u7406\u5de5\u5177<\/p>\n<p>Webmin \u5b98\u65b9\u7db2\u7ad9\uff1ahttp:\/\/www.webmin.com<\/p>\n<p>\u5148\u5b89\u88dd\u76f8\u4f9d\u6a94\u6848<\/p>\n<p>[root@mail2 ~]# dnf install perl-lib perl-open perl-Encode-Detect<\/p>\n<p>\u5148\u6293\u5230P\u4e0a<\/p>\n<p>https:\/\/sourceforge.net\/projects\/webadmin\/files\/webmin\/2.000\/webmin-2.000-1.noarch.rpm\/download?use_mirror=altushost-swe&amp;use_mirror=altushost-swe&amp;r=<\/p>\n<p>\u7136\u5f8c\u900f\u904eWINSCP\u4e0a\u50b3\u5230LINUX<\/p>\n<p>\u5b89\u88ddWEBMIN RPM<\/p>\n<p>rpm -ivh webmin-2.000-1.noarch.rpm<\/p>\n<p>\u9632\u706b\u7246\u958b\u555fWEBMIN 10000 PORT<\/p>\n<p>\u5230GUI\u5b89\u88dd\u9632\u706b\u7246APP<\/p>\n<\/p>\n<p>\u65b0\u589e10000 PORT<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p>\u505c\u7528ipv6<\/p>\n<p>sysctl net.ipv6.conf.all.disable_ipv6=1<\/p>\n<p>sysctl net.ipv6.conf.default.disable_ipv6=1<\/p>\n<\/p>\n<p>\u95dc\u9589SELinux \u4e0d\u95dc\u9589FTP\u7b49\u670d\u52d9\u6703\u7570\u5e38<\/p>\n<p>[root@www2 ~]# vi \/etc\/selinux\/config<\/p>\n<p>SELINUX=disabled<\/p>\n<p>\u91cd\u65b0\u958b\u6a5f<\/p>\n<p>\u5b89\u88ddSENDMAIL<\/p>\n<p>[root@librenms ~]# dnf install sendmail*<\/p>\n<p>\u958b\u6a5f\u555f\u52d5SENDMAIL<\/p>\n<p>[root@librenms ~]# systemctl enable sendmail.service<\/p>\n<p>\u8a2d\u5b9aroot\u6536\u4fe1\u4eba<\/p>\n<p>[root@librenms ~]# vim \/etc\/aliases<\/p>\n<p>root: roger.lin@t3ex-techiview.com<\/p>\n<p>\u5728\u5bb6\u76ee\u9304\u65b0\u589e .vimrc<\/p>\n<p>set nu<\/p>\n<p>set tabstop=4<\/p>\n<p>\u00b7 \u5b89\u88dd Nginx \u5148\u6c7a\u689d\u4ef6<\/p>\n<p>1<\/p>\n<p>dnf install [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":[],"categories":[809,4],"tags":[810],"_links":{"self":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2082"}],"collection":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2082"}],"version-history":[{"count":2,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2082\/revisions"}],"predecessor-version":[{"id":2108,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2082\/revisions\/2108"}],"wp:attachment":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2082"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}