由于directadmin自带功能太少,所以就补充一下。
1、配置custombuild
cd /usr/local/directadmin/custombuild mkdir -p custom/nginx cp -fp configure/nginx/configure.nginx custom/nginx/
2、编辑/usr/local/directadmin/custombuild/custom/nginx/configure.nginx
新内容如下:
#!/bin/sh ./configure "--user=nginx" "--group=nginx" "--prefix=/usr" "--sbin-path=/usr/sbin" "--conf-path=/etc/nginx/nginx.conf" "--pid-path=/var/run/nginx.pid" "--http-log-path=/var/log/nginx/access_log" "--error-log-path=/var/log/nginx/error_log" "--without-mail_imap_module" "--without-mail_smtp_module" "--with-file-aio" "--with-ipv6" "--with-http_auth_request_module" "--with-http_ssl_module" "--with-http_v2_module" "--with-http_realip_module" "--with-http_addition_module" "--with-http_xslt_module=dynamic" "--with-http_image_filter_module=dynamic" "--with-http_geoip_module=dynamic" "--with-http_sub_module" "--with-http_dav_module" "--with-http_flv_module" "--with-http_mp4_module" "--with-http_gunzip_module" "--with-http_gzip_static_module" "--with-http_random_index_module" "--with-http_secure_link_module" "--with-http_degradation_module" "--with-http_slice_module" "--with-http_stub_status_module" "--with-http_perl_module=dynamic" "--with-mail=dynamic" "--with-mail_ssl_module" "--with-pcre" "--with-pcre-jit" "--with-stream=dynamic" "--with-stream_ssl_module" "--with-google_perftools_module" "--with-debug" "--with-cc-opt='-D FD_SETSIZE=32768'"
3、安装依赖库
yum -y install gd-devel yum -y install GeoIP-devel yum -y install gperftools-devel
4、重编译nginx
./build nginx
5、重启nginx
systemctl restart nginx systemctl restart directadmin
6、应用设置
./build used_configs