freebsd 常用软件 - bestliutao/freebsd Wiki

安装其它软件 pkg install curl pkg install pkg_rmleaves pkg install git

pkg install npm cd /usr/ports/databases/phppgadmin/ && make install clean

pkg install portmaster 二安装tomcat9 pkg install -y tomcat9 cd /usr/local/apache-tomcat-9.0/conf ee server.xml文件修改端口从8080到9999

三 安装mysql8 git clone https://github.com/Adminbyaccident/FAMP.git chmod +x install-mysql80-freebsd.sh

https://github.com/Adminbyaccident/FAMP/blob/master/install-mysql80-freebsd.sh cat /root/db_root_pwd.txt use mysql ; update user set authenticication_string="" where user="root" #先把密码设置为空字符串,不让后面修改密码会报错 flush privileges; #这个刷新非常有必要,不让后面的ALTER就会报错

设置空密码后,更新权限 再用下面语句改密码 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';

https://docs.freebsd.org/en/articles/contributing/#ports-contributing

Message from openjdk8-8.302.08.1_2:

-- This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and procfs(5) mounted on /proc.

If you have not done it yet, please do the following:

    mount -t fdescfs fdesc /dev/fd
    mount -t procfs proc /proc

0p[;/.,m nbvcxsw23456789op;/zser567890-[]jkgifopogfxdfg'dsa]\wASERTYUIO;' 'DSAASdfghjkl;' 'oisZdfghjkl;lhZ.vbnm,l.mnbvnm,.mnbvbnm,mnbv cfghjkjhgfcxdcfghjk90p;.,mnbv cswe456789p;.,mnbvcdsw23To make it permanent,[[mnbfr4you need the following lines in /etc/fstab:

    fdesc   /dev/fd         fdescfs         rw      0       0
    proc    /proc           procfs          rw      0       0

[email protected]:/usr/ports/ports-mgmt/pkg # 一 修改web端口为9999 cd /usr/local/apache-tomcat-9.0/conf ee server.xml文件修改端口从8080到9999 二 修改用户名密码

ee /usr/local/apache-tomcat-9.0/conf/tomcat-users.xml 数据库用户名tomcat 密码dj******* 三 远程访问权限 ee /usr/local/apache-tomcat-9.0/webapps/manager/META-INF/context.xml ee /usr/local/apache-tomcat-9.0/webapps/host-manager/META-INF/context.xml

service tomcat9 restart http://你的IP或者域名:9999/

四 数据库mysql 8.0server 开放3306端口 mysql -u root -p 密码 cat /root/db_root_pwd.txt

五 PHP

找不到执行脚本的路径,那我直接补全就好了嘛~那就把 /script 直接改成 /usr/local/www/nginx ,然后重启服务,再一试,果然好了。原来是默认的 nginx 配置文件中定义的 $document_root 的值不正确。改也很简单,直接把原配置中的 root html; 改成 root /usr/local/www/nginx ,然后把 fastcgi_param 改回 SCRIPT_FILENAME $document_root$fastcgi_script_name; ,

   location ~ \.php$ {
      
       root /zfspool;           
       fastcgi_pass  unix:/tmp/php-fpm.sock;
                       
       fastcgi_index  index.php;
       # fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;            

include fastcgi_params; }

PHP配置/usr/local/etc/php-fpm.d/www.conf

[www] user = www group = www

;listen = 127.0.0.1:9000 (注释掉或删除,添加以下这一行/tmp/php-fpm.sock) listen = /tmp/php-cgi.sock

开启以下三行 listen.owner = www listen.group = www listen.mode = 0660

文件上传配置

可以看到,我的配置文件在/etc/nginx/nginx.conf,修改这个文件,找到http,在里面添加配置项或者修改配置项

http { # 修改内容在这里哦 } 修改内容如下:

send_timeout 60;

fastcgi_connect_timeout 300;

fastcgi_send_timeout 300;

fastcgi_read_timeout 300;

client_max_body_size 30m; 重新加载配置

下载整站 wget -r -p -np -k http://42.123.116.183:8082/list-1153531755759540.html

nginx -s reload

  八测速

服务端 iperf3 -s -D win客户端 iperf3 -c x.x.x.x -p 5201 -t 60 -P 10 -R